diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2014-05-28 03:44:44 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-06-01 16:22:51 -0400 |
commit | 3e3aabac443e25712a3788cf88cc188e13ca8b0e (patch) | |
tree | 258aeec71c8035a8e180929d57d34a930dc036a4 /drivers/i2c | |
parent | 150b8be3cda54412ad7b54f5392b513b25c0aaa7 (diff) |
i2c: rcar: reuse status bits as enable bits
Status register and enable register are identical regarding their
layout. Use the bit definitions for both.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index e16784124a41..4c46d1b1b61d 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #define FSB (1 << 1) /* force stop bit */ | 59 | #define FSB (1 << 1) /* force stop bit */ |
60 | #define ESG (1 << 0) /* en startbit gen */ | 60 | #define ESG (1 << 0) /* en startbit gen */ |
61 | 61 | ||
62 | /* ICMSR */ | 62 | /* ICMSR (also for ICMIE) */ |
63 | #define MNR (1 << 6) /* nack received */ | 63 | #define MNR (1 << 6) /* nack received */ |
64 | #define MAL (1 << 5) /* arbitration lost */ | 64 | #define MAL (1 << 5) /* arbitration lost */ |
65 | #define MST (1 << 4) /* sent a stop */ | 65 | #define MST (1 << 4) /* sent a stop */ |
@@ -68,23 +68,14 @@ | |||
68 | #define MDR (1 << 1) | 68 | #define MDR (1 << 1) |
69 | #define MAT (1 << 0) /* slave addr xfer done */ | 69 | #define MAT (1 << 0) /* slave addr xfer done */ |
70 | 70 | ||
71 | /* ICMIE */ | ||
72 | #define MNRE (1 << 6) /* nack irq en */ | ||
73 | #define MALE (1 << 5) /* arblos irq en */ | ||
74 | #define MSTE (1 << 4) /* stop irq en */ | ||
75 | #define MDEE (1 << 3) | ||
76 | #define MDTE (1 << 2) | ||
77 | #define MDRE (1 << 1) | ||
78 | #define MATE (1 << 0) /* address sent irq en */ | ||
79 | |||
80 | 71 | ||
81 | #define RCAR_BUS_PHASE_START (MDBS | MIE | ESG) | 72 | #define RCAR_BUS_PHASE_START (MDBS | MIE | ESG) |
82 | #define RCAR_BUS_PHASE_DATA (MDBS | MIE) | 73 | #define RCAR_BUS_PHASE_DATA (MDBS | MIE) |
83 | #define RCAR_BUS_PHASE_STOP (MDBS | MIE | FSB) | 74 | #define RCAR_BUS_PHASE_STOP (MDBS | MIE | FSB) |
84 | 75 | ||
85 | #define RCAR_IRQ_SEND (MNRE | MALE | MSTE | MATE | MDEE) | 76 | #define RCAR_IRQ_SEND (MNR | MAL | MST | MAT | MDE) |
86 | #define RCAR_IRQ_RECV (MNRE | MALE | MSTE | MATE | MDRE) | 77 | #define RCAR_IRQ_RECV (MNR | MAL | MST | MAT | MDR) |
87 | #define RCAR_IRQ_STOP (MSTE) | 78 | #define RCAR_IRQ_STOP (MST) |
88 | 79 | ||
89 | #define RCAR_IRQ_ACK_SEND (~(MAT | MDE)) | 80 | #define RCAR_IRQ_ACK_SEND (~(MAT | MDE)) |
90 | #define RCAR_IRQ_ACK_RECV (~(MAT | MDR)) | 81 | #define RCAR_IRQ_ACK_RECV (~(MAT | MDR)) |