Skip to contentSkip to conversation

watchdog: at91sam9: use endian agnostic IO

PATCH In review Ben Dooks 3 participants 3 messages Mar 26, 2015

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 watchdog: at91sam9: use endian agnostic IO

Use endian agnostic IO functions for the watchdog driver for when it is enabled on ATSAMA5D36 devices running in big endian.

---
CC: Boris Brezillon <[email protected]>
CC: Guenter Roeck <[email protected]>
CC: Nicolas Ferre <[email protected]>
CC: Wim Van Sebroeck <[email protected]>
CC: [email protected]
CC: Andrew Victor <[email protected]>
CC: Nicolas Ferre <[email protected]>
CC: Jean-Christophe Plagniol-Villard <[email protected]>

---
 drivers/watchdog/at91sam9_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/at91sam9_wdt.c +2 -2
index 1443b3c..e4698f7 100644
@@ -40,9 +40,9 @@
 #define DRV_NAME "AT91SAM9 Watchdog"
 
 #define wdt_read(wdt, field) \
-	__raw_readl((wdt)->base + (field))
+	readl_relaxed((wdt)->base + (field))
 #define wdt_write(wtd, field, val) \
-	__raw_writel((val), (wdt)->base + (field))
+	writel_relaxed((val), (wdt)->base + (field))
 
 /* AT91SAM9 watchdog runs a 12bit counter @ 256Hz,
  * use this to convert a watchdog
Signature · 1 line
2.1.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Ben Dooks

Use endian agnostic IO functions for the watchdog driver for when it is enabled on ATSAMA5D36 devices running in big endian.

Quoted 32 lines

---
CC: Boris Brezillon <[email protected]>
CC: Guenter Roeck <[email protected]>
CC: Nicolas Ferre <[email protected]>
CC: Wim Van Sebroeck <[email protected]>
CC: [email protected]
CC: Andrew Victor <[email protected]>
CC: Nicolas Ferre <[email protected]>
CC: Jean-Christophe Plagniol-Villard <[email protected]>

---
 drivers/watchdog/at91sam9_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/at91sam9_wdt.c +2 -2
index 1443b3c..e4698f7 100644
@@ -40,9 +40,9 @@
 #define DRV_NAME "AT91SAM9 Watchdog"
 
 #define wdt_read(wdt, field) \
-	__raw_readl((wdt)->base + (field))
+	readl_relaxed((wdt)->base + (field))
 #define wdt_write(wtd, field, val) \
-	__raw_writel((val), (wdt)->base + (field))
+	writel_relaxed((val), (wdt)->base + (field))
 
 /* AT91SAM9 watchdog runs a 12bit counter @ 256Hz,
  * use this to convert a watchdog
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#2 lore raw
In reply to Ben Dooks
Quoted 4 lines · On Thu, 26 Mar 2015 14:34:14 +0000 Ben Dooks <[email protected]> wrote:

Use endian agnostic IO functions for the watchdog driver for when it is enabled on ATSAMA5D36 devices running in big endian.

Quoted 29 lines

---
CC: Boris Brezillon <[email protected]>
CC: Guenter Roeck <[email protected]>
CC: Nicolas Ferre <[email protected]>
CC: Wim Van Sebroeck <[email protected]>
CC: [email protected]
CC: Andrew Victor <[email protected]>
CC: Nicolas Ferre <[email protected]>
CC: Jean-Christophe Plagniol-Villard <[email protected]>

---
 drivers/watchdog/at91sam9_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/at91sam9_wdt.c +2 -2
index 1443b3c..e4698f7 100644
@@ -40,9 +40,9 @@
 #define DRV_NAME "AT91SAM9 Watchdog"
 
 #define wdt_read(wdt, field) \
-	__raw_readl((wdt)->base + (field))
+	readl_relaxed((wdt)->base + (field))
 #define wdt_write(wtd, field, val) \
-	__raw_writel((val), (wdt)->base + (field))
+	writel_relaxed((val), (wdt)->base + (field))
 
 /* AT91SAM9 watchdog runs a 12bit counter @ 256Hz,
  * use this to convert a watchdog
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com