linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Krzysztof Halasa <khc@pm.waw.pl>, Nicolas Pitre <nico@linaro.org>,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Imre Kaloz <kaloz@openwrt.org>, Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 09/24] ARM: ixp4xx: use __iomem pointers for MMIO
Date: Wed, 19 Sep 2012 13:52:27 +0000	[thread overview]
Message-ID: <201209191352.28034.arnd@arndb.de> (raw)
In-Reply-To: <m3ipbbdtlt.fsf@intrepid.localdomain>

On Tuesday 18 September 2012, Krzysztof Halasa wrote:
> Krzysztof Halasa <khc@pm.waw.pl> writes:
> 
> >> At the moment, this patch conflicts with other patches in linux-next,
> >> need to sort this out.
> >
> > Very nice, I will take care of these 3 patches.
> 
> I mean, just this one IXP4xx patch :-)

Ok. I just noticed that I made a mistake in splitting up the changes between
iop32x and ixp4xx. I've corrected this in my tree now and fixed the bug you
pointed out, see the new version below. I'm not completely sure how to
proceed with this. I noticed you have some patches in linux-next but haven't
sent any pull requests yet. The merge window is getting closer, so I'd
like to come to a conclusion with this.

	Arnd

8<----
>From 13ec32f47cb42cecc9cd262c307ef9377c601007 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 14 Sep 2012 20:19:40 +0000
Subject: [PATCH] ARM: ixp4xx: use __iomem pointers for MMIO

ARM is moving to stricter checks on readl/write functions,
so we need to use the correct types everywhere.

