aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/c_can
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-04-11 04:13:19 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-04-24 16:09:00 -0400
commitb07faaaf1f60c2b76604917fc5a9937974d78e92 (patch)
tree808a8e134d0943653184759aa3962bb24a4ae3ce /drivers/net/can/c_can
parent8ff2de0fb41560cfdf072eb41b5a5b4799d126ea (diff)
can: c_can: Cleanup c_can_inval_msg_object()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/c_can')
-rw-r--r--drivers/net/can/c_can/c_can.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index e4eaa841a826..bf3aed43cf2c 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -129,6 +129,9 @@
129/* Receive setup of message objects */ 129/* Receive setup of message objects */
130#define IF_COMM_RCV_SETUP (IF_COMM_MASK | IF_COMM_ARB | IF_COMM_CONTROL) 130#define IF_COMM_RCV_SETUP (IF_COMM_MASK | IF_COMM_ARB | IF_COMM_CONTROL)
131 131
132/* Invalidation of message objects */
133#define IF_COMM_INVAL (IF_COMM_ARB | IF_COMM_CONTROL)
134
132/* IFx arbitration */ 135/* IFx arbitration */
133#define IF_ARB_MSGVAL BIT(15) 136#define IF_ARB_MSGVAL BIT(15)
134#define IF_ARB_MSGXTD BIT(14) 137#define IF_ARB_MSGXTD BIT(14)
@@ -447,7 +450,7 @@ static void c_can_setup_receive_object(struct net_device *dev, int iface,
447 c_can_object_put(dev, iface, obj, IF_COMM_RCV_SETUP); 450 c_can_object_put(dev, iface, obj, IF_COMM_RCV_SETUP);
448} 451}
449 452
450static void c_can_inval_msg_object(struct net_device *dev, int iface, int objno) 453static void c_can_inval_msg_object(struct net_device *dev, int iface, int obj)
451{ 454{
452 struct c_can_priv *priv = netdev_priv(dev); 455 struct c_can_priv *priv = netdev_priv(dev);
453 456
@@ -455,10 +458,7 @@ static void c_can_inval_msg_object(struct net_device *dev, int iface, int objno)
455 priv->write_reg(priv, C_CAN_IFACE(ARB2_REG, iface), 0); 458 priv->write_reg(priv, C_CAN_IFACE(ARB2_REG, iface), 0);
456 priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), 0); 459 priv->write_reg(priv, C_CAN_IFACE(MSGCTRL_REG, iface), 0);
457 460
458 c_can_object_put(dev, iface, objno, IF_COMM_ARB | IF_COMM_CONTROL); 461 c_can_object_put(dev, iface, obj, IF_COMM_INVAL);
459
460 netdev_dbg(dev, "obj no:%d, msgval:0x%08x\n", objno,
461 c_can_read_reg32(priv, C_CAN_MSGVAL1_REG));
462} 462}
463 463
464static inline int c_can_is_next_tx_obj_busy(struct c_can_priv *priv, int objno) 464static inline int c_can_is_next_tx_obj_busy(struct c_can_priv *priv, int objno)