Lines Matching refs:nfc_credits
458 tb_dbg(tb, " NFC Credits: %#x\n", regs->nfc_credits); in tb_dump_port()
563 u32 nfc_credits; in tb_port_add_nfc_credits() local
575 nfc_credits = port->config.nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK; in tb_port_add_nfc_credits()
577 credits = max_t(int, -nfc_credits, credits); in tb_port_add_nfc_credits()
579 nfc_credits += credits; in tb_port_add_nfc_credits()
582 port->config.nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK); in tb_port_add_nfc_credits()
584 port->config.nfc_credits &= ~ADP_CS_4_NFC_BUFFERS_MASK; in tb_port_add_nfc_credits()
585 port->config.nfc_credits |= nfc_credits; in tb_port_add_nfc_credits()
587 return tb_port_write(port, &port->config.nfc_credits, in tb_port_add_nfc_credits()
737 (port->config.nfc_credits & ADP_CS_4_TOTAL_BUFFERS_MASK) >> in tb_init_port()
1136 u32 nfc_credits; in tb_port_do_update_credits() local
1139 ret = tb_port_read(port, &nfc_credits, TB_CFG_PORT, ADP_CS_4, 1); in tb_port_do_update_credits()
1143 if (nfc_credits != port->config.nfc_credits) { in tb_port_do_update_credits()
1146 total = (nfc_credits & ADP_CS_4_TOTAL_BUFFERS_MASK) >> in tb_port_do_update_credits()
1152 port->config.nfc_credits = nfc_credits; in tb_port_do_update_credits()