Lines Matching refs:nfc_credits
456 tb_dbg(tb, " NFC Credits: %#x\n", regs->nfc_credits); in tb_dump_port()
569 u32 nfc_credits; in tb_port_add_nfc_credits() local
581 nfc_credits = port->config.nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK; in tb_port_add_nfc_credits()
583 credits = max_t(int, -nfc_credits, credits); in tb_port_add_nfc_credits()
585 nfc_credits += credits; in tb_port_add_nfc_credits()
588 port->config.nfc_credits & ADP_CS_4_NFC_BUFFERS_MASK); in tb_port_add_nfc_credits()
590 port->config.nfc_credits &= ~ADP_CS_4_NFC_BUFFERS_MASK; in tb_port_add_nfc_credits()
591 port->config.nfc_credits |= nfc_credits; in tb_port_add_nfc_credits()
593 return tb_port_write(port, &port->config.nfc_credits, in tb_port_add_nfc_credits()
750 (port->config.nfc_credits & ADP_CS_4_TOTAL_BUFFERS_MASK) >> in tb_init_port()
1221 u32 nfc_credits; in tb_port_do_update_credits() local
1224 ret = tb_port_read(port, &nfc_credits, TB_CFG_PORT, ADP_CS_4, 1); in tb_port_do_update_credits()
1228 if (nfc_credits != port->config.nfc_credits) { in tb_port_do_update_credits()
1231 total = (nfc_credits & ADP_CS_4_TOTAL_BUFFERS_MASK) >> in tb_port_do_update_credits()
1237 port->config.nfc_credits = nfc_credits; in tb_port_do_update_credits()