linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, Will Deacon <will.deacon@arm.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Nicolas Pitre <nico@linaro.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Subject: Re: [PATCH 02/24] ARM: at91: use __iomem pointers for MMIO
Date: Mon, 17 Sep 2012 09:56:04 +0200	[thread overview]
Message-ID: <5056D794.5000107@atmel.com> (raw)
In-Reply-To: <1347658492-11608-3-git-send-email-arnd@arndb.de>

On 09/14/2012 11:34 PM, Arnd Bergmann :
> ARM is moving to stricter checks on readl/write functions,
> so we need to use the correct types everywhere.
> 
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-at91/at91x40.c                 |    2 +-
>  arch/arm/mach-at91/at91x40_time.c            |    4 ++--
>  arch/arm/mach-at91/include/mach/hardware.h   |    4 ++--
>  arch/arm/mach-at91/include/mach/uncompress.h |    6 +++---
>  arch/arm/mach-at91/setup.c                   |    4 ++--
>  5 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
> index 46090e6..6bd7300 100644
> --- a/arch/arm/mach-at91/at91x40.c
> +++ b/arch/arm/mach-at91/at91x40.c
> @@ -47,7 +47,7 @@ static void at91x40_idle(void)
>  	 * Disable the processor clock.  The processor will be automatically
>  	 * re-enabled by an interrupt or by a reset.
>  	 */
> -	__raw_writel(AT91_PS_CR_CPU, AT91_PS_CR);
> +	__raw_writel(AT91_PS_CR_CPU, AT91_IO_P2V(AT91_PS_CR));
>  	cpu_do_idle();
>  }
>  
> diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
> index 6ca680a..ee06d7b 100644
> --- a/arch/arm/mach-at91/at91x40_time.c
> +++ b/arch/arm/mach-at91/at91x40_time.c
> @@ -29,10 +29,10 @@
>  #include <mach/at91_tc.h>
>  
>  #define at91_tc_read(field) \
> -	__raw_readl(AT91_TC + field)
> +	__raw_readl(AT91_IO_P2V(AT91_TC) + field)
>  
>  #define at91_tc_write(field, value) \
> -	__raw_writel(value, AT91_TC + field);
> +	__raw_writel(value, AT91_IO_P2V(AT91_TC) + field);
>  
>  /*
>   *	3 counter/timer units present.
> diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
> index 09242b6..711a789 100644
> --- a/arch/arm/mach-at91/include/mach/hardware.h
> +++ b/arch/arm/mach-at91/include/mach/hardware.h
> @@ -67,13 +67,13 @@
>   * to 0xFEF78000 .. 0xFF000000.  (544Kb)
>   */
>  #define AT91_IO_PHYS_BASE	0xFFF78000
> -#define AT91_IO_VIRT_BASE	(0xFF000000 - AT91_IO_SIZE)
> +#define AT91_IO_VIRT_BASE	IOMEM(0xFF000000 - AT91_IO_SIZE)
>  #else
>  /*
>   * Identity mapping for the non MMU case.
>   */
>  #define AT91_IO_PHYS_BASE	AT91_BASE_SYS
> -#define AT91_IO_VIRT_BASE	AT91_IO_PHYS_BASE
> +#define AT91_IO_VIRT_BASE	IOMEM(AT91_IO_PHYS_BASE)
>  #endif
>  
>  #define AT91_IO_SIZE		(0xFFFFFFFF - AT91_IO_PHYS_BASE + 1)
> diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
> index 6f6118d..58c9d5b 100644
> --- a/arch/arm/mach-at91/include/mach/uncompress.h
> +++ b/arch/arm/mach-at91/include/mach/uncompress.h
> @@ -94,7 +94,7 @@ static const u32 uarts_sam9x5[] = {
>  	0,
>  };
>  
> -static inline const u32* decomp_soc_detect(u32 dbgu_base)
> +static inline const u32* decomp_soc_detect(void __iomem*dbgu_base)

A whitespace is missing before the *, no?

