Lines Matching refs:iface
49 #define C_CAN_IFACE(reg, iface) (C_CAN_IF1_##reg + (iface) * IF_ENUM_REG_LEN) argument
251 static void c_can_obj_update(struct net_device *dev, int iface, u32 cmd, u32 obj) in c_can_obj_update() argument
254 int cnt, reg = C_CAN_IFACE(COMREQ_REG, iface); in c_can_obj_update()
267 static inline void c_can_object_get(struct net_device *dev, int iface, in c_can_object_get() argument
270 c_can_obj_update(dev, iface, cmd, obj); in c_can_object_get()
273 static inline void c_can_object_put(struct net_device *dev, int iface, in c_can_object_put() argument
276 c_can_obj_update(dev, iface, cmd | IF_COMM_WR, obj); in c_can_object_put()
284 static void c_can_inval_tx_object(struct net_device *dev, int iface, int obj) in c_can_inval_tx_object() argument
288 priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), 0); in c_can_inval_tx_object()
289 c_can_object_put(dev, iface, obj, IF_COMM_INVAL); in c_can_inval_tx_object()
292 static void c_can_inval_msg_object(struct net_device *dev, int iface, int obj) in c_can_inval_msg_object() argument
296 priv->write_reg(priv, C_CAN_IFACE(ARB1_REG, iface), 0); in c_can_inval_msg_object()
297 priv->write_reg(priv, C_CAN_IFACE(ARB2_REG, iface), 0); in c_can_inval_msg_object()
298 c_can_inval_tx_object(dev, iface, obj); in c_can_inval_msg_object()
301 static void c_can_setup_tx_object(struct net_device *dev, int iface, in c_can_setup_tx_object() argument
327 c_can_inval_msg_object(dev, iface, obj); in c_can_setup_tx_object()
331 priv->write_reg32(priv, C_CAN_IFACE(ARB1_REG, iface), arb); in c_can_setup_tx_object()
333 priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), ctrl); in c_can_setup_tx_object()
336 priv->write_reg(priv, C_CAN_IFACE(DATA1_REG, iface) + i / 2, in c_can_setup_tx_object()
342 int iface) in c_can_activate_all_lower_rx_msg_obj() argument
347 c_can_object_get(dev, iface, i, IF_COMM_CLR_NEWDAT); in c_can_activate_all_lower_rx_msg_obj()
351 int iface, int objno, u32 ctrl) in c_can_handle_lost_msg_obj() argument
359 priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), ctrl); in c_can_handle_lost_msg_obj()
360 c_can_object_put(dev, iface, objno, IF_COMM_CONTROL); in c_can_handle_lost_msg_obj()
377 static int c_can_read_msg_object(struct net_device *dev, int iface, u32 ctrl) in c_can_read_msg_object() argument
393 arb = priv->read_reg32(priv, C_CAN_IFACE(ARB1_REG, iface)); in c_can_read_msg_object()
403 int i, dreg = C_CAN_IFACE(DATA1_REG, iface); in c_can_read_msg_object()
419 static void c_can_setup_receive_object(struct net_device *dev, int iface, in c_can_setup_receive_object() argument
425 priv->write_reg32(priv, C_CAN_IFACE(MASK1_REG, iface), mask); in c_can_setup_receive_object()
428 priv->write_reg32(priv, C_CAN_IFACE(ARB1_REG, iface), id); in c_can_setup_receive_object()
430 priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), mcont); in c_can_setup_receive_object()
431 c_can_object_put(dev, iface, obj, IF_COMM_RCV_SETUP); in c_can_setup_receive_object()