Lines Matching refs:pend
736 u32 idx, obj, pkts = 0, bytes = 0, pend, clr; in c_can_do_tx() local
738 clr = pend = priv->read_reg(priv, C_CAN_INTPND2_REG); in c_can_do_tx()
740 while ((idx = ffs(pend))) { in c_can_do_tx()
742 pend &= ~(1 << idx); in c_can_do_tx()
768 static u32 c_can_adjust_pending(u32 pend) in c_can_adjust_pending() argument
772 if (pend == RECEIVE_OBJECT_BITS) in c_can_adjust_pending()
773 return pend; in c_can_adjust_pending()
779 weight = hweight32(pend); in c_can_adjust_pending()
780 lasts = fls(pend); in c_can_adjust_pending()
784 return pend; in c_can_adjust_pending()
790 for (lasts--; pend & (1 << (lasts - 1)); lasts--); in c_can_adjust_pending()
792 return pend & ~((1 << lasts) - 1); in c_can_adjust_pending()
809 u32 pend, int quota) in c_can_read_objects() argument
813 while ((obj = ffs(pend)) && quota > 0) { in c_can_read_objects()
814 pend &= ~BIT(obj - 1); in c_can_read_objects()
849 u32 pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG); in c_can_get_pending() local
851 return pend; in c_can_get_pending()
870 u32 pkts = 0, pend = 0, toread, n; in c_can_do_rx_poll() local
880 if (!pend) { in c_can_do_rx_poll()
881 pend = c_can_get_pending(priv); in c_can_do_rx_poll()
882 if (!pend) in c_can_do_rx_poll()
888 toread = c_can_adjust_pending(pend); in c_can_do_rx_poll()
890 toread = pend; in c_can_do_rx_poll()
893 pend &= ~toread; in c_can_do_rx_poll()