>  {
>  	u32 cidr, socid;
>  
> @@ -142,10 +142,10 @@ static inline void arch_decomp_setup(void)
>  	int i = 0;
>  	const u32* usarts;
>  
> -	usarts = decomp_soc_detect(AT91_BASE_DBGU0);
> +	usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0);
>  
>  	if (!usarts)
> -		usarts = decomp_soc_detect(AT91_BASE_DBGU1);
> +		usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1);
>  	if (!usarts) {
>  		at91_uart = NULL;
>  		return;
> diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
> index 944bffb..e6f52de 100644
> --- a/arch/arm/mach-at91/setup.c
> +++ b/arch/arm/mach-at91/setup.c
> @@ -73,7 +73,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
>  {
>  	struct map_desc *desc = &sram_desc[bank];
>  
> -	desc->virtual = AT91_IO_VIRT_BASE - length;
> +	desc->virtual = (unsigned long)AT91_IO_VIRT_BASE - length;
>  	if (bank > 0)
>  		desc->virtual -= sram_desc[bank - 1].length;
>  
> @@ -88,7 +88,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
>  }
>  
>  static struct map_desc at91_io_desc __initdata = {
> -	.virtual	= AT91_VA_BASE_SYS,
> +	.virtual	= (unsigned long)AT91_VA_BASE_SYS,
>  	.pfn		= __phys_to_pfn(AT91_BASE_SYS),
>  	.length		= SZ_16K,
>  	.type		= MT_DEVICE,
> 

Otherwise, look good.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

You can carry it directly in the arm-soc tree.

Bye,
-- 
Nicolas Ferre

  reply	other threads:[~2012-09-17  7:56 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1347658492-11608-1-git-send-email-arnd@arndb.de>
2012-09-14 21:34 ` [PATCH 01/24] ARM: shmobile: use __iomem pointers for MMIO Arnd Bergmann
2012-09-18  7:11   ` Simon Horman
2012-09-18  8:31     ` Arnd Bergmann
2012-09-18 11:50       ` Simon Horman
2012-09-18 16:04         ` Arnd Bergmann
2012-09-18 23:56           ` Simon Horman
2012-09-18  7:42   ` Paul Mundt
2012-09-14 21:34 ` [PATCH 02/24] ARM: at91: " Arnd Bergmann
2012-09-17  7:56   ` Nicolas Ferre [this message]
2012-09-18  8:05     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 03/24] ARM: ebsa110: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 04/24] ARM: ep93xx: " Arnd Bergmann
2012-09-14 22:14   ` Ryan Mallon
2012-09-15  7:55     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 05/24] ARM: imx: " Arnd Bergmann
2012-09-14 22:31   ` Fabio Estevam
2012-09-15 17:42     ` Arnd Bergmann
2012-09-16  7:21       ` Sascha Hauer
2012-09-14 21:34 ` [PATCH 06/24] ARM: integrator: " Arnd Bergmann
2012-09-16 22:19   ` Linus Walleij
2012-09-16 22:35     ` Russell King - ARM Linux
2012-09-16 22:46       ` Linus Walleij
2012-09-16 23:43         ` Russell King - ARM Linux
2012-09-14 21:34 ` [PATCH 07/24] ARM: iop13xx: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 08/24] ARM: iop32x: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 09/24] ARM: ixp4xx: " Arnd Bergmann
2012-09-18 10:31   ` Krzysztof Halasa
2012-09-18 19:22     ` Krzysztof Halasa
2012-09-19 13:52       ` Arnd Bergmann
2012-09-18 20:12   ` [PATCH 08+09/24] " Krzysztof Halasa
2012-09-18 21:25     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 10/24] ARM: ks8695: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 11/24] ARM: lpc32xx: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 12/24] ARM: msm: " Arnd Bergmann
2012-09-14 22:38   ` Stephen Boyd
2012-09-15  5:16     ` David Brown
2012-09-14 21:34 ` [PATCH 13/24] ARM: nomadik: " Arnd Bergmann
2012-09-16 22:24   ` Linus Walleij
2012-09-14 21:34 ` [PATCH 14/24] ARM: prima2: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 15/24] ARM: sa1100: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 16/24] ARM: spear13xx: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 17/24] ARM: OMAP: " Arnd Bergmann
2012-09-15 18:10   ` Tony Lindgren
2012-09-15 20:14     ` Arnd Bergmann
2012-09-16 20:38       ` Tony Lindgren
2012-09-17 21:25         ` Tony Lindgren
2012-09-19 13:35           ` Arnd Bergmann
2012-09-19 13:36             ` Felipe Balbi
2012-09-19 16:44               ` Tony Lindgren
2012-09-14 21:34 ` [PATCH 18/24] ARM: samsung: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 19/24] sh: " Arnd Bergmann
2012-09-18  7:37   ` Paul Mundt
2012-09-18  8:01     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 20/24] input: rpcmouse: " Arnd Bergmann
2012-09-19 17:06   ` Dmitry Torokhov
2012-09-14 21:34 ` [PATCH 21/24] serial: ks8695: " Arnd Bergmann
2012-09-14 23:44   ` Greg Kroah-Hartman
2012-09-14 21:34 ` [PATCH 22/24] scsi: eesox: " Arnd Bergmann
2012-09-14 23:27   ` Russell King - ARM Linux
2012-09-15  8:00     ` Arnd Bergmann
2012-09-15  8:57       ` Russell King - ARM Linux
2012-09-15 10:30         ` Arnd Bergmann
2012-09-17 22:03           ` Russell King - ARM Linux
2012-09-18  8:09             ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 23/24] video: da8xx-fb: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 24/24] net: seeq: " Arnd Bergmann
2012-09-14 23:56   ` Russell King - ARM Linux
2012-09-15  4:00     ` David Miller
2012-09-18  8:14       ` Arnd Bergmann
2012-09-15 11:33 ` [PATCH 13/24] ARM: nomadik: " Alessandro Rubini
2012-09-28 20:13   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5056D794.5000107@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).