Skip to contentSkip to conversation

i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND}

PATCH Applied Sergei Shtylyov 2 participants 3 messages Sep 5, 2014 – Sep 21, 2014 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-rcar: fix RCAR_IRQ_ACK_{RECV|SEND}

Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be 0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all 1's in bits 8-31, thus going against the manuals, so fix them.

---
The patch is against Wolfram Sang's 'linux.git' repo's 'i2c/for-current' branch.

 drivers/i2c/busses/i2c-rcar.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-rcar.c +2 -2
Index: linux/drivers/i2c/busses/i2c-rcar.c
===================================================================
@@ -76,8 +76,8 @@
 #define RCAR_IRQ_RECV	(MNR | MAL | MST | MAT | MDR)
 #define RCAR_IRQ_STOP	(MST)
 
-#define RCAR_IRQ_ACK_SEND	(~(MAT | MDE))
-#define RCAR_IRQ_ACK_RECV	(~(MAT | MDR))
+#define RCAR_IRQ_ACK_SEND	(~(MAT | MDE) & 0xFF)
+#define RCAR_IRQ_ACK_RECV	(~(MAT | MDR) & 0xFF)
 
 #define ID_LAST_MSG	(1 << 0)
 #define ID_IOERROR	(1 << 1)

A message that is not in the archive (sent off-list or not yet received): 2641177.jdYX8POT82-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org

#3 lore raw

Hello.

Quoted 8 lines · Wolfram Sang
Quoted 6 lines

Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be 0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all 1's in bits 8-31, thus going against the manuals, so fix them.

Applied to for-current, thanks!

Thanks. However, I don't see it in your tree (and neither my cleanups).

WBR, Sergei