summaryrefslogtreecommitdiff
path: root/drivers/net/can/flexcan.c
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-08-31 22:32:34 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-09-21 09:38:22 +0300
commit749de6fce2dd67b40f4118bf694be37f9093c3f5 (patch)
tree5c84343ebcae96bf5ed79a7cff9d453452f0ddc1 /drivers/net/can/flexcan.c
parent8c411745dd6ddbe745ee25cd1f6db856e920e7fa (diff)
downloadlinux-749de6fce2dd67b40f4118bf694be37f9093c3f5.tar.xz
can: flexcan: flexcan_chip_start(): cleanup writing of reg_mcr
This patch changes the order the individual bits of the mcr register in flexcan_chip_start() are or'ed together to match the datasheet. The inline documentation is adjusted accordingly. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/flexcan.c')
-rw-r--r--drivers/net/can/flexcan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 83ea6f4f7164..70cdbfcebb46 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -838,15 +838,15 @@ static int flexcan_chip_start(struct net_device *dev)
* halt now
* only supervisor access
* enable warning int
- * choose format C
* disable local echo
+ * choose format C
+ * set max mailbox number
*/
reg_mcr = flexcan_read(&regs->mcr);
reg_mcr &= ~FLEXCAN_MCR_MAXMB(0xff);
reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_FEN | FLEXCAN_MCR_HALT |
- FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN |
- FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_SRX_DIS |
- FLEXCAN_MCR_MAXMB(FLEXCAN_TX_BUF_ID);
+ FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN | FLEXCAN_MCR_SRX_DIS |
+ FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_MAXMB(FLEXCAN_TX_BUF_ID);
netdev_dbg(dev, "%s: writing mcr=0x%08x", __func__, reg_mcr);
flexcan_write(reg_mcr, &regs->mcr);