Lines Matching refs:pend
727 u32 idx, obj, pkts = 0, bytes = 0, pend, clr; in c_can_do_tx() local
729 clr = pend = priv->read_reg(priv, C_CAN_INTPND2_REG); in c_can_do_tx()
731 while ((idx = ffs(pend))) { in c_can_do_tx()
733 pend &= ~(1 << idx); in c_can_do_tx()
759 static u32 c_can_adjust_pending(u32 pend) in c_can_adjust_pending() argument
763 if (pend == RECEIVE_OBJECT_BITS) in c_can_adjust_pending()
764 return pend; in c_can_adjust_pending()
770 weight = hweight32(pend); in c_can_adjust_pending()
771 lasts = fls(pend); in c_can_adjust_pending()
775 return pend; in c_can_adjust_pending()
781 for (lasts--; pend & (1 << (lasts - 1)); lasts--); in c_can_adjust_pending()
783 return pend & ~((1 << lasts) - 1); in c_can_adjust_pending()
800 u32 pend, int quota) in c_can_read_objects() argument
804 while ((obj = ffs(pend)) && quota > 0) { in c_can_read_objects()
805 pend &= ~BIT(obj - 1); in c_can_read_objects()
840 u32 pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG); in c_can_get_pending() local
842 return pend; in c_can_get_pending()
861 u32 pkts = 0, pend = 0, toread, n; in c_can_do_rx_poll() local
871 if (!pend) { in c_can_do_rx_poll()
872 pend = c_can_get_pending(priv); in c_can_do_rx_poll()
873 if (!pend) in c_can_do_rx_poll()
879 toread = c_can_adjust_pending(pend); in c_can_do_rx_poll()
881 toread = pend; in c_can_do_rx_poll()
884 pend &= ~toread; in c_can_do_rx_poll()