aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2011-05-03 10:37:16 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2011-06-06 05:02:16 -0400
commitb049994d0f3a19c1706627117a7269ce5bd335ab (patch)
treeb1dc71391d47a17a81866c5c4d2a1d3ae21c18f3 /drivers/net/can
parent267cbe047cb4f6a3a6337029fc60862be1cf437d (diff)
can: at91_can: rename AT91_MB_RX_MASK to AT91_IRQ_MB_RX
... and use it for AT91_NEXT_MB_MASK, AT91_IRQ_MB_RX and AT91_IRQ_MB_RX, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/at91_can.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 9ce00fa90d96..86994845a1d4 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -52,11 +52,11 @@
52#define AT91_MB_RX_FIRST 1 52#define AT91_MB_RX_FIRST 1
53#define AT91_MB_RX_LAST 11 53#define AT91_MB_RX_LAST 11
54 54
55#define AT91_MB_RX_MASK(i) ((1 << (i)) - 1) 55#define AT91_MB_MASK(i) ((1 << (i)) - 1)
56#define AT91_MB_RX_SPLIT 8 56#define AT91_MB_RX_SPLIT 8
57#define AT91_MB_RX_LOW_LAST (AT91_MB_RX_SPLIT - 1) 57#define AT91_MB_RX_LOW_LAST (AT91_MB_RX_SPLIT - 1)
58#define AT91_MB_RX_LOW_MASK (AT91_MB_RX_MASK(AT91_MB_RX_SPLIT) & \ 58#define AT91_MB_RX_LOW_MASK (AT91_MB_MASK(AT91_MB_RX_SPLIT) & \
59 ~AT91_MB_RX_MASK(AT91_MB_RX_FIRST)) 59 ~AT91_MB_MASK(AT91_MB_RX_FIRST))
60 60
61#define AT91_MB_TX_NUM (1 << AT91_MB_TX_SHIFT) 61#define AT91_MB_TX_NUM (1 << AT91_MB_TX_SHIFT)
62#define AT91_MB_TX_FIRST (AT91_MB_RX_LAST + 1) 62#define AT91_MB_TX_FIRST (AT91_MB_RX_LAST + 1)
@@ -64,7 +64,7 @@
64 64
65#define AT91_NEXT_PRIO_SHIFT (AT91_MB_TX_SHIFT) 65#define AT91_NEXT_PRIO_SHIFT (AT91_MB_TX_SHIFT)
66#define AT91_NEXT_PRIO_MASK (0xf << AT91_MB_TX_SHIFT) 66#define AT91_NEXT_PRIO_MASK (0xf << AT91_MB_TX_SHIFT)
67#define AT91_NEXT_MB_MASK (AT91_MB_TX_NUM - 1) 67#define AT91_NEXT_MB_MASK (AT91_MB_MASK(AT91_MB_TX_SHIFT))
68#define AT91_NEXT_MASK ((AT91_MB_TX_NUM - 1) | AT91_NEXT_PRIO_MASK) 68#define AT91_NEXT_MASK ((AT91_MB_TX_NUM - 1) | AT91_NEXT_PRIO_MASK)
69 69
70/* Common registers */ 70/* Common registers */
@@ -127,10 +127,10 @@ enum at91_mb_mode {
127}; 127};
128 128
129/* Interrupt mask bits */ 129/* Interrupt mask bits */
130#define AT91_IRQ_MB_RX ((1 << (AT91_MB_RX_LAST + 1)) \ 130#define AT91_IRQ_MB_RX (AT91_MB_MASK(AT91_MB_RX_LAST + 1) & \
131 - (1 << AT91_MB_RX_FIRST)) 131 ~AT91_MB_MASK(AT91_MB_RX_FIRST))
132#define AT91_IRQ_MB_TX ((1 << (AT91_MB_TX_LAST + 1)) \ 132#define AT91_IRQ_MB_TX (AT91_MB_MASK(AT91_MB_TX_LAST + 1) & \
133 - (1 << AT91_MB_TX_FIRST)) 133 ~AT91_MB_MASK(AT91_MB_TX_FIRST))
134#define AT91_IRQ_MB_ALL (AT91_IRQ_MB_RX | AT91_IRQ_MB_TX) 134#define AT91_IRQ_MB_ALL (AT91_IRQ_MB_RX | AT91_IRQ_MB_TX)
135 135
136#define AT91_IRQ_ERRA (1 << 16) 136#define AT91_IRQ_ERRA (1 << 16)
@@ -735,7 +735,7 @@ static int at91_poll(struct napi_struct *napi, int quota)
735 if (work_done < quota) { 735 if (work_done < quota) {
736 /* enable IRQs for frame errors and all mailboxes >= rx_next */ 736 /* enable IRQs for frame errors and all mailboxes >= rx_next */
737 u32 reg_ier = AT91_IRQ_ERR_FRAME; 737 u32 reg_ier = AT91_IRQ_ERR_FRAME;
738 reg_ier |= AT91_IRQ_MB_RX & ~AT91_MB_RX_MASK(priv->rx_next); 738 reg_ier |= AT91_IRQ_MB_RX & ~AT91_MB_MASK(priv->rx_next);
739 739
740 napi_complete(napi); 740 napi_complete(napi);
741 at91_write(priv, AT91_IER, reg_ier); 741 at91_write(priv, AT91_IER, reg_ier);