static inline void c_can_object_put(struct net_device *dev, int iface, int objno, int mask) { struct c_can_priv *priv = netdev_priv(dev); /* * As per specs, after writting the message object number in the * IF command request register the transfer b/w interface * register and message RAM must be complete in 6 CAN-CLK * period. */ priv->write_reg32(priv, C_CAN_IFACE(COMREQ_REG, iface), ((IF_COMM_WR | IFX_WRITE_LOW_16BIT(mask)) << 16) | IFX_WRITE_LOW_16BIT(objno)); if (c_can_msg_obj_is_busy(priv, iface)) netdev_err(dev, "timed out in object put\n"); }
static inline void c_can_object_get(struct net_device *dev, int iface, int objno, int mask) { struct c_can_priv *priv = netdev_priv(dev); /* * As per specs, after writting the message object number in the * IF command request register the transfer b/w interface * register and message RAM must be complete in 6 CAN-CLK * period. */ priv->write_reg(priv, &priv->regs->ifregs[iface].com_mask, IFX_WRITE_LOW_16BIT(mask)); priv->write_reg(priv, &priv->regs->ifregs[iface].com_req, IFX_WRITE_LOW_16BIT(objno)); if (c_can_msg_obj_is_busy(priv, iface)) netdev_err(dev, "timed out in object get\n"); }