At the moment, this patch conflicts with other patches in linux-next,
need to sort this out.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index a9f8094..fdf91a1 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -53,24 +53,24 @@ static struct clock_event_device clockevent_ixp4xx;
  *************************************************************************/
 static struct map_desc ixp4xx_io_desc[] __initdata = {
 	{	/* UART, Interrupt ctrl, GPIO, timers, NPEs, MACs, USB .... */
-		.virtual	= IXP4XX_PERIPHERAL_BASE_VIRT,
+		.virtual	= (unsigned long)IXP4XX_PERIPHERAL_BASE_VIRT,
 		.pfn		= __phys_to_pfn(IXP4XX_PERIPHERAL_BASE_PHYS),
 		.length		= IXP4XX_PERIPHERAL_REGION_SIZE,
 		.type		= MT_DEVICE
 	}, {	/* Expansion Bus Config Registers */
-		.virtual	= IXP4XX_EXP_CFG_BASE_VIRT,
+		.virtual	= (unsigned long)IXP4XX_EXP_CFG_BASE_VIRT,
 		.pfn		= __phys_to_pfn(IXP4XX_EXP_CFG_BASE_PHYS),
 		.length		= IXP4XX_EXP_CFG_REGION_SIZE,
 		.type		= MT_DEVICE
 	}, {	/* PCI Registers */
-		.virtual	= IXP4XX_PCI_CFG_BASE_VIRT,
+		.virtual	= (unsigned long)IXP4XX_PCI_CFG_BASE_VIRT,
 		.pfn		= __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS),
 		.length		= IXP4XX_PCI_CFG_REGION_SIZE,
 		.type		= MT_DEVICE
 	},
 #ifdef CONFIG_DEBUG_LL
 	{	/* Debug UART mapping */
-		.virtual	= IXP4XX_DEBUG_UART_BASE_VIRT,
+		.virtual	= (unsigned long)IXP4XX_DEBUG_UART_BASE_VIRT,
 		.pfn		= __phys_to_pfn(IXP4XX_DEBUG_UART_BASE_PHYS),
 		.length		= IXP4XX_DEBUG_UART_REGION_SIZE,
 		.type		= MT_DEVICE
diff --git a/arch/arm/mach-ixp4xx/include/mach/cpu.h b/arch/arm/mach-ixp4xx/include/mach/cpu.h
index b2ef65d..ebc0ba3 100644
--- a/arch/arm/mach-ixp4xx/include/mach/cpu.h
+++ b/arch/arm/mach-ixp4xx/include/mach/cpu.h
@@ -14,6 +14,7 @@
 #ifndef __ASM_ARCH_CPU_H__
 #define __ASM_ARCH_CPU_H__
 
+#include <linux/io.h>
 #include <asm/cputype.h>
 
 /* Processor id value in CP15 Register 0 */
@@ -37,7 +38,7 @@
 
 static inline u32 ixp4xx_read_feature_bits(void)
 {
-	u32 val = ~*IXP4XX_EXP_CFG2;
+	u32 val = ~__raw_readl(IXP4XX_EXP_CFG2);
 
 	if (cpu_is_ixp42x_rev_a0())
 		return IXP42X_FEATURE_MASK & ~(IXP4XX_FEATURE_RCOMP |
@@ -51,7 +52,7 @@ static inline u32 ixp4xx_read_feature_bits(void)
 
 static inline void ixp4xx_write_feature_bits(u32 value)
 {
-	*IXP4XX_EXP_CFG2 = ~value;
+	__raw_writel(~value, IXP4XX_EXP_CFG2);
 }
 
 #endif  /* _ASM_ARCH_CPU_H */
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
index 97c530f..eb68b61 100644
--- a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
+++ b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
@@ -49,21 +49,21 @@
  * Expansion BUS Configuration registers
  */
 #define IXP4XX_EXP_CFG_BASE_PHYS	(0xC4000000)
-#define IXP4XX_EXP_CFG_BASE_VIRT	(0xFFBFE000)
+#define IXP4XX_EXP_CFG_BASE_VIRT	IOMEM(0xFFBFE000)
 #define IXP4XX_EXP_CFG_REGION_SIZE	(0x00001000)
 
 /*
  * PCI Config registers
  */
 #define IXP4XX_PCI_CFG_BASE_PHYS	(0xC0000000)
-#define	IXP4XX_PCI_CFG_BASE_VIRT	(0xFFBFF000)
+#define	IXP4XX_PCI_CFG_BASE_VIRT	IOMEM(0xFFBFF000)
 #define IXP4XX_PCI_CFG_REGION_SIZE	(0x00001000)
 
 /*
  * Peripheral space
  */
 #define IXP4XX_PERIPHERAL_BASE_PHYS	(0xC8000000)
-#define IXP4XX_PERIPHERAL_BASE_VIRT	(0xFFBEB000)
+#define IXP4XX_PERIPHERAL_BASE_VIRT	IOMEM(0xFFBEB000)
 #define IXP4XX_PERIPHERAL_REGION_SIZE	(0x00013000)
 
 /*
@@ -73,7 +73,7 @@
  * aligned so that it * can be used with the low-level debug code.
  */
 #define	IXP4XX_DEBUG_UART_BASE_PHYS	(0xC8000000)
-#define	IXP4XX_DEBUG_UART_BASE_VIRT	(0xffb00000)
+#define	IXP4XX_DEBUG_UART_BASE_VIRT	IOMEM(0xffb00000)
 #define	IXP4XX_DEBUG_UART_REGION_SIZE	(0x00001000)
 
 #define IXP4XX_EXP_CS0_OFFSET	0x00
@@ -92,7 +92,7 @@
 /*
  * Expansion Bus Controller registers.
  */
-#define IXP4XX_EXP_REG(x) ((volatile u32 *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
+#define IXP4XX_EXP_REG(x) ((volatile u32 __iomem *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
 
 #define IXP4XX_EXP_CS0      IXP4XX_EXP_REG(IXP4XX_EXP_CS0_OFFSET)
 #define IXP4XX_EXP_CS1      IXP4XX_EXP_REG(IXP4XX_EXP_CS1_OFFSET)

  reply	other threads:[~2012-09-19 13:52 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
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 [this message]
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=201209191352.28034.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=kaloz@openwrt.org \
    --cc=khc@pm.waw.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@linaro.org \
    --cc=olof@lixom.net \
    --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).