Lines Matching refs:pend
707 u32 idx, obj, pkts = 0, bytes = 0, pend, clr; in c_can_do_tx() local
709 clr = pend = priv->read_reg(priv, C_CAN_INTPND2_REG); in c_can_do_tx()
711 while ((idx = ffs(pend))) { in c_can_do_tx()
713 pend &= ~(1 << idx); in c_can_do_tx()
739 static u32 c_can_adjust_pending(u32 pend) in c_can_adjust_pending() argument
743 if (pend == RECEIVE_OBJECT_BITS) in c_can_adjust_pending()
744 return pend; in c_can_adjust_pending()
750 weight = hweight32(pend); in c_can_adjust_pending()
751 lasts = fls(pend); in c_can_adjust_pending()
755 return pend; in c_can_adjust_pending()
761 for (lasts--; pend & (1 << (lasts - 1)); lasts--); in c_can_adjust_pending()
763 return pend & ~((1 << lasts) - 1); in c_can_adjust_pending()
780 u32 pend, int quota) in c_can_read_objects() argument
784 while ((obj = ffs(pend)) && quota > 0) { in c_can_read_objects()
785 pend &= ~BIT(obj - 1); in c_can_read_objects()
820 u32 pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG); in c_can_get_pending() local
822 return pend; in c_can_get_pending()
841 u32 pkts = 0, pend = 0, toread, n; in c_can_do_rx_poll() local
851 if (!pend) { in c_can_do_rx_poll()
852 pend = c_can_get_pending(priv); in c_can_do_rx_poll()
853 if (!pend) in c_can_do_rx_poll()
859 toread = c_can_adjust_pending(pend); in c_can_do_rx_poll()
861 toread = pend; in c_can_do_rx_poll()
864 pend &= ~toread; in c_can_do_rx_poll()