Lines Matching refs:pend

727 	u32 idx, obj, pkts = 0, bytes = 0, pend;  in c_can_do_tx()  local
731 pend = priv->read_reg32(priv, C_CAN_INTPND3_REG); in c_can_do_tx()
733 pend = priv->read_reg(priv, C_CAN_INTPND2_REG); in c_can_do_tx()
735 while ((idx = ffs(pend))) { in c_can_do_tx()
737 pend &= ~BIT(idx); in c_can_do_tx()
783 static u32 c_can_adjust_pending(u32 pend, u32 rx_mask) in c_can_adjust_pending() argument
787 if (pend == rx_mask) in c_can_adjust_pending()
788 return pend; in c_can_adjust_pending()
793 weight = hweight32(pend); in c_can_adjust_pending()
794 lasts = fls(pend); in c_can_adjust_pending()
798 return pend; in c_can_adjust_pending()
803 for (lasts--; pend & BIT(lasts - 1); lasts--) in c_can_adjust_pending()
806 return pend & ~GENMASK(lasts - 1, 0); in c_can_adjust_pending()
823 u32 pend, int quota) in c_can_read_objects() argument
827 while ((obj = ffs(pend)) && quota > 0) { in c_can_read_objects()
828 pend &= ~BIT(obj - 1); in c_can_read_objects()
864 u32 pend; in c_can_get_pending() local
867 pend = priv->read_reg32(priv, C_CAN_NEWDAT1_REG); in c_can_get_pending()
869 pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG); in c_can_get_pending()
871 return pend; in c_can_get_pending()
888 u32 pkts = 0, pend = 0, toread, n; in c_can_do_rx_poll() local
891 if (!pend) { in c_can_do_rx_poll()
892 pend = c_can_get_pending(priv); in c_can_do_rx_poll()
893 if (!pend) in c_can_do_rx_poll()
898 toread = c_can_adjust_pending(pend, in c_can_do_rx_poll()
901 toread = pend; in c_can_do_rx_poll()
904 pend &= ~toread; in c_can_do_rx_poll()