Lines Matching refs:nfc_credits
455 tb_dbg(tb, " NFC Credits: %#x\n", regs->nfc_credits); in tb_dump_port()
568 u32 nfc_credits; in tb_port_add_nfc_credits() local
580 nfc_credits = port->config.nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK; in tb_port_add_nfc_credits()
582 credits = max_t(int, -nfc_credits, credits); in tb_port_add_nfc_credits()
584 nfc_credits += credits; in tb_port_add_nfc_credits()
587 port->config.nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK); in tb_port_add_nfc_credits()
589 port->config.nfc_credits &= ~ADP_CS_4_NFC_BUFFERS_MASK; in tb_port_add_nfc_credits()
590 port->config.nfc_credits |= nfc_credits; in tb_port_add_nfc_credits()
592 return tb_port_write(port, &port->config.nfc_credits, in tb_port_add_nfc_credits()
749 (port->config.nfc_credits & ADP_CS_4_TOTAL_BUFFERS_MASK) >> in tb_init_port()
1236 u32 nfc_credits; in tb_port_do_update_credits() local
1239 ret = tb_port_read(port, &nfc_credits, TB_CFG_PORT, ADP_CS_4, 1); in tb_port_do_update_credits()
1243 if (nfc_credits != port->config.nfc_credits) { in tb_port_do_update_credits()
1246 total = (nfc_credits & ADP_CS_4_TOTAL_BUFFERS_MASK) >> in tb_port_do_update_credits()
1252 port->config.nfc_credits = nfc_credits; in tb_port_do_update_credits()