All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: at91sam9: use endian agnostic IO
@ 2015-03-26 14:34 Ben Dooks
  2015-03-26 15:29 ` Guenter Roeck
  2015-03-26 23:59 ` Boris Brezillon
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Dooks @ 2015-03-26 14:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks, Boris Brezillon, Guenter Roeck, Nicolas Ferre,
	Wim Van Sebroeck, linux-watchdog, Andrew Victor,
	Jean-Christophe Plagniol-Villard

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

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
CC: Boris Brezillon <boris.brezillon@free-electrons.com>
CC: Guenter Roeck <linux@roeck-us.net>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Wim Van Sebroeck <wim@iguana.be>
CC: linux-watchdog@vger.kernel.org
CC: Andrew Victor <linux@maxim.org.za>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
---
 drivers/watchdog/at91sam9_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 1443b3c..e4698f7 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -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
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: at91sam9: use endian agnostic IO
  2015-03-26 14:34 [PATCH] watchdog: at91sam9: use endian agnostic IO Ben Dooks
@ 2015-03-26 15:29 ` Guenter Roeck
  2015-03-26 23:59 ` Boris Brezillon
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2015-03-26 15:29 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, Boris Brezillon, Nicolas Ferre, Wim Van Sebroeck,
	linux-watchdog, Andrew Victor, Jean-Christophe Plagniol-Villard

On Thu, Mar 26, 2015 at 02:34:14PM +0000, Ben Dooks wrote:
> Use endian agnostic IO functions for the watchdog driver for when it
> is enabled on ATSAMA5D36 devices running in big endian.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
> CC: Boris Brezillon <boris.brezillon@free-electrons.com>
> CC: Guenter Roeck <linux@roeck-us.net>
> CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> CC: Wim Van Sebroeck <wim@iguana.be>
> CC: linux-watchdog@vger.kernel.org
> CC: Andrew Victor <linux@maxim.org.za>
> CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> ---
>  drivers/watchdog/at91sam9_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> index 1443b3c..e4698f7 100644
> --- a/drivers/watchdog/at91sam9_wdt.c
> +++ b/drivers/watchdog/at91sam9_wdt.c
> @@ -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
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: at91sam9: use endian agnostic IO
  2015-03-26 14:34 [PATCH] watchdog: at91sam9: use endian agnostic IO Ben Dooks
  2015-03-26 15:29 ` Guenter Roeck
@ 2015-03-26 23:59 ` Boris Brezillon
  1 sibling, 0 replies; 3+ messages in thread
From: Boris Brezillon @ 2015-03-26 23:59 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, Guenter Roeck, Nicolas Ferre, Wim Van Sebroeck,
	linux-watchdog, Andrew Victor, Jean-Christophe Plagniol-Villard

On Thu, 26 Mar 2015 14:34:14 +0000
Ben Dooks <ben.dooks@codethink.co.uk> wrote:

> Use endian agnostic IO functions for the watchdog driver for when it
> is enabled on ATSAMA5D36 devices running in big endian.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
> CC: Boris Brezillon <boris.brezillon@free-electrons.com>
> CC: Guenter Roeck <linux@roeck-us.net>
> CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> CC: Wim Van Sebroeck <wim@iguana.be>
> CC: linux-watchdog@vger.kernel.org
> CC: Andrew Victor <linux@maxim.org.za>
> CC: Nicolas Ferre <nicolas.ferre@atmel.com>
> CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> ---
>  drivers/watchdog/at91sam9_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> index 1443b3c..e4698f7 100644
> --- a/drivers/watchdog/at91sam9_wdt.c
> +++ b/drivers/watchdog/at91sam9_wdt.c
> @@ -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



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-26 23:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 14:34 [PATCH] watchdog: at91sam9: use endian agnostic IO Ben Dooks
2015-03-26 15:29 ` Guenter Roeck
2015-03-26 23:59 ` Boris Brezillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.