* [PATCH v3 01/30] usb: ohci-pxa27x: add explicit include of hardware.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap Rob Herring
` (28 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
ohci-pxa27x needs cpu_is_pxa3xx macro.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
---
drivers/usb/host/ohci-pxa27x.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 6313e44..4db399c 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -23,6 +23,7 @@
#include <linux/signal.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
+#include <mach/hardware.h>
#include <mach/ohci.h>
#include <mach/pxa3xx-u2d.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
2012-03-02 3:13 ` [PATCH v3 01/30] usb: ohci-pxa27x: add explicit include of hardware.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:21 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 03/30] ARM: imx: convert to common runtime ioremap hook Rob Herring
` (27 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
We have compile time over-ride of ioremap and iounmap, but an run-time
override is needed for multi-platform builds.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/include/asm/io.h | 8 ++++++--
arch/arm/mm/ioremap.c | 6 ++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 9275828..9bf9d00 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -264,9 +264,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
* Documentation/io-mapping.txt.
*
*/
+
+extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
+extern void (*arch_iounmap)(volatile void __iomem *);
+
#ifndef __arch_ioremap
-#define __arch_ioremap __arm_ioremap
-#define __arch_iounmap __iounmap
+#define __arch_ioremap arch_ioremap
+#define __arch_iounmap arch_iounmap
#endif
#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 80632e8..d164dea 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -314,6 +314,9 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
}
EXPORT_SYMBOL(__arm_ioremap);
+void __iomem * (*arch_ioremap)(unsigned long , size_t , unsigned int ) = __arm_ioremap;
+EXPORT_SYMBOL(arch_ioremap);
+
/*
* Remap an arbitrary physical address space into the kernel virtual
* address space as memory. Needed when the kernel wants to execute
@@ -370,3 +373,6 @@ void __iounmap(volatile void __iomem *io_addr)
vunmap(addr);
}
EXPORT_SYMBOL(__iounmap);
+
+void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
+EXPORT_SYMBOL(arch_iounmap);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap
2012-03-02 3:13 ` [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap Rob Herring
@ 2012-03-05 19:21 ` Nicolas Pitre
2012-03-05 20:13 ` Arnd Bergmann
0 siblings, 1 reply; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:21 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> We have compile time over-ride of ioremap and iounmap, but an run-time
> override is needed for multi-platform builds.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@linaro.org>
I was hoping that the number of platform requiring this would have been
small enough to just leave them with a compile time override and simply
keep them out of a multi-SOC kernel. But it looks like even some modern
architectures require this.
Given that the majority of existing platforms don't need the
indirection, should we make this indirection conditional on
CONFIG_NEED_IOREMAP_HOOK and let those who need it select it? Or maybe
this isn't performance critical and we just don't care? In any case I'd
like to see such reasoning captured in the commit log.
> ---
> arch/arm/include/asm/io.h | 8 ++++++--
> arch/arm/mm/ioremap.c | 6 ++++++
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 9275828..9bf9d00 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -264,9 +264,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
> * Documentation/io-mapping.txt.
> *
> */
> +
> +extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
> +extern void (*arch_iounmap)(volatile void __iomem *);
> +
> #ifndef __arch_ioremap
> -#define __arch_ioremap __arm_ioremap
> -#define __arch_iounmap __iounmap
> +#define __arch_ioremap arch_ioremap
> +#define __arch_iounmap arch_iounmap
> #endif
>
> #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
> diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
> index 80632e8..d164dea 100644
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -314,6 +314,9 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
> }
> EXPORT_SYMBOL(__arm_ioremap);
>
> +void __iomem * (*arch_ioremap)(unsigned long , size_t , unsigned int ) = __arm_ioremap;
> +EXPORT_SYMBOL(arch_ioremap);
> +
> /*
> * Remap an arbitrary physical address space into the kernel virtual
> * address space as memory. Needed when the kernel wants to execute
> @@ -370,3 +373,6 @@ void __iounmap(volatile void __iomem *io_addr)
> vunmap(addr);
> }
> EXPORT_SYMBOL(__iounmap);
> +
> +void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
> +EXPORT_SYMBOL(arch_iounmap);
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap
2012-03-05 19:21 ` Nicolas Pitre
@ 2012-03-05 20:13 ` Arnd Bergmann
2012-03-05 21:11 ` Nicolas Pitre
0 siblings, 1 reply; 67+ messages in thread
From: Arnd Bergmann @ 2012-03-05 20:13 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 05 March 2012, Nicolas Pitre wrote:
> Given that the majority of existing platforms don't need the
> indirection, should we make this indirection conditional on
> CONFIG_NEED_IOREMAP_HOOK and let those who need it select it? Or maybe
> this isn't performance critical and we just don't care? In any case I'd
> like to see such reasoning captured in the commit log.
It's certainly not performance critical, but there may be some space overhead
in the .text section of the kernel that we could avoid by adding another
indirection.
Arnd
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap
2012-03-05 20:13 ` Arnd Bergmann
@ 2012-03-05 21:11 ` Nicolas Pitre
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
` (2 more replies)
0 siblings, 3 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 21:11 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 5 Mar 2012, Arnd Bergmann wrote:
> On Monday 05 March 2012, Nicolas Pitre wrote:
> > Given that the majority of existing platforms don't need the
> > indirection, should we make this indirection conditional on
> > CONFIG_NEED_IOREMAP_HOOK and let those who need it select it? Or maybe
> > this isn't performance critical and we just don't care? In any case I'd
> > like to see such reasoning captured in the commit log.
>
> It's certainly not performance critical, but there may be some space overhead
> in the .text section of the kernel that we could avoid by adding another
> indirection.
Of course the size issue can be mitigated significantly by replacing:
extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
extern void (*arch_iounmap)(volatile void __iomem *);
#define __arch_ioremap arch_ioremap
#define __arch_iounmap arch_iounmap
by:
extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
extern void (*arch_iounmap)(volatile void __iomem *);
extern void __iomem * __arch_ioremap(unsigned long, size_t, unsigned int);
extern void __arch_iounmap(volatile void __iomem *);
and out of line:
void __iomem *__arch_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
{
return arch_ioremap(phys_addr, size, mtype);
}
void __arch_iounmap(volatile void __iomem *io_addr)
{
arch_iounmap(io_addr);
}
Nicolas
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v4 1/4] ARM: provide runtime hook for ioremap/iounmap
2012-03-05 21:11 ` Nicolas Pitre
@ 2012-03-06 4:02 ` Rob Herring
2012-03-06 4:02 ` [PATCH v4 2/4] ARM: imx: convert to common runtime ioremap hook Rob Herring
` (4 more replies)
2012-03-06 4:07 ` [PATCH v3 02/30] " Rob Herring
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
2 siblings, 5 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 4:02 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
We have compile time over-ride of ioremap and iounmap, but an run-time
override is needed for multi-platform builds. This adds an extra function
pointer check, but ioremap is not peformance critical. The option for
compile time selection remains.
The caller variant is used here to provide correct caller information as
ARM can only support level 0 for __builtin_return_address.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/include/asm/io.h | 7 ++++++-
arch/arm/mm/ioremap.c | 16 ++++++++++++++++
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 9275828..6c363c1 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
extern void __iounmap(volatile void __iomem *addr);
+extern void __arm_iounmap(volatile void __iomem *addr);
+
+extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+ unsigned int, void *);
+extern void (*arch_iounmap)(volatile void __iomem *);
/*
* Bad read/write accesses...
@@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
*/
#ifndef __arch_ioremap
#define __arch_ioremap __arm_ioremap
-#define __arch_iounmap __iounmap
+#define __arch_iounmap __arm_iounmap
#endif
#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 80632e8..c37c67a 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -306,9 +306,16 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
}
EXPORT_SYMBOL(__arm_ioremap_pfn);
+void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, unsigned int, void *);
+EXPORT_SYMBOL(arch_ioremap_caller);
+
void __iomem *
__arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
{
+ if (arch_ioremap_caller)
+ return arch_ioremap_caller(phys_addr, size, mtype,
+ __builtin_return_address(0));
+
return __arm_ioremap_caller(phys_addr, size, mtype,
__builtin_return_address(0));
}
@@ -370,3 +377,12 @@ void __iounmap(volatile void __iomem *io_addr)
vunmap(addr);
}
EXPORT_SYMBOL(__iounmap);
+
+void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
+EXPORT_SYMBOL(arch_iounmap);
+
+void __arm_iounmap(volatile void __iomem *io_addr)
+{
+ arch_iounmap(io_addr);
+}
+EXPORT_SYMBOL(__arm_iounmap);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v4 2/4] ARM: imx: convert to common runtime ioremap hook
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
@ 2012-03-06 4:02 ` Rob Herring
2012-03-06 4:02 ` [PATCH v4 3/4] ARM: msm: use " Rob Herring
` (3 subsequent siblings)
4 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 4:02 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert i.MX platforms to use the common run-time ioremap hook instead of
the imx specific hook.
Also, move addr_in_module out of io.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
---
arch/arm/mach-imx/mm-imx3.c | 10 +++++-----
arch/arm/plat-mxc/include/mach/hardware.h | 3 +++
arch/arm/plat-mxc/include/mach/io.h | 17 -----------------
3 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 8404ee7..04be18d 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -59,8 +59,8 @@ static void imx3_idle(void)
: "=r" (reg));
}
-static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
- unsigned int mtype)
+static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size,
+ unsigned int mtype, void *caller)
{
if (mtype == MT_DEVICE) {
/*
@@ -73,7 +73,7 @@ static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
mtype = MT_DEVICE_NONSHARED;
}
- return __arm_ioremap(phys_addr, size, mtype);
+ return __arm_ioremap_caller(phys_addr, size, mtype, caller);
}
void imx3_init_l2x0(void)
@@ -132,7 +132,7 @@ void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
- imx_ioremap = imx3_ioremap;
+ arch_ioremap_caller = imx3_ioremap_caller;
arm_pm_idle = imx3_idle;
}
@@ -196,7 +196,7 @@ void __init imx35_init_early(void)
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
arm_pm_idle = imx3_idle;
- imx_ioremap = imx3_ioremap;
+ arch_ioremap_caller = imx3_ioremap_caller;
}
void __init mx35_init_irq(void)
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index a599f01..ca06a68 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -28,6 +28,9 @@
#define IOMEM(addr) ((void __force __iomem *)(addr))
#endif
+#define addr_in_module(addr, mod) \
+ ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
+
#define IMX_IO_P2V_MODULE(addr, module) \
(((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \
(addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 338300b..ea9d95e 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,23 +14,6 @@
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff
-#define __arch_ioremap __imx_ioremap
-#define __arch_iounmap __iounmap
-
-#define addr_in_module(addr, mod) \
- ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
-
-extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
-
-static inline void __iomem *
-__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
-{
- if (imx_ioremap != NULL)
- return imx_ioremap(phys_addr, size, mtype);
- else
- return __arm_ioremap(phys_addr, size, mtype);
-}
-
/* io address mapping macro */
#define __io(a) __typesafe_io(a)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v4 3/4] ARM: msm: use runtime ioremap hook
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
2012-03-06 4:02 ` [PATCH v4 2/4] ARM: imx: convert to common runtime ioremap hook Rob Herring
@ 2012-03-06 4:02 ` Rob Herring
2012-03-06 20:59 ` David Brown
2012-03-06 4:03 ` [PATCH v4 4/4] ARM: iop13xx: " Rob Herring
` (2 subsequent siblings)
4 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-06 4:02 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert msm platforms to use run-time ioremap hook instead of the compile
time hook.
According to David Brown, only the msm7201 needed the ioremap hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: David Brown <davidb@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
---
arch/arm/mach-msm/board-halibut.c | 6 ++++++
arch/arm/mach-msm/board-trout.c | 6 ++++++
arch/arm/mach-msm/include/mach/io.h | 5 -----
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | 6 ++++++
arch/arm/mach-msm/io.c | 8 +++-----
5 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index a60ab6d..3698a37 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -68,6 +68,11 @@ static struct platform_device *devices[] __initdata = {
extern struct sys_timer msm_timer;
+static void __init halibut_init_early(void)
+{
+ arch_ioremap_caller = __msm_ioremap_caller;
+}
+
static void __init halibut_init_irq(void)
{
msm_init_irq();
@@ -96,6 +101,7 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
.atag_offset = 0x100,
.fixup = halibut_fixup,
.map_io = halibut_map_io,
+ .init_early = halibut_init_early,
.init_irq = halibut_init_irq,
.init_machine = halibut_init,
.timer = &msm_timer,
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 6b9b227..5414f76 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -43,6 +43,11 @@ static struct platform_device *devices[] __initdata = {
extern struct sys_timer msm_timer;
+static void __init trout_init_early(void)
+{
+ arch_ioremap_caller = __msm_ioremap_caller;
+}
+
static void __init trout_init_irq(void)
{
msm_init_irq();
@@ -96,6 +101,7 @@ MACHINE_START(TROUT, "HTC Dream")
.atag_offset = 0x100,
.fixup = trout_fixup,
.map_io = trout_map_io,
+ .init_early = trout_init_early,
.init_irq = trout_init_irq,
.init_machine = trout_init,
.timer = &msm_timer,
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
index dc1b928..c6ff9bb 100644
--- a/arch/arm/mach-msm/include/mach/io.h
+++ b/arch/arm/mach-msm/include/mach/io.h
@@ -18,11 +18,6 @@
#define IO_SPACE_LIMIT 0xffffffff
-#define __arch_ioremap __msm_ioremap
-#define __arch_iounmap __iounmap
-
-void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype);
-
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
index 8af4612..152b3b7 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
@@ -111,5 +111,11 @@
#define MSM_AD5_PHYS 0xAC000000
#define MSM_AD5_SIZE (SZ_1M*13)
+#ifndef __ASSEMBLY__
+
+extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+ unsigned int mtype, void *caller);
+
+#endif
#endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 578b04e..a1e7b11 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -172,8 +172,8 @@ void __init msm_map_msm7x30_io(void)
}
#endif /* CONFIG_ARCH_MSM7X30 */
-void __iomem *
-__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
+void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+ unsigned int mtype, void *caller)
{
if (mtype == MT_DEVICE) {
/* The peripherals in the 88000000 - D0000000 range
@@ -184,7 +184,5 @@ __msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
mtype = MT_DEVICE_NONSHARED;
}
- return __arm_ioremap_caller(phys_addr, size, mtype,
- __builtin_return_address(0));
+ return __arm_ioremap_caller(phys_addr, size, mtype, caller);
}
-EXPORT_SYMBOL(__msm_ioremap);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v4 3/4] ARM: msm: use runtime ioremap hook
2012-03-06 4:02 ` [PATCH v4 3/4] ARM: msm: use " Rob Herring
@ 2012-03-06 20:59 ` David Brown
2012-03-06 21:10 ` Rob Herring
0 siblings, 1 reply; 67+ messages in thread
From: David Brown @ 2012-03-06 20:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Mar 05, 2012 at 10:02:59PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Convert msm platforms to use run-time ioremap hook instead of the compile
> time hook.
>
> According to David Brown, only the msm7201 needed the ioremap hook.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Tested-by: David Brown <davidb@codeaurora.org>
> Acked-by: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Bryan Huntsman <bryanh@codeaurora.org>
This still is working on 8660.
BTW, I'm not able to cleanly apply the IMX patches. What tree are you
basing that off of?
Thanks,
David
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v4 3/4] ARM: msm: use runtime ioremap hook
2012-03-06 20:59 ` David Brown
@ 2012-03-06 21:10 ` Rob Herring
0 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:10 UTC (permalink / raw)
To: linux-arm-kernel
On 03/06/2012 02:59 PM, David Brown wrote:
> On Mon, Mar 05, 2012 at 10:02:59PM -0600, Rob Herring wrote:
>> From: Rob Herring <rob.herring@calxeda.com>
>>
>> Convert msm platforms to use run-time ioremap hook instead of the compile
>> time hook.
>>
>> According to David Brown, only the msm7201 needed the ioremap hook.
>>
>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>> Tested-by: David Brown <davidb@codeaurora.org>
>> Acked-by: David Brown <davidb@codeaurora.org>
>> Cc: Daniel Walker <dwalker@fifo99.com>
>> Cc: Bryan Huntsman <bryanh@codeaurora.org>
>
> This still is working on 8660.
>
> BTW, I'm not able to cleanly apply the IMX patches. What tree are you
> basing that off of?
>
That would be the restart clean-up branch which I don't need, but the
at91 and omap clean-up branches I'm based on have pulled that branch in.
Rob
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v4 4/4] ARM: iop13xx: use runtime ioremap hook
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
2012-03-06 4:02 ` [PATCH v4 2/4] ARM: imx: convert to common runtime ioremap hook Rob Herring
2012-03-06 4:02 ` [PATCH v4 3/4] ARM: msm: use " Rob Herring
@ 2012-03-06 4:03 ` Rob Herring
2012-03-06 16:53 ` [PATCH v4 1/4] ARM: provide runtime hook for ioremap/iounmap Arnd Bergmann
2012-03-06 17:18 ` Nicolas Pitre
4 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 4:03 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert iop13xx platforms to use run-time ioremap hook instead of the
compile time hook. The custom ioremap is still needed for 64-bit address
handling.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/mach-iop13xx/include/mach/io.h | 7 -------
arch/arm/mach-iop13xx/io.c | 18 ++++++++++--------
arch/arm/mach-iop13xx/iq81340mc.c | 1 +
arch/arm/mach-iop13xx/iq81340sc.c | 1 +
4 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index dffb234..2a69fc0 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -26,16 +26,9 @@
#define __mem_isa(a) (a)
extern void __iomem * __iop13xx_io(unsigned long io_addr);
-extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
- unsigned int mtype);
-extern void __iop13xx_iounmap(void __iomem *addr);
-
extern u32 iop13xx_atue_mem_base;
extern u32 iop13xx_atux_mem_base;
extern size_t iop13xx_atue_mem_size;
extern size_t iop13xx_atux_mem_size;
-#define __arch_ioremap __iop13xx_ioremap
-#define __arch_iounmap __iop13xx_iounmap
-
#endif
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 48642e6..6dd5b49 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -40,8 +40,8 @@ void * __iomem __iop13xx_io(unsigned long io_addr)
}
EXPORT_SYMBOL(__iop13xx_io);
-void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
- unsigned int mtype)
+static void __iomem *__iop13xx_ioremap_caller(unsigned long cookie,
+ size_t size, unsigned int mtype, void *caller)
{
void __iomem * retval;
@@ -76,17 +76,14 @@ void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
break;
default:
retval = __arm_ioremap_caller(cookie, size, mtype,
- __builtin_return_address(0));
+ caller);
}
return retval;
}
-EXPORT_SYMBOL(__iop13xx_ioremap);
-void __iop13xx_iounmap(void __iomem *addr)
+static void __iop13xx_iounmap(volatile void __iomem *addr)
{
- extern void __iounmap(volatile void __iomem *addr);
-
if (iop13xx_atue_mem_base)
if (addr >= (void __iomem *) iop13xx_atue_mem_base &&
addr < (void __iomem *) (iop13xx_atue_mem_base +
@@ -110,4 +107,9 @@ void __iop13xx_iounmap(void __iomem *addr)
skip:
return;
}
-EXPORT_SYMBOL(__iop13xx_iounmap);
+
+void __init iop13xx_init_early(void)
+{
+ arch_ioremap_caller = __iop13xx_ioremap_caller;
+ arch_iounmap = __iop13xx_iounmap;
+}
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index abaee88..5c96b73 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -92,6 +92,7 @@ static struct sys_timer iq81340mc_timer = {
MACHINE_START(IQ81340MC, "Intel IQ81340MC")
/* Maintainer: Dan Williams <dan.j.williams@intel.com> */
.atag_offset = 0x100,
+ .init_early = iop13xx_init_early,
.map_io = iop13xx_map_io,
.init_irq = iop13xx_init_irq,
.timer = &iq81340mc_timer,
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index 690916a..aa4dd75 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -94,6 +94,7 @@ static struct sys_timer iq81340sc_timer = {
MACHINE_START(IQ81340SC, "Intel IQ81340SC")
/* Maintainer: Dan Williams <dan.j.williams@intel.com> */
.atag_offset = 0x100,
+ .init_early = iop13xx_init_early,
.map_io = iop13xx_map_io,
.init_irq = iop13xx_init_irq,
.timer = &iq81340sc_timer,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v4 1/4] ARM: provide runtime hook for ioremap/iounmap
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
` (2 preceding siblings ...)
2012-03-06 4:03 ` [PATCH v4 4/4] ARM: iop13xx: " Rob Herring
@ 2012-03-06 16:53 ` Arnd Bergmann
2012-03-06 17:18 ` Nicolas Pitre
4 siblings, 0 replies; 67+ messages in thread
From: Arnd Bergmann @ 2012-03-06 16:53 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 06 March 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> We have compile time over-ride of ioremap and iounmap, but an run-time
> override is needed for multi-platform builds. This adds an extra function
> pointer check, but ioremap is not peformance critical. The option for
> compile time selection remains.
>
> The caller variant is used here to provide correct caller information as
> ARM can only support level 0 for __builtin_return_address.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
Very nice!
Just one small comment:
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -306,9 +306,16 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
> }
> EXPORT_SYMBOL(__arm_ioremap_pfn);
>
> +void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, unsigned int, void *);
> +EXPORT_SYMBOL(arch_ioremap_caller);
> +
> void __iomem *
> __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
> {
> + if (arch_ioremap_caller)
> + return arch_ioremap_caller(phys_addr, size, mtype,
> + __builtin_return_address(0));
> +
> return __arm_ioremap_caller(phys_addr, size, mtype,
> __builtin_return_address(0));
> }
> @@ -370,3 +377,12 @@ void __iounmap(volatile void __iomem *io_addr)
> vunmap(addr);
> }
> EXPORT_SYMBOL(__iounmap);
> +
> +void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
> +EXPORT_SYMBOL(arch_iounmap);
> +
> +void __arm_iounmap(volatile void __iomem *io_addr)
> +{
> + arch_iounmap(io_addr);
> +}
> +EXPORT_SYMBOL(__arm_iounmap);
The EXPORT_SYMBOL() statements for arch_ioremap_caller and arch_iounmap
seem to be leftover from a previous version of this patch and can be removed
now. Other than that:
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v4 1/4] ARM: provide runtime hook for ioremap/iounmap
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
` (3 preceding siblings ...)
2012-03-06 16:53 ` [PATCH v4 1/4] ARM: provide runtime hook for ioremap/iounmap Arnd Bergmann
@ 2012-03-06 17:18 ` Nicolas Pitre
4 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-06 17:18 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 5 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> We have compile time over-ride of ioremap and iounmap, but an run-time
> override is needed for multi-platform builds. This adds an extra function
> pointer check, but ioremap is not peformance critical. The option for
> compile time selection remains.
>
> The caller variant is used here to provide correct caller information as
> ARM can only support level 0 for __builtin_return_address.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> ---
[...]
> index 80632e8..c37c67a 100644
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -306,9 +306,16 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
> }
> EXPORT_SYMBOL(__arm_ioremap_pfn);
>
> +void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, unsigned int, void *);
> +EXPORT_SYMBOL(arch_ioremap_caller);
We don't want modules to mess with this, so the export can go.
> void __iomem *
> __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
> {
> + if (arch_ioremap_caller)
> + return arch_ioremap_caller(phys_addr, size, mtype,
> + __builtin_return_address(0));
> +
> return __arm_ioremap_caller(phys_addr, size, mtype,
> __builtin_return_address(0));
Why not initializing arch_ioremap_caller with __arm_ioremap_caller like
the iounmap case? That would remove the need for a runtime test.
> @@ -370,3 +377,12 @@ void __iounmap(volatile void __iomem *io_addr)
> vunmap(addr);
> }
> EXPORT_SYMBOL(__iounmap);
> +
> +void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
> +EXPORT_SYMBOL(arch_iounmap);
Same comment as above about the export.
> +void __arm_iounmap(volatile void __iomem *io_addr)
> +{
> + arch_iounmap(io_addr);
> +}
> +EXPORT_SYMBOL(__arm_iounmap);
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap
2012-03-05 21:11 ` Nicolas Pitre
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
@ 2012-03-06 4:07 ` Rob Herring
2012-03-06 17:20 ` Nicolas Pitre
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
2 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-06 4:07 UTC (permalink / raw)
To: linux-arm-kernel
On 03/05/2012 03:11 PM, Nicolas Pitre wrote:
> On Mon, 5 Mar 2012, Arnd Bergmann wrote:
>
>> On Monday 05 March 2012, Nicolas Pitre wrote:
>>> Given that the majority of existing platforms don't need the
>>> indirection, should we make this indirection conditional on
>>> CONFIG_NEED_IOREMAP_HOOK and let those who need it select it? Or maybe
>>> this isn't performance critical and we just don't care? In any case I'd
>>> like to see such reasoning captured in the commit log.
>>
>> It's certainly not performance critical, but there may be some space overhead
>> in the .text section of the kernel that we could avoid by adding another
>> indirection.
>
> Of course the size issue can be mitigated significantly by replacing:
>
> extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
> extern void (*arch_iounmap)(volatile void __iomem *);
>
> #define __arch_ioremap arch_ioremap
> #define __arch_iounmap arch_iounmap
>
> by:
>
> extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int);
> extern void (*arch_iounmap)(volatile void __iomem *);
>
> extern void __iomem * __arch_ioremap(unsigned long, size_t, unsigned int);
> extern void __arch_iounmap(volatile void __iomem *);
>
> and out of line:
>
> void __iomem *__arch_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
> {
> return arch_ioremap(phys_addr, size, mtype);
> }
>
> void __arch_iounmap(volatile void __iomem *io_addr)
> {
> arch_iounmap(io_addr);
> }
This doesn't quite work if we keep the compile time option, but I came
up with something that accomplishes the same thing.
There's not much point in converting ixp4xx and ebsa110 to runtime hooks
as they still have other io.h needs.
Rob
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v5 1/7] ARM: provide runtime hook for ioremap/iounmap
2012-03-05 21:11 ` Nicolas Pitre
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
2012-03-06 4:07 ` [PATCH v3 02/30] " Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 21:45 ` [PATCH v5 2/7] ARM: imx: convert to common runtime ioremap hook Rob Herring
` (6 more replies)
2 siblings, 7 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
We have compile time over-ride of ioremap and iounmap, but an run-time
override is needed for multi-platform builds. This adds an extra function
pointer check, but ioremap is not peformance critical. The option for
compile time selection remains.
The caller variant is used here to provide correct caller information as
ARM can only support level 0 for __builtin_return_address.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/include/asm/io.h | 7 ++++++-
arch/arm/mm/ioremap.c | 17 ++++++++++++++---
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 9275828..6c363c1 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
extern void __iounmap(volatile void __iomem *addr);
+extern void __arm_iounmap(volatile void __iomem *addr);
+
+extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+ unsigned int, void *);
+extern void (*arch_iounmap)(volatile void __iomem *);
/*
* Bad read/write accesses...
@@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
*/
#ifndef __arch_ioremap
#define __arch_ioremap __arm_ioremap
-#define __arch_iounmap __iounmap
+#define __arch_iounmap __arm_iounmap
#endif
#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 80632e8..0246290 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -306,11 +306,15 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
}
EXPORT_SYMBOL(__arm_ioremap_pfn);
+void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+ unsigned int, void *) =
+ __arm_ioremap_caller;
+
void __iomem *
__arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
{
- return __arm_ioremap_caller(phys_addr, size, mtype,
- __builtin_return_address(0));
+ return arch_ioremap_caller(phys_addr, size, mtype,
+ __builtin_return_address(0));
}
EXPORT_SYMBOL(__arm_ioremap);
@@ -369,4 +373,11 @@ void __iounmap(volatile void __iomem *io_addr)
vunmap(addr);
}
-EXPORT_SYMBOL(__iounmap);
+
+void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
+
+void __arm_iounmap(volatile void __iomem *io_addr)
+{
+ arch_iounmap(io_addr);
+}
+EXPORT_SYMBOL(__arm_iounmap);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 2/7] ARM: imx: convert to common runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 21:45 ` [PATCH v5 3/7] ARM: msm: use " Rob Herring
` (5 subsequent siblings)
6 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert i.MX platforms to use the common run-time ioremap hook instead of
the imx specific hook.
Also, move addr_in_module out of io.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
---
arch/arm/mach-imx/mm-imx3.c | 10 +++++-----
arch/arm/plat-mxc/include/mach/hardware.h | 3 +++
arch/arm/plat-mxc/include/mach/io.h | 17 -----------------
3 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 8404ee7..04be18d 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -59,8 +59,8 @@ static void imx3_idle(void)
: "=r" (reg));
}
-static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
- unsigned int mtype)
+static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size,
+ unsigned int mtype, void *caller)
{
if (mtype == MT_DEVICE) {
/*
@@ -73,7 +73,7 @@ static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
mtype = MT_DEVICE_NONSHARED;
}
- return __arm_ioremap(phys_addr, size, mtype);
+ return __arm_ioremap_caller(phys_addr, size, mtype, caller);
}
void imx3_init_l2x0(void)
@@ -132,7 +132,7 @@ void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
- imx_ioremap = imx3_ioremap;
+ arch_ioremap_caller = imx3_ioremap_caller;
arm_pm_idle = imx3_idle;
}
@@ -196,7 +196,7 @@ void __init imx35_init_early(void)
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
arm_pm_idle = imx3_idle;
- imx_ioremap = imx3_ioremap;
+ arch_ioremap_caller = imx3_ioremap_caller;
}
void __init mx35_init_irq(void)
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index a599f01..ca06a68 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -28,6 +28,9 @@
#define IOMEM(addr) ((void __force __iomem *)(addr))
#endif
+#define addr_in_module(addr, mod) \
+ ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
+
#define IMX_IO_P2V_MODULE(addr, module) \
(((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \
(addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 338300b..ea9d95e 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,23 +14,6 @@
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff
-#define __arch_ioremap __imx_ioremap
-#define __arch_iounmap __iounmap
-
-#define addr_in_module(addr, mod) \
- ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
-
-extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
-
-static inline void __iomem *
-__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
-{
- if (imx_ioremap != NULL)
- return imx_ioremap(phys_addr, size, mtype);
- else
- return __arm_ioremap(phys_addr, size, mtype);
-}
-
/* io address mapping macro */
#define __io(a) __typesafe_io(a)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 3/7] ARM: msm: use runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
2012-03-06 21:45 ` [PATCH v5 2/7] ARM: imx: convert to common runtime ioremap hook Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 21:45 ` [PATCH v5 4/7] ARM: iop13xx: " Rob Herring
` (4 subsequent siblings)
6 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert msm platforms to use run-time ioremap hook instead of the compile
time hook.
According to David Brown, only the msm7201 needed the ioremap hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: David Brown <davidb@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
---
arch/arm/mach-msm/board-halibut.c | 6 ++++++
arch/arm/mach-msm/board-trout.c | 6 ++++++
arch/arm/mach-msm/include/mach/io.h | 5 -----
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | 6 ++++++
arch/arm/mach-msm/io.c | 8 +++-----
5 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index a60ab6d..3698a37 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -68,6 +68,11 @@ static struct platform_device *devices[] __initdata = {
extern struct sys_timer msm_timer;
+static void __init halibut_init_early(void)
+{
+ arch_ioremap_caller = __msm_ioremap_caller;
+}
+
static void __init halibut_init_irq(void)
{
msm_init_irq();
@@ -96,6 +101,7 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
.atag_offset = 0x100,
.fixup = halibut_fixup,
.map_io = halibut_map_io,
+ .init_early = halibut_init_early,
.init_irq = halibut_init_irq,
.init_machine = halibut_init,
.timer = &msm_timer,
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 6b9b227..5414f76 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -43,6 +43,11 @@ static struct platform_device *devices[] __initdata = {
extern struct sys_timer msm_timer;
+static void __init trout_init_early(void)
+{
+ arch_ioremap_caller = __msm_ioremap_caller;
+}
+
static void __init trout_init_irq(void)
{
msm_init_irq();
@@ -96,6 +101,7 @@ MACHINE_START(TROUT, "HTC Dream")
.atag_offset = 0x100,
.fixup = trout_fixup,
.map_io = trout_map_io,
+ .init_early = trout_init_early,
.init_irq = trout_init_irq,
.init_machine = trout_init,
.timer = &msm_timer,
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
index dc1b928..c6ff9bb 100644
--- a/arch/arm/mach-msm/include/mach/io.h
+++ b/arch/arm/mach-msm/include/mach/io.h
@@ -18,11 +18,6 @@
#define IO_SPACE_LIMIT 0xffffffff
-#define __arch_ioremap __msm_ioremap
-#define __arch_iounmap __iounmap
-
-void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype);
-
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
index 8af4612..152b3b7 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
@@ -111,5 +111,11 @@
#define MSM_AD5_PHYS 0xAC000000
#define MSM_AD5_SIZE (SZ_1M*13)
+#ifndef __ASSEMBLY__
+
+extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+ unsigned int mtype, void *caller);
+
+#endif
#endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 578b04e..a1e7b11 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -172,8 +172,8 @@ void __init msm_map_msm7x30_io(void)
}
#endif /* CONFIG_ARCH_MSM7X30 */
-void __iomem *
-__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
+void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
+ unsigned int mtype, void *caller)
{
if (mtype == MT_DEVICE) {
/* The peripherals in the 88000000 - D0000000 range
@@ -184,7 +184,5 @@ __msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
mtype = MT_DEVICE_NONSHARED;
}
- return __arm_ioremap_caller(phys_addr, size, mtype,
- __builtin_return_address(0));
+ return __arm_ioremap_caller(phys_addr, size, mtype, caller);
}
-EXPORT_SYMBOL(__msm_ioremap);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 4/7] ARM: iop13xx: use runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
2012-03-06 21:45 ` [PATCH v5 2/7] ARM: imx: convert to common runtime ioremap hook Rob Herring
2012-03-06 21:45 ` [PATCH v5 3/7] ARM: msm: use " Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 21:45 ` [PATCH v5 5/7] ARM: ixp4xx: " Rob Herring
` (3 subsequent siblings)
6 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert iop13xx platforms to use run-time ioremap hook instead of the
compile time hook. The custom ioremap is still needed for 64-bit address
handling.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/mach-iop13xx/include/mach/io.h | 7 -------
arch/arm/mach-iop13xx/io.c | 18 ++++++++++--------
arch/arm/mach-iop13xx/iq81340mc.c | 1 +
arch/arm/mach-iop13xx/iq81340sc.c | 1 +
4 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index dffb234..2a69fc0 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -26,16 +26,9 @@
#define __mem_isa(a) (a)
extern void __iomem * __iop13xx_io(unsigned long io_addr);
-extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
- unsigned int mtype);
-extern void __iop13xx_iounmap(void __iomem *addr);
-
extern u32 iop13xx_atue_mem_base;
extern u32 iop13xx_atux_mem_base;
extern size_t iop13xx_atue_mem_size;
extern size_t iop13xx_atux_mem_size;
-#define __arch_ioremap __iop13xx_ioremap
-#define __arch_iounmap __iop13xx_iounmap
-
#endif
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 48642e6..6dd5b49 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -40,8 +40,8 @@ void * __iomem __iop13xx_io(unsigned long io_addr)
}
EXPORT_SYMBOL(__iop13xx_io);
-void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
- unsigned int mtype)
+static void __iomem *__iop13xx_ioremap_caller(unsigned long cookie,
+ size_t size, unsigned int mtype, void *caller)
{
void __iomem * retval;
@@ -76,17 +76,14 @@ void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
break;
default:
retval = __arm_ioremap_caller(cookie, size, mtype,
- __builtin_return_address(0));
+ caller);
}
return retval;
}
-EXPORT_SYMBOL(__iop13xx_ioremap);
-void __iop13xx_iounmap(void __iomem *addr)
+static void __iop13xx_iounmap(volatile void __iomem *addr)
{
- extern void __iounmap(volatile void __iomem *addr);
-
if (iop13xx_atue_mem_base)
if (addr >= (void __iomem *) iop13xx_atue_mem_base &&
addr < (void __iomem *) (iop13xx_atue_mem_base +
@@ -110,4 +107,9 @@ void __iop13xx_iounmap(void __iomem *addr)
skip:
return;
}
-EXPORT_SYMBOL(__iop13xx_iounmap);
+
+void __init iop13xx_init_early(void)
+{
+ arch_ioremap_caller = __iop13xx_ioremap_caller;
+ arch_iounmap = __iop13xx_iounmap;
+}
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index abaee88..5c96b73 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -92,6 +92,7 @@ static struct sys_timer iq81340mc_timer = {
MACHINE_START(IQ81340MC, "Intel IQ81340MC")
/* Maintainer: Dan Williams <dan.j.williams@intel.com> */
.atag_offset = 0x100,
+ .init_early = iop13xx_init_early,
.map_io = iop13xx_map_io,
.init_irq = iop13xx_init_irq,
.timer = &iq81340mc_timer,
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index 690916a..aa4dd75 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -94,6 +94,7 @@ static struct sys_timer iq81340sc_timer = {
MACHINE_START(IQ81340SC, "Intel IQ81340SC")
/* Maintainer: Dan Williams <dan.j.williams@intel.com> */
.atag_offset = 0x100,
+ .init_early = iop13xx_init_early,
.map_io = iop13xx_map_io,
.init_irq = iop13xx_init_irq,
.timer = &iq81340sc_timer,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 5/7] ARM: ixp4xx: use runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
` (2 preceding siblings ...)
2012-03-06 21:45 ` [PATCH v5 4/7] ARM: iop13xx: " Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 22:11 ` Russell King - ARM Linux
2012-03-06 21:45 ` [PATCH v5 6/7] ARM: ebsa110: " Rob Herring
` (2 subsequent siblings)
6 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert ixp4xx platforms to use run-time ioremap hook instead of the
compile time hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
---
arch/arm/mach-ixp4xx/avila-setup.c | 2 +
arch/arm/mach-ixp4xx/common.c | 33 ++++++++++++++++++++++++++
arch/arm/mach-ixp4xx/coyote-setup.c | 2 +
arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 +
arch/arm/mach-ixp4xx/fsg-setup.c | 1 +
arch/arm/mach-ixp4xx/gateway7001-setup.c | 1 +
arch/arm/mach-ixp4xx/goramo_mlr.c | 1 +
arch/arm/mach-ixp4xx/gtwx5715-setup.c | 1 +
arch/arm/mach-ixp4xx/include/mach/io.h | 18 --------------
arch/arm/mach-ixp4xx/include/mach/platform.h | 1 +
arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 +++
arch/arm/mach-ixp4xx/nas100d-setup.c | 1 +
arch/arm/mach-ixp4xx/nslu2-setup.c | 1 +
arch/arm/mach-ixp4xx/omixp-setup.c | 3 ++
arch/arm/mach-ixp4xx/vulcan-setup.c | 1 +
arch/arm/mach-ixp4xx/wg302v2-setup.c | 1 +
16 files changed, 54 insertions(+), 18 deletions(-)
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
index a7277ad..90e42e9 100644
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -165,6 +165,7 @@ static void __init avila_init(void)
MACHINE_START(AVILA, "Gateworks Avila Network Platform")
/* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
@@ -184,6 +185,7 @@ MACHINE_END
MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
/* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index a6329a0..c60e7b8 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -31,6 +31,7 @@
#include <mach/udc.h>
#include <mach/hardware.h>
+#include <mach/io.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/page.h>
@@ -517,3 +518,35 @@ void ixp4xx_restart(char mode, const char *cmd)
*IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
}
}
+
+#ifdef CONFIG_IXP4XX_INDIRECT_PCI
+/*
+ * In the case of using indirect PCI, we simply return the actual PCI
+ * address and our read/write implementation use that to drive the
+ * access registers. If something outside of PCI is ioremap'd, we
+ * fallback to the default.
+ */
+
+static void __iomem *ixp4xx_ioremap_caller(unsigned long addr, size_t size,
+ unsigned int mtype, void *caller)
+{
+ if (!is_pci_memory(addr))
+ return __arm_ioremap_caller(addr, size, mtype, caller);
+
+ return (void __iomem *)addr;
+}
+
+static void ixp4xx_iounmap(void __iomem *addr)
+{
+ if (!is_pci_memory((__force u32)addr))
+ __iounmap(addr);
+}
+
+void __init ixp4xx_init_early(void)
+{
+ arch_ioremap_caller = ixp4xx_ioremap_caller;
+ arch_iounmap = ixp4xx_iounmap;
+}
+#else
+void __init ixp4xx_init_early(void) {}
+#endif
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index a74f86c..1b83110 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -110,6 +110,7 @@ static void __init coyote_init(void)
MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
/* Maintainer: MontaVista Software, Inc. */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
@@ -129,6 +130,7 @@ MACHINE_END
MACHINE_START(IXDPG425, "Intel IXDPG425")
/* Maintainer: MontaVista Software, Inc. */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index 67be177..97a0af8 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -280,6 +280,7 @@ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
/* Maintainer: www.nslu2-linux.org */
.atag_offset = 0x100,
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &dsmg600_timer,
.init_machine = dsmg600_init,
diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
index 6d58182..9175a25 100644
--- a/arch/arm/mach-ixp4xx/fsg-setup.c
+++ b/arch/arm/mach-ixp4xx/fsg-setup.c
@@ -270,6 +270,7 @@ static void __init fsg_init(void)
MACHINE_START(FSG, "Freecom FSG-3")
/* Maintainer: www.nslu2-linux.org */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
index 7ecf9b2..033c717 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -97,6 +97,7 @@ static void __init gateway7001_init(void)
MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
/* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c
index c0e3d69..0dda8f6 100644
--- a/arch/arm/mach-ixp4xx/goramo_mlr.c
+++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
@@ -497,6 +497,7 @@ subsys_initcall(gmlr_pci_init);
MACHINE_START(GORAMO_MLR, "MultiLink")
/* Maintainer: Krzysztof Halasa */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index a23f893..18ebc6b 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -165,6 +165,7 @@ static void __init gtwx5715_init(void)
MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
/* Maintainer: George Joseph */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index ffb9d6a..6a52076 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -57,24 +57,6 @@ static inline int is_pci_memory(u32 addr)
return (addr >= PCIBIOS_MIN_MEM) && (addr <= 0x4FFFFFFF);
}
-static inline void __iomem * __indirect_ioremap(unsigned long addr, size_t size,
- unsigned int mtype)
-{
- if (!is_pci_memory(addr))
- return __arm_ioremap(addr, size, mtype);
-
- return (void __iomem *)addr;
-}
-
-static inline void __indirect_iounmap(void __iomem *addr)
-{
- if (!is_pci_memory((__force u32)addr))
- __iounmap(addr);
-}
-
-#define __arch_ioremap __indirect_ioremap
-#define __arch_iounmap __indirect_iounmap
-
#define writeb(v, p) __indirect_writeb(v, p)
#define writew(v, p) __indirect_writew(v, p)
#define writel(v, p) __indirect_writel(v, p)
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h
index df9250b..b66bedc 100644
--- a/arch/arm/mach-ixp4xx/include/mach/platform.h
+++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
@@ -121,6 +121,7 @@ extern unsigned long ixp4xx_timer_freq;
* Functions used by platform-level setup code
*/
extern void ixp4xx_map_io(void);
+extern void ixp4xx_init_early(void);
extern void ixp4xx_init_irq(void);
extern void ixp4xx_sys_init(void);
extern void ixp4xx_timer_init(void);
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 8a38b39..3d742ae 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -254,6 +254,7 @@ static void __init ixdp425_init(void)
MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
/* Maintainer: MontaVista Software, Inc. */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
@@ -269,6 +270,7 @@ MACHINE_END
MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
/* Maintainer: MontaVista Software, Inc. */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
@@ -283,6 +285,7 @@ MACHINE_END
MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
/* Maintainer: MontaVista Software, Inc. */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
@@ -297,6 +300,7 @@ MACHINE_END
MACHINE_START(KIXRP435, "Intel KIXRP435 Reference Platform")
/* Maintainer: MontaVista Software, Inc. */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 1010eb7..33cb095 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -315,6 +315,7 @@ MACHINE_START(NAS100D, "Iomega NAS 100d")
/* Maintainer: www.nslu2-linux.org */
.atag_offset = 0x100,
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.init_machine = nas100d_init,
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index aa355c3..e2903fa 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -301,6 +301,7 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
/* Maintainer: www.nslu2-linux.org */
.atag_offset = 0x100,
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &nslu2_timer,
.init_machine = nslu2_init,
diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c
index 0940869..158ddb7 100644
--- a/arch/arm/mach-ixp4xx/omixp-setup.c
+++ b/arch/arm/mach-ixp4xx/omixp-setup.c
@@ -243,6 +243,7 @@ static void __init omixp_init(void)
MACHINE_START(DEVIXP, "Omicron DEVIXP")
.atag_offset = 0x100,
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.init_machine = omixp_init,
@@ -254,6 +255,7 @@ MACHINE_END
MACHINE_START(MICCPT, "Omicron MICCPT")
.atag_offset = 0x100,
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.init_machine = omixp_init,
@@ -268,6 +270,7 @@ MACHINE_END
MACHINE_START(MIC256, "Omicron MIC256")
.atag_offset = 0x100,
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.init_machine = omixp_init,
diff --git a/arch/arm/mach-ixp4xx/vulcan-setup.c b/arch/arm/mach-ixp4xx/vulcan-setup.c
index 9dec206..2798f43 100644
--- a/arch/arm/mach-ixp4xx/vulcan-setup.c
+++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
@@ -237,6 +237,7 @@ static void __init vulcan_init(void)
MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan")
/* Maintainer: Marc Zyngier <maz@misterjones.org> */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
index 5ac0f0a..a785175 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -98,6 +98,7 @@ static void __init wg302v2_init(void)
MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
/* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
.map_io = ixp4xx_map_io,
+ .init_early = ixp4xx_init_early,
.init_irq = ixp4xx_init_irq,
.timer = &ixp4xx_timer,
.atag_offset = 0x100,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 5/7] ARM: ixp4xx: use runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 5/7] ARM: ixp4xx: " Rob Herring
@ 2012-03-06 22:11 ` Russell King - ARM Linux
2012-03-06 22:49 ` Rob Herring
0 siblings, 1 reply; 67+ messages in thread
From: Russell King - ARM Linux @ 2012-03-06 22:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 06, 2012 at 03:45:15PM -0600, Rob Herring wrote:
> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
> index a6329a0..c60e7b8 100644
> --- a/arch/arm/mach-ixp4xx/common.c
> +++ b/arch/arm/mach-ixp4xx/common.c
> @@ -31,6 +31,7 @@
>
> #include <mach/udc.h>
> #include <mach/hardware.h>
> +#include <mach/io.h>
I'll assume you have a good reason for this, inspite of there being
no mention of it in the commit log...
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v5 5/7] ARM: ixp4xx: use runtime ioremap hook
2012-03-06 22:11 ` Russell King - ARM Linux
@ 2012-03-06 22:49 ` Rob Herring
2012-03-06 22:50 ` Rob Herring
0 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-06 22:49 UTC (permalink / raw)
To: linux-arm-kernel
On 03/06/2012 04:11 PM, Russell King - ARM Linux wrote:
> On Tue, Mar 06, 2012 at 03:45:15PM -0600, Rob Herring wrote:
>> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
>> index a6329a0..c60e7b8 100644
>> --- a/arch/arm/mach-ixp4xx/common.c
>> +++ b/arch/arm/mach-ixp4xx/common.c
>> @@ -31,6 +31,7 @@
>>
>> #include <mach/udc.h>
>> #include <mach/hardware.h>
>> +#include <mach/io.h>
>
> I'll assume you have a good reason for this, inspite of there being
> no mention of it in the commit log...
To explicitly pick up is_pci_address(). Yes, it gets implicitly
included, but that could change (hopefully).
Rob
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v5 5/7] ARM: ixp4xx: use runtime ioremap hook
2012-03-06 22:49 ` Rob Herring
@ 2012-03-06 22:50 ` Rob Herring
0 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-06 22:50 UTC (permalink / raw)
To: linux-arm-kernel
On 03/06/2012 04:49 PM, Rob Herring wrote:
> On 03/06/2012 04:11 PM, Russell King - ARM Linux wrote:
>> On Tue, Mar 06, 2012 at 03:45:15PM -0600, Rob Herring wrote:
>>> diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
>>> index a6329a0..c60e7b8 100644
>>> --- a/arch/arm/mach-ixp4xx/common.c
>>> +++ b/arch/arm/mach-ixp4xx/common.c
>>> @@ -31,6 +31,7 @@
>>>
>>> #include <mach/udc.h>
>>> #include <mach/hardware.h>
>>> +#include <mach/io.h>
>>
>> I'll assume you have a good reason for this, inspite of there being
>> no mention of it in the commit log...
>
> To explicitly pick up is_pci_address(). Yes, it gets implicitly
> included, but that could change (hopefully).
s/is_pci_address/is_pci_memory/
Rob
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v5 6/7] ARM: ebsa110: use runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
` (3 preceding siblings ...)
2012-03-06 21:45 ` [PATCH v5 5/7] ARM: ixp4xx: " Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 22:06 ` Nicolas Pitre
2012-03-06 21:45 ` [PATCH v5 7/7] ARM: remove compile time __arch_ioremap/__arch_iounmap Rob Herring
2012-03-06 21:57 ` [PATCH v5 1/7] ARM: provide runtime hook for ioremap/iounmap Nicolas Pitre
6 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert ebsa110 platforms to use run-time ioremap hook instead of the
compile time hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/mach-ebsa110/core.c | 15 +++++++++++++++
arch/arm/mach-ebsa110/include/mach/io.h | 9 ---------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 804c912..e0b831e 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -119,6 +119,20 @@ static void __init ebsa110_map_io(void)
iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
}
+static void __iomem *ebsa110_ioremap(unsigned long cookie, size_t size,
+ unsigned int flags)
+{
+ return (void __iomem *)cookie;
+}
+
+static void ebsa110_iounmap(volatile void __iomem *io_addr)
+{}
+
+static void __init ebsa110_init_early(void)
+{
+ arch_ioremap_caller = ebsa110_ioremap;
+ arch_iounmap = ebsa110_iounmap;
+}
#define PIT_CTRL (PIT_BASE + 0x0d)
#define PIT_T2 (PIT_BASE + 0x09)
@@ -315,6 +329,7 @@ MACHINE_START(EBSA110, "EBSA110")
.reserve_lp2 = 1,
.restart_mode = 's',
.map_io = ebsa110_map_io,
+ .init_early = ebsa110_init_early,
.init_irq = ebsa110_init_irq,
.timer = &ebsa110_timer,
.restart = ebsa110_restart,
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
index 44679db..11bb079 100644
--- a/arch/arm/mach-ebsa110/include/mach/io.h
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -62,15 +62,6 @@ void __writel(u32 val, void __iomem *addr);
#define writew(v,b) __writew(v,b)
#define writel(v,b) __writel(v,b)
-static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
- unsigned int flags)
-{
- return (void __iomem *)cookie;
-}
-
-#define __arch_ioremap __arch_ioremap
-#define __arch_iounmap(cookie) do { } while (0)
-
extern void insb(unsigned int port, void *buf, int sz);
extern void insw(unsigned int port, void *buf, int sz);
extern void insl(unsigned int port, void *buf, int sz);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 6/7] ARM: ebsa110: use runtime ioremap hook
2012-03-06 21:45 ` [PATCH v5 6/7] ARM: ebsa110: " Rob Herring
@ 2012-03-06 22:06 ` Nicolas Pitre
2012-03-07 3:36 ` [PATCH] " Rob Herring
0 siblings, 1 reply; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-06 22:06 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 6 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Convert ebsa110 platforms to use run-time ioremap hook instead of the
> compile time hook.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> ---
> arch/arm/mach-ebsa110/core.c | 15 +++++++++++++++
> arch/arm/mach-ebsa110/include/mach/io.h | 9 ---------
> 2 files changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
> index 804c912..e0b831e 100644
> --- a/arch/arm/mach-ebsa110/core.c
> +++ b/arch/arm/mach-ebsa110/core.c
> @@ -119,6 +119,20 @@ static void __init ebsa110_map_io(void)
> iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
> }
>
> +static void __iomem *ebsa110_ioremap(unsigned long cookie, size_t size,
> + unsigned int flags)
> +{
> + return (void __iomem *)cookie;
> +}
> +
> +static void ebsa110_iounmap(volatile void __iomem *io_addr)
> +{}
> +
> +static void __init ebsa110_init_early(void)
> +{
> + arch_ioremap_caller = ebsa110_ioremap;
ebsa110_ioremap() appears to lack the caller argument, so this will
generate a pointer mismatch error.
Nicolas
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH] ARM: ebsa110: use runtime ioremap hook
2012-03-06 22:06 ` Nicolas Pitre
@ 2012-03-07 3:36 ` Rob Herring
0 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-07 3:36 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert ebsa110 platforms to use run-time ioremap hook instead of the
compile time hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
This fixes the missing caller ptr.
Rob
arch/arm/mach-ebsa110/core.c | 15 +++++++++++++++
arch/arm/mach-ebsa110/include/mach/io.h | 9 ---------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 804c912..b049edb 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -119,6 +119,20 @@ static void __init ebsa110_map_io(void)
iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc));
}
+static void __iomem *ebsa110_ioremap_caller(unsigned long cookie, size_t size,
+ unsigned int flags, void *caller)
+{
+ return (void __iomem *)cookie;
+}
+
+static void ebsa110_iounmap(volatile void __iomem *io_addr)
+{}
+
+static void __init ebsa110_init_early(void)
+{
+ arch_ioremap_caller = ebsa110_ioremap_caller;
+ arch_iounmap = ebsa110_iounmap;
+}
#define PIT_CTRL (PIT_BASE + 0x0d)
#define PIT_T2 (PIT_BASE + 0x09)
@@ -315,6 +329,7 @@ MACHINE_START(EBSA110, "EBSA110")
.reserve_lp2 = 1,
.restart_mode = 's',
.map_io = ebsa110_map_io,
+ .init_early = ebsa110_init_early,
.init_irq = ebsa110_init_irq,
.timer = &ebsa110_timer,
.restart = ebsa110_restart,
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
index 44679db..11bb079 100644
--- a/arch/arm/mach-ebsa110/include/mach/io.h
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -62,15 +62,6 @@ void __writel(u32 val, void __iomem *addr);
#define writew(v,b) __writew(v,b)
#define writel(v,b) __writel(v,b)
-static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
- unsigned int flags)
-{
- return (void __iomem *)cookie;
-}
-
-#define __arch_ioremap __arch_ioremap
-#define __arch_iounmap(cookie) do { } while (0)
-
extern void insb(unsigned int port, void *buf, int sz);
extern void insw(unsigned int port, void *buf, int sz);
extern void insl(unsigned int port, void *buf, int sz);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 7/7] ARM: remove compile time __arch_ioremap/__arch_iounmap
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
` (4 preceding siblings ...)
2012-03-06 21:45 ` [PATCH v5 6/7] ARM: ebsa110: " Rob Herring
@ 2012-03-06 21:45 ` Rob Herring
2012-03-06 22:01 ` Nicolas Pitre
2012-03-06 21:57 ` [PATCH v5 1/7] ARM: provide runtime hook for ioremap/iounmap Nicolas Pitre
6 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-06 21:45 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Now that all custom ioremap/iounmap users are converted to runtime hook,
remove the compile time defines.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/include/asm/io.h | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 6c363c1..6f7555d 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -269,16 +269,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
* Documentation/io-mapping.txt.
*
*/
-#ifndef __arch_ioremap
-#define __arch_ioremap __arm_ioremap
-#define __arch_iounmap __arm_iounmap
-#endif
-
-#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
-#define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
-#define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
-#define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC)
-#define iounmap __arch_iounmap
+#define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
+#define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
+#define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
+#define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC)
+#define iounmap __arm_iounmap
/*
* io{read,write}{8,16,32} macros
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v5 7/7] ARM: remove compile time __arch_ioremap/__arch_iounmap
2012-03-06 21:45 ` [PATCH v5 7/7] ARM: remove compile time __arch_ioremap/__arch_iounmap Rob Herring
@ 2012-03-06 22:01 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-06 22:01 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 6 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Now that all custom ioremap/iounmap users are converted to runtime hook,
> remove the compile time defines.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/include/asm/io.h | 15 +++++----------
> 1 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 6c363c1..6f7555d 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -269,16 +269,11 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
> * Documentation/io-mapping.txt.
> *
> */
> -#ifndef __arch_ioremap
> -#define __arch_ioremap __arm_ioremap
> -#define __arch_iounmap __arm_iounmap
> -#endif
> -
> -#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
> -#define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
> -#define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED)
> -#define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC)
> -#define iounmap __arch_iounmap
> +#define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
> +#define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)
> +#define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED)
> +#define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC)
> +#define iounmap __arm_iounmap
>
> /*
> * io{read,write}{8,16,32} macros
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v5 1/7] ARM: provide runtime hook for ioremap/iounmap
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
` (5 preceding siblings ...)
2012-03-06 21:45 ` [PATCH v5 7/7] ARM: remove compile time __arch_ioremap/__arch_iounmap Rob Herring
@ 2012-03-06 21:57 ` Nicolas Pitre
6 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-06 21:57 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 6 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> We have compile time over-ride of ioremap and iounmap, but an run-time
> override is needed for multi-platform builds. This adds an extra function
> pointer check, but ioremap is not peformance critical. The option for
> compile time selection remains.
>
> The caller variant is used here to provide correct caller information as
> ARM can only support level 0 for __builtin_return_address.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/include/asm/io.h | 7 ++++++-
> arch/arm/mm/ioremap.c | 17 ++++++++++++++---
> 2 files changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 9275828..6c363c1 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
> extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
> extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
> extern void __iounmap(volatile void __iomem *addr);
> +extern void __arm_iounmap(volatile void __iomem *addr);
> +
> +extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
> + unsigned int, void *);
> +extern void (*arch_iounmap)(volatile void __iomem *);
>
> /*
> * Bad read/write accesses...
> @@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
> */
> #ifndef __arch_ioremap
> #define __arch_ioremap __arm_ioremap
> -#define __arch_iounmap __iounmap
> +#define __arch_iounmap __arm_iounmap
> #endif
>
> #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE)
> diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
> index 80632e8..0246290 100644
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -306,11 +306,15 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
> }
> EXPORT_SYMBOL(__arm_ioremap_pfn);
>
> +void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
> + unsigned int, void *) =
> + __arm_ioremap_caller;
> +
> void __iomem *
> __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
> {
> - return __arm_ioremap_caller(phys_addr, size, mtype,
> - __builtin_return_address(0));
> + return arch_ioremap_caller(phys_addr, size, mtype,
> + __builtin_return_address(0));
> }
> EXPORT_SYMBOL(__arm_ioremap);
>
> @@ -369,4 +373,11 @@ void __iounmap(volatile void __iomem *io_addr)
>
> vunmap(addr);
> }
> -EXPORT_SYMBOL(__iounmap);
> +
> +void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
> +
> +void __arm_iounmap(volatile void __iomem *io_addr)
> +{
> + arch_iounmap(io_addr);
> +}
> +EXPORT_SYMBOL(__arm_iounmap);
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 03/30] ARM: imx: convert to common runtime ioremap hook
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
2012-03-02 3:13 ` [PATCH v3 01/30] usb: ohci-pxa27x: add explicit include of hardware.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 04/30] ARM: msm: use " Rob Herring
` (26 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert i.MX platforms to use the common run-time ioremap hook instead of
the imx specific hook.
Also, move addr_in_module out of io.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
---
arch/arm/mach-imx/mm-imx3.c | 4 ++--
arch/arm/plat-mxc/include/mach/hardware.h | 3 +++
arch/arm/plat-mxc/include/mach/io.h | 17 -----------------
3 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 8404ee7..9db7c8d 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -132,7 +132,7 @@ void __init imx31_init_early(void)
{
mxc_set_cpu_type(MXC_CPU_MX31);
mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
- imx_ioremap = imx3_ioremap;
+ arch_ioremap = imx3_ioremap;
arm_pm_idle = imx3_idle;
}
@@ -196,7 +196,7 @@ void __init imx35_init_early(void)
mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
arm_pm_idle = imx3_idle;
- imx_ioremap = imx3_ioremap;
+ arch_ioremap = imx3_ioremap;
}
void __init mx35_init_irq(void)
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index a599f01..ca06a68 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -28,6 +28,9 @@
#define IOMEM(addr) ((void __force __iomem *)(addr))
#endif
+#define addr_in_module(addr, mod) \
+ ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
+
#define IMX_IO_P2V_MODULE(addr, module) \
(((addr) - module ## _BASE_ADDR) < module ## _SIZE ? \
(addr) - (module ## _BASE_ADDR) + (module ## _BASE_ADDR_VIRT) : 0)
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 338300b..ea9d95e 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,23 +14,6 @@
/* Allow IO space to be anywhere in the memory */
#define IO_SPACE_LIMIT 0xffffffff
-#define __arch_ioremap __imx_ioremap
-#define __arch_iounmap __iounmap
-
-#define addr_in_module(addr, mod) \
- ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
-
-extern void __iomem *(*imx_ioremap)(unsigned long, size_t, unsigned int);
-
-static inline void __iomem *
-__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
-{
- if (imx_ioremap != NULL)
- return imx_ioremap(phys_addr, size, mtype);
- else
- return __arm_ioremap(phys_addr, size, mtype);
-}
-
/* io address mapping macro */
#define __io(a) __typesafe_io(a)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 04/30] ARM: msm: use runtime ioremap hook
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (2 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 03/30] ARM: imx: convert to common runtime ioremap hook Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 05/30] ARM: msm: clean-up mach/io.h Rob Herring
` (25 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert msm platforms to use run-time ioremap hook instead of the compile
time hook.
According to David Brown, only the msm7201 needed the ioremap hook.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: David Brown <davidb@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
---
arch/arm/mach-msm/board-halibut.c | 6 ++++++
arch/arm/mach-msm/board-trout.c | 6 ++++++
arch/arm/mach-msm/include/mach/io.h | 5 -----
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | 6 ++++++
arch/arm/mach-msm/io.c | 1 -
5 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index a60ab6d..b6cff3a 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -68,6 +68,11 @@ static struct platform_device *devices[] __initdata = {
extern struct sys_timer msm_timer;
+static void __init halibut_init_early(void)
+{
+ arch_ioremap = __msm_ioremap;
+}
+
static void __init halibut_init_irq(void)
{
msm_init_irq();
@@ -96,6 +101,7 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
.atag_offset = 0x100,
.fixup = halibut_fixup,
.map_io = halibut_map_io,
+ .init_early = halibut_init_early,
.init_irq = halibut_init_irq,
.init_machine = halibut_init,
.timer = &msm_timer,
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 6b9b227..509d94c 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -43,6 +43,11 @@ static struct platform_device *devices[] __initdata = {
extern struct sys_timer msm_timer;
+static void __init trout_init_early(void)
+{
+ arch_ioremap = __msm_ioremap;
+}
+
static void __init trout_init_irq(void)
{
msm_init_irq();
@@ -96,6 +101,7 @@ MACHINE_START(TROUT, "HTC Dream")
.atag_offset = 0x100,
.fixup = trout_fixup,
.map_io = trout_map_io,
+ .init_early = trout_init_early,
.init_irq = trout_init_irq,
.init_machine = trout_init,
.timer = &msm_timer,
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
index dc1b928..c6ff9bb 100644
--- a/arch/arm/mach-msm/include/mach/io.h
+++ b/arch/arm/mach-msm/include/mach/io.h
@@ -18,11 +18,6 @@
#define IO_SPACE_LIMIT 0xffffffff
-#define __arch_ioremap __msm_ioremap
-#define __arch_iounmap __iounmap
-
-void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype);
-
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
index 8af4612..c355886 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
@@ -111,5 +111,11 @@
#define MSM_AD5_PHYS 0xAC000000
#define MSM_AD5_SIZE (SZ_1M*13)
+#ifndef __ASSEMBLY__
+
+extern void __iomem *
+__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype);
+
+#endif
#endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 578b04e..283cdff 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -187,4 +187,3 @@ __msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
return __arm_ioremap_caller(phys_addr, size, mtype,
__builtin_return_address(0));
}
-EXPORT_SYMBOL(__msm_ioremap);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 05/30] ARM: msm: clean-up mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (3 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 04/30] ARM: msm: use " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 06/30] ARM: iop13xx: use runtime ioremap hook Rob Herring
` (24 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Move msm specifics in mach/io.h to respective msm_iomap-*.h headers.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
---
arch/arm/mach-msm/include/mach/io.h | 7 -------
arch/arm/mach-msm/include/mach/msm_iomap-7x30.h | 4 ++++
arch/arm/mach-msm/include/mach/msm_iomap-8960.h | 4 ++++
arch/arm/mach-msm/include/mach/msm_iomap-8x50.h | 4 ++++
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | 4 ++++
5 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
index c6ff9bb..1071f98 100644
--- a/arch/arm/mach-msm/include/mach/io.h
+++ b/arch/arm/mach-msm/include/mach/io.h
@@ -21,11 +21,4 @@
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)
-void msm_map_qsd8x50_io(void);
-void msm_map_msm7x30_io(void);
-void msm_map_msm8x60_io(void);
-void msm_map_msm8960_io(void);
-
-extern unsigned int msm_shared_ram_phys;
-
#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
index 198202c..f944fe6 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
@@ -100,4 +100,8 @@
#define MSM_HSUSB_PHYS 0xA3600000
#define MSM_HSUSB_SIZE SZ_1K
+#ifndef __ASSEMBLY__
+extern void msm_map_msm7x30_io(void);
+#endif
+
#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
index 800b557..a1752c0 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8960.h
@@ -50,4 +50,8 @@
#define MSM_DEBUG_UART_PHYS 0x16440000
#endif
+#ifndef __ASSEMBLY__
+extern void msm_map_msm8960_io(void);
+#endif
+
#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
index 0faa894..da77cc1 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
@@ -122,4 +122,8 @@
#define MSM_SDC4_PHYS 0xA0600000
#define MSM_SDC4_SIZE SZ_4K
+#ifndef __ASSEMBLY__
+extern void msm_map_qsd8x50_io(void);
+#endif
+
#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
index 54e12ca..5aed57d 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
@@ -67,4 +67,8 @@
#define MSM_DEBUG_UART_PHYS 0x19C40000
#endif
+#ifndef __ASSEMBLY__
+extern void msm_map_msm8x60_io(void);
+#endif
+
#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 06/30] ARM: iop13xx: use runtime ioremap hook
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (4 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 05/30] ARM: msm: clean-up mach/io.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 07/30] ARM: iop13xx: move io.h externs to pci.h Rob Herring
` (23 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Convert iop13xx platforms to use run-time ioremap hook instead of the
compile time hook. The custom ioremap is still needed for 64-bit address
handling.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/mach-iop13xx/include/mach/io.h | 7 -------
arch/arm/mach-iop13xx/io.c | 10 ++++++++--
arch/arm/mach-iop13xx/iq81340mc.c | 1 +
arch/arm/mach-iop13xx/iq81340sc.c | 1 +
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index dffb234..2a69fc0 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -26,16 +26,9 @@
#define __mem_isa(a) (a)
extern void __iomem * __iop13xx_io(unsigned long io_addr);
-extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
- unsigned int mtype);
-extern void __iop13xx_iounmap(void __iomem *addr);
-
extern u32 iop13xx_atue_mem_base;
extern u32 iop13xx_atux_mem_base;
extern size_t iop13xx_atue_mem_size;
extern size_t iop13xx_atux_mem_size;
-#define __arch_ioremap __iop13xx_ioremap
-#define __arch_iounmap __iop13xx_iounmap
-
#endif
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 48642e6..d63585e 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -40,7 +40,7 @@ void * __iomem __iop13xx_io(unsigned long io_addr)
}
EXPORT_SYMBOL(__iop13xx_io);
-void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
+void __iomem * __iop13xx_ioremap(unsigned long cookie, size_t size,
unsigned int mtype)
{
void __iomem * retval;
@@ -83,7 +83,7 @@ void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
}
EXPORT_SYMBOL(__iop13xx_ioremap);
-void __iop13xx_iounmap(void __iomem *addr)
+void __iop13xx_iounmap(volatile void __iomem *addr)
{
extern void __iounmap(volatile void __iomem *addr);
@@ -111,3 +111,9 @@ skip:
return;
}
EXPORT_SYMBOL(__iop13xx_iounmap);
+
+void __init iop13xx_init_early(void)
+{
+ arch_ioremap = __iop13xx_ioremap;
+ arch_iounmap = __iop13xx_iounmap;
+}
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index abaee88..5c96b73 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -92,6 +92,7 @@ static struct sys_timer iq81340mc_timer = {
MACHINE_START(IQ81340MC, "Intel IQ81340MC")
/* Maintainer: Dan Williams <dan.j.williams@intel.com> */
.atag_offset = 0x100,
+ .init_early = iop13xx_init_early,
.map_io = iop13xx_map_io,
.init_irq = iop13xx_init_irq,
.timer = &iq81340mc_timer,
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index 690916a..aa4dd75 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -94,6 +94,7 @@ static struct sys_timer iq81340sc_timer = {
MACHINE_START(IQ81340SC, "Intel IQ81340SC")
/* Maintainer: Dan Williams <dan.j.williams@intel.com> */
.atag_offset = 0x100,
+ .init_early = iop13xx_init_early,
.map_io = iop13xx_map_io,
.init_irq = iop13xx_init_irq,
.timer = &iq81340sc_timer,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 07/30] ARM: iop13xx: move io.h externs to pci.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (5 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 06/30] ARM: iop13xx: use runtime ioremap hook Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 08/30] ARM: OMAP: Remove remaining includes for mach/io.h Rob Herring
` (22 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
These variables are just needed in pci.c and io.c, so move them out of
io.h in preparation to remove io.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/mach-iop13xx/include/mach/io.h | 4 ----
arch/arm/mach-iop13xx/io.c | 2 ++
arch/arm/mach-iop13xx/pci.h | 6 ++++++
3 files changed, 8 insertions(+), 4 deletions(-)
create mode 100644 arch/arm/mach-iop13xx/pci.h
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index 2a69fc0..058dbfd 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -26,9 +26,5 @@
#define __mem_isa(a) (a)
extern void __iomem * __iop13xx_io(unsigned long io_addr);
-extern u32 iop13xx_atue_mem_base;
-extern u32 iop13xx_atux_mem_base;
-extern size_t iop13xx_atue_mem_size;
-extern size_t iop13xx_atux_mem_size;
#endif
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index d63585e..70f716f 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -21,6 +21,8 @@
#include <linux/io.h>
#include <mach/hardware.h>
+#include "pci.h"
+
void * __iomem __iop13xx_io(unsigned long io_addr)
{
void __iomem * io_virt;
diff --git a/arch/arm/mach-iop13xx/pci.h b/arch/arm/mach-iop13xx/pci.h
new file mode 100644
index 0000000..c70cf5b
--- /dev/null
+++ b/arch/arm/mach-iop13xx/pci.h
@@ -0,0 +1,6 @@
+#include <linux/types.h>
+
+extern u32 iop13xx_atue_mem_base;
+extern u32 iop13xx_atux_mem_base;
+extern size_t iop13xx_atue_mem_size;
+extern size_t iop13xx_atux_mem_size;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 08/30] ARM: OMAP: Remove remaining includes for mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (6 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 07/30] ARM: iop13xx: move io.h externs to pci.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 09/30] [media] davinci: remove includes of mach/io.h Rob Herring
` (21 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Tony Lindgren <tony@atomide.com>
These are no longer needed with the recent iomap.h
changes.
Reported-by: Rob Herring <robherring2@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
---
arch/arm/mach-omap1/include/mach/entry-macro.S | 1 -
arch/arm/mach-omap1/sram.S | 1 -
arch/arm/plat-omap/include/plat/sdrc.h | 1 -
drivers/video/omap2/vrfb.c | 1 -
4 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S
index 68d2679..d0b18b5 100644
--- a/arch/arm/mach-omap1/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap1/include/mach/entry-macro.S
@@ -11,7 +11,6 @@
*/
#include <mach/hardware.h>
-#include <mach/io.h>
#include <mach/irqs.h>
#include "../../iomap.h"
diff --git a/arch/arm/mach-omap1/sram.S b/arch/arm/mach-omap1/sram.S
index 2ce0b9a..00e9d9e 100644
--- a/arch/arm/mach-omap1/sram.S
+++ b/arch/arm/mach-omap1/sram.S
@@ -12,7 +12,6 @@
#include <asm/assembler.h>
-#include <mach/io.h>
#include <mach/hardware.h>
#include "iomap.h"
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h
index 925b12b..9bb978e 100644
--- a/arch/arm/plat-omap/include/plat/sdrc.h
+++ b/arch/arm/plat-omap/include/plat/sdrc.h
@@ -16,7 +16,6 @@
* published by the Free Software Foundation.
*/
-#include <mach/io.h>
/* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
diff --git a/drivers/video/omap2/vrfb.c b/drivers/video/omap2/vrfb.c
index fd22716..4e5b960 100644
--- a/drivers/video/omap2/vrfb.c
+++ b/drivers/video/omap2/vrfb.c
@@ -27,7 +27,6 @@
#include <linux/bitops.h>
#include <linux/mutex.h>
-#include <mach/io.h>
#include <plat/vrfb.h>
#include <plat/sdrc.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 09/30] [media] davinci: remove includes of mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (7 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 08/30] ARM: OMAP: Remove remaining includes for mach/io.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 10/30] ARM: davinci: remove unneeded mach/io.h include Rob Herring
` (20 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Remove a few remaining includes of mach/io.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
---
drivers/media/video/davinci/vpbe_osd.c | 1 -
drivers/media/video/davinci/vpbe_venc.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/media/video/davinci/vpbe_osd.c b/drivers/media/video/davinci/vpbe_osd.c
index d6488b7..bba299d 100644
--- a/drivers/media/video/davinci/vpbe_osd.c
+++ b/drivers/media/video/davinci/vpbe_osd.c
@@ -28,7 +28,6 @@
#include <linux/clk.h>
#include <linux/slab.h>
-#include <mach/io.h>
#include <mach/cputype.h>
#include <mach/hardware.h>
diff --git a/drivers/media/video/davinci/vpbe_venc.c b/drivers/media/video/davinci/vpbe_venc.c
index 00e80f5..b21ecc8 100644
--- a/drivers/media/video/davinci/vpbe_venc.c
+++ b/drivers/media/video/davinci/vpbe_venc.c
@@ -27,7 +27,6 @@
#include <mach/hardware.h>
#include <mach/mux.h>
-#include <mach/io.h>
#include <mach/i2c.h>
#include <linux/io.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 10/30] ARM: davinci: remove unneeded mach/io.h include
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (8 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 09/30] [media] davinci: remove includes of mach/io.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 11/30] ARM: orion5x: clean-up mach/io.h Rob Herring
` (19 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
entry-macro.S doesn't actually need mach/io.h, so remove it.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
---
arch/arm/mach-davinci/include/mach/entry-macro.S | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-davinci/include/mach/entry-macro.S b/arch/arm/mach-davinci/include/mach/entry-macro.S
index e14c0dc..f6e1d33 100644
--- a/arch/arm/mach-davinci/include/mach/entry-macro.S
+++ b/arch/arm/mach-davinci/include/mach/entry-macro.S
@@ -8,7 +8,6 @@
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
-#include <mach/io.h>
#include <mach/irqs.h>
.macro disable_fiq
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 11/30] ARM: orion5x: clean-up mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (9 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 10/30] ARM: davinci: remove unneeded mach/io.h include Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:14 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 12/30] ARM: tegra: " Rob Herring
` (18 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Move orion5x specific mach/io.h parts into common.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
---
arch/arm/mach-orion5x/common.h | 9 +++++++++
arch/arm/mach-orion5x/include/mach/io.h | 12 ------------
arch/arm/mach-orion5x/pci.c | 1 +
arch/arm/mach-orion5x/tsx09-common.c | 1 +
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index d2513ac..2e6454c 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -57,5 +57,14 @@ struct meminfo;
struct tag;
extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
+/*****************************************************************************
+ * Helpers to access Orion registers
+ ****************************************************************************/
+/*
+ * These are not preempt-safe. Locks, if needed, must be taken
+ * care of by the caller.
+ */
+#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
+#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
#endif
diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h
index e9d9afd..444136d 100644
--- a/arch/arm/mach-orion5x/include/mach/io.h
+++ b/arch/arm/mach-orion5x/include/mach/io.h
@@ -18,16 +18,4 @@
#define __io(a) __typesafe_io(a)
#define __mem_pci(a) (a)
-
-/*****************************************************************************
- * Helpers to access Orion registers
- ****************************************************************************/
-/*
- * These are not preempt-safe. Locks, if needed, must be taken
- * care of by the caller.
- */
-#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
-#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
-
-
#endif
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index 09a045f..a9d2151 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -19,6 +19,7 @@
#include <asm/mach/pci.h>
#include <plat/pcie.h>
#include <plat/addr-map.h>
+#include <mach/orion5x.h>
#include "common.h"
/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/tsx09-common.c b/arch/arm/mach-orion5x/tsx09-common.c
index c9abb8f..7189827 100644
--- a/arch/arm/mach-orion5x/tsx09-common.c
+++ b/arch/arm/mach-orion5x/tsx09-common.c
@@ -15,6 +15,7 @@
#include <linux/mv643xx_eth.h>
#include <linux/timex.h>
#include <linux/serial_reg.h>
+#include <mach/orion5x.h>
#include "tsx09-common.h"
#include "common.h"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 11/30] ARM: orion5x: clean-up mach/io.h
2012-03-02 3:13 ` [PATCH v3 11/30] ARM: orion5x: clean-up mach/io.h Rob Herring
@ 2012-03-05 19:14 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:14 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Move orion5x specific mach/io.h parts into common.h.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Lennert Buytenhek <kernel@wantstofly.org>
> Cc: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/mach-orion5x/common.h | 9 +++++++++
> arch/arm/mach-orion5x/include/mach/io.h | 12 ------------
> arch/arm/mach-orion5x/pci.c | 1 +
> arch/arm/mach-orion5x/tsx09-common.c | 1 +
> 4 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
> index d2513ac..2e6454c 100644
> --- a/arch/arm/mach-orion5x/common.h
> +++ b/arch/arm/mach-orion5x/common.h
> @@ -57,5 +57,14 @@ struct meminfo;
> struct tag;
> extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
>
> +/*****************************************************************************
> + * Helpers to access Orion registers
> + ****************************************************************************/
> +/*
> + * These are not preempt-safe. Locks, if needed, must be taken
> + * care of by the caller.
> + */
> +#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
> +#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
>
> #endif
> diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h
> index e9d9afd..444136d 100644
> --- a/arch/arm/mach-orion5x/include/mach/io.h
> +++ b/arch/arm/mach-orion5x/include/mach/io.h
> @@ -18,16 +18,4 @@
> #define __io(a) __typesafe_io(a)
> #define __mem_pci(a) (a)
>
> -
> -/*****************************************************************************
> - * Helpers to access Orion registers
> - ****************************************************************************/
> -/*
> - * These are not preempt-safe. Locks, if needed, must be taken
> - * care of by the caller.
> - */
> -#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
> -#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
> -
> -
> #endif
> diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
> index 09a045f..a9d2151 100644
> --- a/arch/arm/mach-orion5x/pci.c
> +++ b/arch/arm/mach-orion5x/pci.c
> @@ -19,6 +19,7 @@
> #include <asm/mach/pci.h>
> #include <plat/pcie.h>
> #include <plat/addr-map.h>
> +#include <mach/orion5x.h>
> #include "common.h"
>
> /*****************************************************************************
> diff --git a/arch/arm/mach-orion5x/tsx09-common.c b/arch/arm/mach-orion5x/tsx09-common.c
> index c9abb8f..7189827 100644
> --- a/arch/arm/mach-orion5x/tsx09-common.c
> +++ b/arch/arm/mach-orion5x/tsx09-common.c
> @@ -15,6 +15,7 @@
> #include <linux/mv643xx_eth.h>
> #include <linux/timex.h>
> #include <linux/serial_reg.h>
> +#include <mach/orion5x.h>
> #include "tsx09-common.h"
> #include "common.h"
>
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 12/30] ARM: tegra: clean-up mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (10 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 11/30] ARM: orion5x: clean-up mach/io.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 13/30] ARM: ep93xx: " Rob Herring
` (17 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Move tegra specific mach/io.h parts into iomap.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
---
arch/arm/mach-tegra/include/mach/debug-macro.S | 1 -
arch/arm/mach-tegra/include/mach/io.h | 48 ------------------------
arch/arm/mach-tegra/include/mach/iomap.h | 48 ++++++++++++++++++++++++
arch/arm/mach-tegra/io.c | 1 +
4 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S
index 619abc6..e28ce16 100644
--- a/arch/arm/mach-tegra/include/mach/debug-macro.S
+++ b/arch/arm/mach-tegra/include/mach/debug-macro.S
@@ -18,7 +18,6 @@
*
*/
-#include <mach/io.h>
#include <mach/iomap.h>
.macro addruart, rp, rv, tmp
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h
index f15deff..47b4b61 100644
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ b/arch/arm/mach-tegra/include/mach/io.h
@@ -23,56 +23,8 @@
#define IO_SPACE_LIMIT 0xffff
-/* On TEGRA, many peripherals are very closely packed in
- * two 256MB io windows (that actually only use about 64KB
- * at the start of each).
- *
- * We will just map the first 1MB of each window (to minimize
- * pt entries needed) and provide a macro to transform physical
- * io addresses to an appropriate void __iomem *.
- *
- */
-
-#ifdef __ASSEMBLY__
-#define IOMEM(x) (x)
-#else
-#define IOMEM(x) ((void __force __iomem *)(x))
-#endif
-
-#define IO_IRAM_PHYS 0x40000000
-#define IO_IRAM_VIRT IOMEM(0xFE400000)
-#define IO_IRAM_SIZE SZ_256K
-
-#define IO_CPU_PHYS 0x50040000
-#define IO_CPU_VIRT IOMEM(0xFE000000)
-#define IO_CPU_SIZE SZ_16K
-
-#define IO_PPSB_PHYS 0x60000000
-#define IO_PPSB_VIRT IOMEM(0xFE200000)
-#define IO_PPSB_SIZE SZ_1M
-
-#define IO_APB_PHYS 0x70000000
-#define IO_APB_VIRT IOMEM(0xFE300000)
-#define IO_APB_SIZE SZ_1M
-
-#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
-#define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
-
-#define IO_TO_VIRT(n) ( \
- IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \
- IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \
- IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \
- IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \
- NULL)
-
#ifndef __ASSEMBLER__
-#define IO_ADDRESS(n) (IO_TO_VIRT(n))
-
#ifdef CONFIG_TEGRA_PCI
extern void __iomem *tegra_pcie_io_base;
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h
index 19dec3a..082b4d1 100644
--- a/arch/arm/mach-tegra/include/mach/iomap.h
+++ b/arch/arm/mach-tegra/include/mach/iomap.h
@@ -271,4 +271,52 @@
# define TEGRA_DEBUG_UART_BASE TEGRA_UARTE_BASE
#endif
+/* On TEGRA, many peripherals are very closely packed in
+ * two 256MB io windows (that actually only use about 64KB
+ *@the start of each).
+ *
+ * We will just map the first 1MB of each window (to minimize
+ * pt entries needed) and provide a macro to transform physical
+ * io addresses to an appropriate void __iomem *.
+ *
+ */
+
+#ifdef __ASSEMBLY__
+#define IOMEM(x) (x)
+#else
+#define IOMEM(x) ((void __force __iomem *)(x))
+#endif
+
+#define IO_IRAM_PHYS 0x40000000
+#define IO_IRAM_VIRT IOMEM(0xFE400000)
+#define IO_IRAM_SIZE SZ_256K
+
+#define IO_CPU_PHYS 0x50040000
+#define IO_CPU_VIRT IOMEM(0xFE000000)
+#define IO_CPU_SIZE SZ_16K
+
+#define IO_PPSB_PHYS 0x60000000
+#define IO_PPSB_VIRT IOMEM(0xFE200000)
+#define IO_PPSB_SIZE SZ_1M
+
+#define IO_APB_PHYS 0x70000000
+#define IO_APB_VIRT IOMEM(0xFE300000)
+#define IO_APB_SIZE SZ_1M
+
+#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
+#define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
+
+#define IO_TO_VIRT(n) ( \
+ IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \
+ IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \
+ IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \
+ IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \
+ NULL)
+
+#define IO_ADDRESS(n) (IO_TO_VIRT(n))
+
#endif
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index d23ee2d..58b4baf 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -26,6 +26,7 @@
#include <asm/page.h>
#include <asm/mach/map.h>
+#include <mach/iomap.h>
#include "board.h"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 13/30] ARM: ep93xx: clean-up mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (11 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 12/30] ARM: tegra: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 14/30] ARM: at91: add explicit include of hardware.h to uncompressor Rob Herring
` (16 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Move ep93xx specifics in mach/io.h to ep93xx-regs.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
---
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 9 +++++++++
arch/arm/mach-ep93xx/include/mach/io.h | 9 ---------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index c4a7b84..e711d0e 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -6,6 +6,15 @@
#define __ASM_ARCH_EP93XX_REGS_H
/*
+ * A typesafe __io() variation for variable initialisers
+ */
+#ifdef __ASSEMBLER__
+#define IOMEM(p) p
+#else
+#define IOMEM(p) ((void __iomem __force *)(p))
+#endif
+
+/*
* EP93xx Physical Memory Map:
*
* The ASDO pin is sampled at system reset to select a synchronous or
diff --git a/arch/arm/mach-ep93xx/include/mach/io.h b/arch/arm/mach-ep93xx/include/mach/io.h
index 594b77f..17e76ef 100644
--- a/arch/arm/mach-ep93xx/include/mach/io.h
+++ b/arch/arm/mach-ep93xx/include/mach/io.h
@@ -10,13 +10,4 @@
#define __io(p) __typesafe_io(p)
#define __mem_pci(p) (p)
-/*
- * A typesafe __io() variation for variable initialisers
- */
-#ifdef __ASSEMBLER__
-#define IOMEM(p) p
-#else
-#define IOMEM(p) ((void __iomem __force *)(p))
-#endif
-
#endif /* __ASM_MACH_IO_H */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 14/30] ARM: at91: add explicit include of hardware.h to uncompressor
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (12 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 13/30] ARM: ep93xx: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 15/30] ARM: dove: add explicit include of dove.h to addr-map.c Rob Herring
` (15 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
In preparation to remove mach/io.h, add explicit include of hardware.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
arch/arm/mach-at91/include/mach/uncompress.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
index 0234fd9..4218647 100644
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/atmel_serial.h>
+#include <mach/hardware.h>
#if defined(CONFIG_AT91_EARLY_DBGU0)
#define UART_OFFSET AT91_BASE_DBGU0
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 15/30] ARM: dove: add explicit include of dove.h to addr-map.c
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (13 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 14/30] ARM: at91: add explicit include of hardware.h to uncompressor Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:26 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 16/30] ARM: clps711x: remove unneeded include of mach/io.h Rob Herring
` (14 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
In preparation to remove mach/io.h, add explicit include of mach/dove.h
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-dove/addr-map.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-dove/addr-map.c b/arch/arm/mach-dove/addr-map.c
index 98b8c83..2a06c01 100644
--- a/arch/arm/mach-dove/addr-map.c
+++ b/arch/arm/mach-dove/addr-map.c
@@ -14,6 +14,7 @@
#include <linux/io.h>
#include <asm/mach/arch.h>
#include <asm/setup.h>
+#include <mach/dove.h>
#include <plat/addr-map.h>
#include "common.h"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 15/30] ARM: dove: add explicit include of dove.h to addr-map.c
2012-03-02 3:13 ` [PATCH v3 15/30] ARM: dove: add explicit include of dove.h to addr-map.c Rob Herring
@ 2012-03-05 19:26 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:26 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> In preparation to remove mach/io.h, add explicit include of mach/dove.h
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/mach-dove/addr-map.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-dove/addr-map.c b/arch/arm/mach-dove/addr-map.c
> index 98b8c83..2a06c01 100644
> --- a/arch/arm/mach-dove/addr-map.c
> +++ b/arch/arm/mach-dove/addr-map.c
> @@ -14,6 +14,7 @@
> #include <linux/io.h>
> #include <asm/mach/arch.h>
> #include <asm/setup.h>
> +#include <mach/dove.h>
> #include <plat/addr-map.h>
> #include "common.h"
>
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 16/30] ARM: clps711x: remove unneeded include of mach/io.h
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (14 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 15/30] ARM: dove: add explicit include of dove.h to addr-map.c Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 17/30] ARM: make mach/io.h include optional Rob Herring
` (13 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
In preparation to remove mach/io.h, remove an unneeded include of it.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-clps711x/include/mach/uncompress.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
index 7164310..35ed731 100644
--- a/arch/arm/mach-clps711x/include/mach/uncompress.h
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <mach/io.h>
#include <mach/hardware.h>
#include <asm/hardware/clps7111.h>
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 17/30] ARM: make mach/io.h include optional
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (15 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 16/30] ARM: clps711x: remove unneeded include of mach/io.h Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:31 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 18/30] ARM: remove bunch of now unused mach/io.h files Rob Herring
` (12 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Add a kconfig option NEED_MACH_IO_H to conditionally include mach/io.h.
Basing this on CONFIG_PCI and CONFIG_ISA doesn't quite work. Most ISA
platforms don't need mach/io.h, but ebsa110 does. Most PCI platforms need
mach/io.h for now, but ks8695 doesn't which means it's broken? omap has a
lot of other stuff in its io.h, so it also needs io.h until it is cleaned
up.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
arch/arm/Kconfig | 19 +++++++++++++++++++
arch/arm/include/asm/io.h | 5 +++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 92c9c79..ae016cd 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -186,6 +186,9 @@ config GENERIC_ISA_DMA
config FIQ
bool
+config NEED_MACH_IO_H
+ bool
+
config ARCH_MTD_XIP
bool
@@ -265,6 +268,7 @@ config ARCH_INTEGRATOR
select GENERIC_CLOCKEVENTS
select PLAT_VERSATILE
select PLAT_VERSATILE_FPGA_IRQ
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for ARM's Integrator platform.
@@ -400,6 +404,7 @@ config ARCH_EBSA110
select ISA
select NO_IOPORT
select ARCH_USES_GETTIMEOFFSET
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
This is an evaluation board for the StrongARM processor available
@@ -426,6 +431,7 @@ config ARCH_FOOTBRIDGE
select FOOTBRIDGE
select GENERIC_CLOCKEVENTS
select HAVE_IDE
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for systems based on the DC21285 companion chip
@@ -478,6 +484,7 @@ config ARCH_IOP13XX
select PCI
select ARCH_SUPPORTS_MSI
select VMSPLIT_1G
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for Intel's IOP13XX (XScale) family of processors.
@@ -486,6 +493,7 @@ config ARCH_IOP32X
bool "IOP32x-based"
depends on MMU
select CPU_XSCALE
+ select NEED_MACH_IO_H
select PLAT_IOP
select PCI
select ARCH_REQUIRE_GPIOLIB
@@ -497,6 +505,7 @@ config ARCH_IOP33X
bool "IOP33x-based"
depends on MMU
select CPU_XSCALE
+ select NEED_MACH_IO_H
select PLAT_IOP
select PCI
select ARCH_REQUIRE_GPIOLIB
@@ -509,6 +518,7 @@ config ARCH_IXP23XX
select CPU_XSC3
select PCI
select ARCH_USES_GETTIMEOFFSET
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for Intel's IXP23xx (XScale) family of processors.
@@ -519,6 +529,7 @@ config ARCH_IXP2000
select CPU_XSCALE
select PCI
select ARCH_USES_GETTIMEOFFSET
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for Intel's IXP2400/2800 (XScale) family of processors.
@@ -532,6 +543,7 @@ config ARCH_IXP4XX
select GENERIC_CLOCKEVENTS
select HAVE_SCHED_CLOCK
select MIGHT_HAVE_PCI
+ select NEED_MACH_IO_H
select DMABOUNCE if PCI
help
Support for Intel's IXP4XX (XScale) family of processors.
@@ -542,6 +554,7 @@ config ARCH_DOVE
select PCI
select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS
+ select NEED_MACH_IO_H
select PLAT_ORION
help
Support for the Marvell Dove SoC 88AP510
@@ -552,6 +565,7 @@ config ARCH_KIRKWOOD
select PCI
select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS
+ select NEED_MACH_IO_H
select PLAT_ORION
help
Support for the following Marvell Kirkwood series SoCs:
@@ -576,6 +590,7 @@ config ARCH_MV78XX0
select PCI
select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS
+ select NEED_MACH_IO_H
select PLAT_ORION
help
Support for the following Marvell MV78xx0 series SoCs:
@@ -645,6 +660,7 @@ config ARCH_TEGRA
select HAVE_SCHED_CLOCK
select HAVE_SMP
select MIGHT_HAVE_CACHE_L2X0
+ select NEED_MACH_IO_H if PCI
select ARCH_HAS_CPUFREQ
help
This enables support for NVIDIA Tegra based systems (Tegra APX,
@@ -739,6 +755,7 @@ config ARCH_RPC
select ARCH_SPARSEMEM_ENABLE
select ARCH_USES_GETTIMEOFFSET
select HAVE_IDE
+ select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
On the Acorn Risc-PC, Linux can support the internal IDE disk and
@@ -771,6 +788,7 @@ config ARCH_S3C2410
select CLKDEV_LOOKUP
select ARCH_USES_GETTIMEOFFSET
select HAVE_S3C2410_I2C if I2C
+ select NEED_MACH_IO_H
help
Samsung S3C2410X CPU based systems, such as the Simtec Electronics
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@ -877,6 +895,7 @@ config ARCH_SHARK
select PCI
select ARCH_USES_GETTIMEOFFSET
select NEED_MACH_MEMORY_H
+ select NEED_MACH_IO_H
help
Support for the StrongARM based Digital DNARD machine, also known
as "Shark" (<http://www.shark-linux.de/shark.html>).
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 9bf9d00..cd8c125 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -109,7 +109,12 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
/*
* Now, pick up the machine-defined IO definitions
*/
+#ifdef CONFIG_NEED_MACH_IO_H
#include <mach/io.h>
+#else
+#define __io(a) ({ (void)(a); __typesafe_io(0); })
+#define __mem_pci(a) (a)
+#endif
/*
* This is the limit of PC card/PCI/ISA IO space, which is by default
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 17/30] ARM: make mach/io.h include optional
2012-03-02 3:13 ` [PATCH v3 17/30] ARM: make mach/io.h include optional Rob Herring
@ 2012-03-05 19:31 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:31 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Add a kconfig option NEED_MACH_IO_H to conditionally include mach/io.h.
>
> Basing this on CONFIG_PCI and CONFIG_ISA doesn't quite work. Most ISA
> platforms don't need mach/io.h, but ebsa110 does. Most PCI platforms need
> mach/io.h for now, but ks8695 doesn't which means it's broken? omap has a
> lot of other stuff in its io.h, so it also needs io.h until it is cleaned
> up.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> ---
> arch/arm/Kconfig | 19 +++++++++++++++++++
> arch/arm/include/asm/io.h | 5 +++++
> 2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 92c9c79..ae016cd 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -186,6 +186,9 @@ config GENERIC_ISA_DMA
> config FIQ
> bool
>
> +config NEED_MACH_IO_H
> + bool
> +
> config ARCH_MTD_XIP
> bool
>
I'd locate this next to the NEED_MACH_MEMORY_H definition as they have
identical purposes. Other than that:
Acked-by: Nicolas Pitre <nico@linaro.org>
> @@ -265,6 +268,7 @@ config ARCH_INTEGRATOR
> select GENERIC_CLOCKEVENTS
> select PLAT_VERSATILE
> select PLAT_VERSATILE_FPGA_IRQ
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> Support for ARM's Integrator platform.
> @@ -400,6 +404,7 @@ config ARCH_EBSA110
> select ISA
> select NO_IOPORT
> select ARCH_USES_GETTIMEOFFSET
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> This is an evaluation board for the StrongARM processor available
> @@ -426,6 +431,7 @@ config ARCH_FOOTBRIDGE
> select FOOTBRIDGE
> select GENERIC_CLOCKEVENTS
> select HAVE_IDE
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> Support for systems based on the DC21285 companion chip
> @@ -478,6 +484,7 @@ config ARCH_IOP13XX
> select PCI
> select ARCH_SUPPORTS_MSI
> select VMSPLIT_1G
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> Support for Intel's IOP13XX (XScale) family of processors.
> @@ -486,6 +493,7 @@ config ARCH_IOP32X
> bool "IOP32x-based"
> depends on MMU
> select CPU_XSCALE
> + select NEED_MACH_IO_H
> select PLAT_IOP
> select PCI
> select ARCH_REQUIRE_GPIOLIB
> @@ -497,6 +505,7 @@ config ARCH_IOP33X
> bool "IOP33x-based"
> depends on MMU
> select CPU_XSCALE
> + select NEED_MACH_IO_H
> select PLAT_IOP
> select PCI
> select ARCH_REQUIRE_GPIOLIB
> @@ -509,6 +518,7 @@ config ARCH_IXP23XX
> select CPU_XSC3
> select PCI
> select ARCH_USES_GETTIMEOFFSET
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> Support for Intel's IXP23xx (XScale) family of processors.
> @@ -519,6 +529,7 @@ config ARCH_IXP2000
> select CPU_XSCALE
> select PCI
> select ARCH_USES_GETTIMEOFFSET
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> Support for Intel's IXP2400/2800 (XScale) family of processors.
> @@ -532,6 +543,7 @@ config ARCH_IXP4XX
> select GENERIC_CLOCKEVENTS
> select HAVE_SCHED_CLOCK
> select MIGHT_HAVE_PCI
> + select NEED_MACH_IO_H
> select DMABOUNCE if PCI
> help
> Support for Intel's IXP4XX (XScale) family of processors.
> @@ -542,6 +554,7 @@ config ARCH_DOVE
> select PCI
> select ARCH_REQUIRE_GPIOLIB
> select GENERIC_CLOCKEVENTS
> + select NEED_MACH_IO_H
> select PLAT_ORION
> help
> Support for the Marvell Dove SoC 88AP510
> @@ -552,6 +565,7 @@ config ARCH_KIRKWOOD
> select PCI
> select ARCH_REQUIRE_GPIOLIB
> select GENERIC_CLOCKEVENTS
> + select NEED_MACH_IO_H
> select PLAT_ORION
> help
> Support for the following Marvell Kirkwood series SoCs:
> @@ -576,6 +590,7 @@ config ARCH_MV78XX0
> select PCI
> select ARCH_REQUIRE_GPIOLIB
> select GENERIC_CLOCKEVENTS
> + select NEED_MACH_IO_H
> select PLAT_ORION
> help
> Support for the following Marvell MV78xx0 series SoCs:
> @@ -645,6 +660,7 @@ config ARCH_TEGRA
> select HAVE_SCHED_CLOCK
> select HAVE_SMP
> select MIGHT_HAVE_CACHE_L2X0
> + select NEED_MACH_IO_H if PCI
> select ARCH_HAS_CPUFREQ
> help
> This enables support for NVIDIA Tegra based systems (Tegra APX,
> @@ -739,6 +755,7 @@ config ARCH_RPC
> select ARCH_SPARSEMEM_ENABLE
> select ARCH_USES_GETTIMEOFFSET
> select HAVE_IDE
> + select NEED_MACH_IO_H
> select NEED_MACH_MEMORY_H
> help
> On the Acorn Risc-PC, Linux can support the internal IDE disk and
> @@ -771,6 +788,7 @@ config ARCH_S3C2410
> select CLKDEV_LOOKUP
> select ARCH_USES_GETTIMEOFFSET
> select HAVE_S3C2410_I2C if I2C
> + select NEED_MACH_IO_H
> help
> Samsung S3C2410X CPU based systems, such as the Simtec Electronics
> BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
> @@ -877,6 +895,7 @@ config ARCH_SHARK
> select PCI
> select ARCH_USES_GETTIMEOFFSET
> select NEED_MACH_MEMORY_H
> + select NEED_MACH_IO_H
> help
> Support for the StrongARM based Digital DNARD machine, also known
> as "Shark" (<http://www.shark-linux.de/shark.html>).
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 9bf9d00..cd8c125 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -109,7 +109,12 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
> /*
> * Now, pick up the machine-defined IO definitions
> */
> +#ifdef CONFIG_NEED_MACH_IO_H
> #include <mach/io.h>
> +#else
> +#define __io(a) ({ (void)(a); __typesafe_io(0); })
> +#define __mem_pci(a) (a)
> +#endif
>
> /*
> * This is the limit of PC card/PCI/ISA IO space, which is by default
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 18/30] ARM: remove bunch of now unused mach/io.h files
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (16 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 17/30] ARM: make mach/io.h include optional Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:33 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 19/30] ARM: kill off __mem_pci Rob Herring
` (11 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Now that many platforms don't need mach/io.h, remove the usused ones.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
---
arch/arm/mach-at91/include/mach/io.h | 31 ------------------
arch/arm/mach-bcmring/include/mach/io.h | 33 -------------------
arch/arm/mach-clps711x/include/mach/io.h | 36 ---------------------
arch/arm/mach-cns3xxx/include/mach/io.h | 17 ----------
arch/arm/mach-davinci/include/mach/io.h | 24 --------------
arch/arm/mach-ep93xx/include/mach/io.h | 13 --------
arch/arm/mach-exynos/include/mach/io.h | 26 ---------------
arch/arm/mach-gemini/include/mach/io.h | 18 ----------
arch/arm/mach-h720x/include/mach/io.h | 22 -------------
arch/arm/mach-highbank/include/mach/io.h | 7 ----
arch/arm/mach-ks8695/include/mach/io.h | 19 -----------
arch/arm/mach-lpc32xx/include/mach/io.h | 27 ----------------
arch/arm/mach-mmp/include/mach/io.h | 21 ------------
arch/arm/mach-msm/include/mach/io.h | 24 --------------
arch/arm/mach-mxs/include/mach/io.h | 22 -------------
arch/arm/mach-netx/include/mach/io.h | 28 ----------------
arch/arm/mach-nomadik/include/mach/io.h | 22 -------------
arch/arm/mach-omap1/include/mach/io.h | 46 ---------------------------
arch/arm/mach-omap2/include/mach/io.h | 49 -----------------------------
arch/arm/mach-orion5x/include/mach/io.h | 21 ------------
arch/arm/mach-picoxcell/include/mach/io.h | 22 -------------
arch/arm/mach-pnx4008/include/mach/io.h | 21 ------------
arch/arm/mach-prima2/include/mach/io.h | 16 ---------
arch/arm/mach-pxa/include/mach/io.h | 20 ------------
arch/arm/mach-realview/include/mach/io.h | 28 ----------------
arch/arm/mach-s3c64xx/include/mach/io.h | 18 ----------
arch/arm/mach-s5p64x0/include/mach/io.h | 25 ---------------
arch/arm/mach-s5pc100/include/mach/io.h | 18 ----------
arch/arm/mach-s5pv210/include/mach/io.h | 26 ---------------
arch/arm/mach-sa1100/include/mach/io.h | 20 ------------
arch/arm/mach-shmobile/include/mach/io.h | 9 -----
arch/arm/mach-spear3xx/include/mach/io.h | 19 -----------
arch/arm/mach-spear6xx/include/mach/io.h | 20 ------------
arch/arm/mach-u300/include/mach/io.h | 20 ------------
arch/arm/mach-ux500/include/mach/io.h | 22 -------------
arch/arm/mach-versatile/include/mach/io.h | 28 ----------------
arch/arm/mach-vexpress/include/mach/io.h | 26 ---------------
arch/arm/mach-vt8500/include/mach/io.h | 26 ---------------
arch/arm/mach-w90x900/include/mach/io.h | 30 -----------------
arch/arm/mach-zynq/include/mach/io.h | 33 -------------------
arch/arm/plat-mxc/include/mach/io.h | 22 -------------
arch/arm/plat-spear/include/plat/io.h | 22 -------------
42 files changed, 0 insertions(+), 997 deletions(-)
delete mode 100644 arch/arm/mach-at91/include/mach/io.h
delete mode 100644 arch/arm/mach-bcmring/include/mach/io.h
delete mode 100644 arch/arm/mach-clps711x/include/mach/io.h
delete mode 100644 arch/arm/mach-cns3xxx/include/mach/io.h
delete mode 100644 arch/arm/mach-davinci/include/mach/io.h
delete mode 100644 arch/arm/mach-ep93xx/include/mach/io.h
delete mode 100644 arch/arm/mach-exynos/include/mach/io.h
delete mode 100644 arch/arm/mach-gemini/include/mach/io.h
delete mode 100644 arch/arm/mach-h720x/include/mach/io.h
delete mode 100644 arch/arm/mach-highbank/include/mach/io.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/io.h
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/io.h
delete mode 100644 arch/arm/mach-mmp/include/mach/io.h
delete mode 100644 arch/arm/mach-msm/include/mach/io.h
delete mode 100644 arch/arm/mach-mxs/include/mach/io.h
delete mode 100644 arch/arm/mach-netx/include/mach/io.h
delete mode 100644 arch/arm/mach-nomadik/include/mach/io.h
delete mode 100644 arch/arm/mach-omap1/include/mach/io.h
delete mode 100644 arch/arm/mach-omap2/include/mach/io.h
delete mode 100644 arch/arm/mach-orion5x/include/mach/io.h
delete mode 100644 arch/arm/mach-picoxcell/include/mach/io.h
delete mode 100644 arch/arm/mach-pnx4008/include/mach/io.h
delete mode 100644 arch/arm/mach-prima2/include/mach/io.h
delete mode 100644 arch/arm/mach-pxa/include/mach/io.h
delete mode 100644 arch/arm/mach-realview/include/mach/io.h
delete mode 100644 arch/arm/mach-s3c64xx/include/mach/io.h
delete mode 100644 arch/arm/mach-s5p64x0/include/mach/io.h
delete mode 100644 arch/arm/mach-s5pc100/include/mach/io.h
delete mode 100644 arch/arm/mach-s5pv210/include/mach/io.h
delete mode 100644 arch/arm/mach-sa1100/include/mach/io.h
delete mode 100644 arch/arm/mach-shmobile/include/mach/io.h
delete mode 100644 arch/arm/mach-spear3xx/include/mach/io.h
delete mode 100644 arch/arm/mach-spear6xx/include/mach/io.h
delete mode 100644 arch/arm/mach-u300/include/mach/io.h
delete mode 100644 arch/arm/mach-ux500/include/mach/io.h
delete mode 100644 arch/arm/mach-versatile/include/mach/io.h
delete mode 100644 arch/arm/mach-vexpress/include/mach/io.h
delete mode 100644 arch/arm/mach-vt8500/include/mach/io.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/io.h
delete mode 100644 arch/arm/mach-zynq/include/mach/io.h
delete mode 100644 arch/arm/plat-mxc/include/mach/io.h
delete mode 100644 arch/arm/plat-spear/include/plat/io.h
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
deleted file mode 100644
index 4003001..0000000
--- a/arch/arm/mach-at91/include/mach/io.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/io.h
- *
- * Copyright (C) 2003 SAN People
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#include <mach/hardware.h>
-
-#define IO_SPACE_LIMIT 0xFFFFFFFF
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-bcmring/include/mach/io.h b/arch/arm/mach-bcmring/include/mach/io.h
deleted file mode 100644
index dae5e9b..0000000
--- a/arch/arm/mach-bcmring/include/mach/io.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Copyright (C) 1999 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#include <mach/hardware.h>
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-clps711x/include/mach/io.h b/arch/arm/mach-clps711x/include/mach/io.h
deleted file mode 100644
index 2e0b3ce..0000000
--- a/arch/arm/mach-clps711x/include/mach/io.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * arch/arm/mach-clps711x/include/mach/io.h
- *
- * Copyright (C) 1999 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-/*
- * We don't support ins[lb]/outs[lb]. Make them fault.
- */
-#define __raw_readsb(p,d,l) do { *(int *)0 = 0; } while (0)
-#define __raw_readsl(p,d,l) do { *(int *)0 = 0; } while (0)
-#define __raw_writesb(p,d,l) do { *(int *)0 = 0; } while (0)
-#define __raw_writesl(p,d,l) do { *(int *)0 = 0; } while (0)
-
-#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/io.h b/arch/arm/mach-cns3xxx/include/mach/io.h
deleted file mode 100644
index 33b6fc1..0000000
--- a/arch/arm/mach-cns3xxx/include/mach/io.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright 2008 Cavium Networks
- * Copyright 2003 ARM Limited
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, Version 2, as
- * published by the Free Software Foundation.
- */
-#ifndef __MACH_IO_H
-#define __MACH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
deleted file mode 100644
index b2267d1..0000000
--- a/arch/arm/mach-davinci/include/mach/io.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * DaVinci IO address definitions
- *
- * Copied from include/asm/arm/arch-omap/io.h
- *
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
-
-#endif /* __ASM_ARCH_IO_H */
diff --git a/arch/arm/mach-ep93xx/include/mach/io.h b/arch/arm/mach-ep93xx/include/mach/io.h
deleted file mode 100644
index 17e76ef..0000000
--- a/arch/arm/mach-ep93xx/include/mach/io.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/io.h
- */
-
-#ifndef __ASM_MACH_IO_H
-#define __ASM_MACH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(p) __typesafe_io(p)
-#define __mem_pci(p) (p)
-
-#endif /* __ASM_MACH_IO_H */
diff --git a/arch/arm/mach-exynos/include/mach/io.h b/arch/arm/mach-exynos/include/mach/io.h
deleted file mode 100644
index d5478d2..0000000
--- a/arch/arm/mach-exynos/include/mach/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* linux/arch/arm/mach-exynos4/include/mach/io.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * Copyright 2008-2010 Ben Dooks <ben-linux@fluff.org>
- *
- * Based on arch/arm/mach-s5p6442/include/mach/io.h
- *
- * Default IO routines for EXYNOS4
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H __FILE__
-
-/* No current ISA/PCI bus support. */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#define IO_SPACE_LIMIT (0xFFFFFFFF)
-
-#endif /* __ASM_ARM_ARCH_IO_H */
diff --git a/arch/arm/mach-gemini/include/mach/io.h b/arch/arm/mach-gemini/include/mach/io.h
deleted file mode 100644
index c548056..0000000
--- a/arch/arm/mach-gemini/include/mach/io.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (C) 2001-2006 Storlink, Corp.
- * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-#ifndef __MACH_IO_H
-#define __MACH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif /* __MACH_IO_H */
diff --git a/arch/arm/mach-h720x/include/mach/io.h b/arch/arm/mach-h720x/include/mach/io.h
deleted file mode 100644
index 2c8659c..0000000
--- a/arch/arm/mach-h720x/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-h720x/include/mach/io.h
- *
- * Copyright (C) 2000 Steve Hill (sjhill at cotw.com)
- *
- * Changelog:
- *
- * 09-19-2001 JJKIM
- * Created from arch/arm/mach-l7200/include/mach/io.h
- *
- * 03-27-2003 Robert Schwebel <r.schwebel@pengutronix.de>:
- * re-unified header files for h720x
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-highbank/include/mach/io.h b/arch/arm/mach-highbank/include/mach/io.h
deleted file mode 100644
index 70cfa3b..0000000
--- a/arch/arm/mach-highbank/include/mach/io.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __MACH_IO_H
-#define __MACH_IO_H
-
-#define __io(a) ({ (void)(a); __typesafe_io(0); })
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-ks8695/include/mach/io.h b/arch/arm/mach-ks8695/include/mach/io.h
deleted file mode 100644
index a7a63ac..0000000
--- a/arch/arm/mach-ks8695/include/mach/io.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-ks8695/include/mach/io.h
- *
- * Copyright (C) 2006 Andrew Victor
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/io.h b/arch/arm/mach-lpc32xx/include/mach/io.h
deleted file mode 100644
index 9b59ab5..0000000
--- a/arch/arm/mach-lpc32xx/include/mach/io.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * arch/arm/mach-lpc32xx/include/mach/io.h
- *
- * Author: Kevin Wells <kevin.wells@nxp.com>
- *
- * Copyright (C) 2010 NXP Semiconductors
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-mmp/include/mach/io.h b/arch/arm/mach-mmp/include/mach/io.h
deleted file mode 100644
index e7adf3d..0000000
--- a/arch/arm/mach-mmp/include/mach/io.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * linux/arch/arm/mach-mmp/include/mach/io.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_MACH_IO_H
-#define __ASM_MACH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif /* __ASM_MACH_IO_H */
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
deleted file mode 100644
index 1071f98..0000000
--- a/arch/arm/mach-msm/include/mach/io.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* arch/arm/mach-msm/include/mach/io.h
- *
- * Copyright (C) 2007 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-mxs/include/mach/io.h b/arch/arm/mach-mxs/include/mach/io.h
deleted file mode 100644
index 289b722..0000000
--- a/arch/arm/mach-mxs/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __MACH_MXS_IO_H__
-#define __MACH_MXS_IO_H__
-
-/* Allow IO space to be anywhere in the memory */
-#define IO_SPACE_LIMIT 0xffffffff
-
-/* io address mapping macro */
-#define __io(a) __typesafe_io(a)
-
-#define __mem_pci(a) (a)
-
-#endif /* __MACH_MXS_IO_H__ */
diff --git a/arch/arm/mach-netx/include/mach/io.h b/arch/arm/mach-netx/include/mach/io.h
deleted file mode 100644
index c3921cb..0000000
--- a/arch/arm/mach-netx/include/mach/io.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-netx/include/mach/io.h
- *
- * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-nomadik/include/mach/io.h b/arch/arm/mach-nomadik/include/mach/io.h
deleted file mode 100644
index 2e1eca1..0000000
--- a/arch/arm/mach-nomadik/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-nomadik/include/mach/io.h (copied from mach-sa1100)
- *
- * Copyright (C) 1997-1999 Russell King
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h
deleted file mode 100644
index 37b12e1..0000000
--- a/arch/arm/mach-omap1/include/mach/io.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * arch/arm/mach-omap1/include/mach/io.h
- *
- * IO definitions for TI OMAP processors and boards
- *
- * Copied from arch/arm/mach-sa1100/include/mach/io.h
- * Copyright (C) 1997-1999 Russell King
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-omap2/include/mach/io.h b/arch/arm/mach-omap2/include/mach/io.h
deleted file mode 100644
index b8758c8..0000000
--- a/arch/arm/mach-omap2/include/mach/io.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * arch/arm/mach-omap2/include/mach/io.h
- *
- * IO definitions for TI OMAP processors and boards
- *
- * Copied from arch/arm/mach-sa1100/include/mach/io.h
- * Copyright (C) 1997-1999 Russell King
- *
- * Copyright (C) 2009 Texas Instruments
- * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h
deleted file mode 100644
index 444136d..0000000
--- a/arch/arm/mach-orion5x/include/mach/io.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * arch/arm/mach-orion5x/include/mach/io.h
- *
- * Tzachi Perelstein <tzachi@marvell.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#include "orion5x.h"
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-picoxcell/include/mach/io.h b/arch/arm/mach-picoxcell/include/mach/io.h
deleted file mode 100644
index 7573ec7..0000000
--- a/arch/arm/mach-picoxcell/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/* No ioports, but needed for driver compatibility. */
-#define __io(a) __typesafe_io(a)
-/* No PCI possible on picoxcell. */
-#define __mem_pci(a) (a)
-
-#endif /* __ASM_ARM_ARCH_IO_H */
diff --git a/arch/arm/mach-pnx4008/include/mach/io.h b/arch/arm/mach-pnx4008/include/mach/io.h
deleted file mode 100644
index cbf0904..0000000
--- a/arch/arm/mach-pnx4008/include/mach/io.h
+++ /dev/null
@@ -1,21 +0,0 @@
-
-/*
- * arch/arm/mach-pnx4008/include/mach/io.h
- *
- * Author: Dmitry Chigirev <chigirev@ru.mvista.com>
- *
- * 2005 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-prima2/include/mach/io.h b/arch/arm/mach-prima2/include/mach/io.h
deleted file mode 100644
index 6c31e9e..0000000
--- a/arch/arm/mach-prima2/include/mach/io.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-prima2/include/mach/io.h
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#ifndef __MACH_PRIMA2_IO_H
-#define __MACH_PRIMA2_IO_H
-
-#define IO_SPACE_LIMIT ((resource_size_t)0)
-
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h
deleted file mode 100644
index fdca3be..0000000
--- a/arch/arm/mach-pxa/include/mach/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * arch/arm/mach-pxa/include/mach/io.h
- *
- * Copied from asm/arch/sa1100/io.h
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#include <mach/hardware.h>
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-realview/include/mach/io.h b/arch/arm/mach-realview/include/mach/io.h
deleted file mode 100644
index f05bcdf..0000000
--- a/arch/arm/mach-realview/include/mach/io.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-realview/include/mach/io.h
- *
- * Copyright (C) 2003 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-s3c64xx/include/mach/io.h b/arch/arm/mach-s3c64xx/include/mach/io.h
deleted file mode 100644
index de5716d..0000000
--- a/arch/arm/mach-s3c64xx/include/mach/io.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* arch/arm/mach-s3c64xxinclude/mach/io.h
- *
- * Copyright 2008 Simtec Electronics
- * Ben Dooks <ben-linux@fluff.org>
- *
- * Default IO routines for S3C64XX based
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/* No current ISA/PCI bus support. */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#define IO_SPACE_LIMIT (0xFFFFFFFF)
-
-#endif
diff --git a/arch/arm/mach-s5p64x0/include/mach/io.h b/arch/arm/mach-s5p64x0/include/mach/io.h
deleted file mode 100644
index a3e095c..0000000
--- a/arch/arm/mach-s5p64x0/include/mach/io.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* linux/arch/arm/mach-s5p64x0/include/mach/io.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * Copyright 2008 Simtec Electronics
- * Ben Dooks <ben-linux@fluff.org>
- *
- * Default IO routines for S5P64X0 based
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/* No current ISA/PCI bus support. */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#define IO_SPACE_LIMIT (0xFFFFFFFF)
-
-#endif
diff --git a/arch/arm/mach-s5pc100/include/mach/io.h b/arch/arm/mach-s5pc100/include/mach/io.h
deleted file mode 100644
index 819acf5..0000000
--- a/arch/arm/mach-s5pc100/include/mach/io.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* arch/arm/mach-s5pc100/include/mach/io.h
- *
- * Copyright 2008 Simtec Electronics
- * Ben Dooks <ben-linux@fluff.org>
- *
- * Default IO routines for S5PC100 systems
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/* No current ISA/PCI bus support. */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#define IO_SPACE_LIMIT (0xFFFFFFFF)
-
-#endif
diff --git a/arch/arm/mach-s5pv210/include/mach/io.h b/arch/arm/mach-s5pv210/include/mach/io.h
deleted file mode 100644
index 5ab9d56..0000000
--- a/arch/arm/mach-s5pv210/include/mach/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* linux/arch/arm/mach-s5pv210/include/mach/io.h
- *
- * Copyright 2008-2010 Ben Dooks <ben-linux@fluff.org>
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- * http://www.samsung.com/
- *
- * Based on arch/arm/mach-s5p6442/include/mach/io.h
- *
- * Default IO routines for S5PV210
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H __FILE__
-
-/* No current ISA/PCI bus support. */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#define IO_SPACE_LIMIT (0xFFFFFFFF)
-
-#endif /* __ASM_ARM_ARCH_IO_H */
diff --git a/arch/arm/mach-sa1100/include/mach/io.h b/arch/arm/mach-sa1100/include/mach/io.h
deleted file mode 100644
index dfc27ff..0000000
--- a/arch/arm/mach-sa1100/include/mach/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * arch/arm/mach-sa1100/include/mach/io.h
- *
- * Copyright (C) 1997-1999 Russell King
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/*
- * __io() is required to be an equivalent mapping to __mem_pci() for
- * SOC_COMMON to work.
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-shmobile/include/mach/io.h b/arch/arm/mach-shmobile/include/mach/io.h
deleted file mode 100644
index 7339fe4..0000000
--- a/arch/arm/mach-shmobile/include/mach/io.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __ASM_MACH_IO_H
-#define __ASM_MACH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) ((void __iomem *)(a))
-#define __mem_pci(a) (a)
-
-#endif /* __ASM_MACH_IO_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/io.h b/arch/arm/mach-spear3xx/include/mach/io.h
deleted file mode 100644
index 30cff8a..0000000
--- a/arch/arm/mach-spear3xx/include/mach/io.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/io.h
- *
- * IO definitions for SPEAr3xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_IO_H
-#define __MACH_IO_H
-
-#include <plat/io.h>
-
-#endif /* __MACH_IO_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/io.h b/arch/arm/mach-spear6xx/include/mach/io.h
deleted file mode 100644
index fb7c106..0000000
--- a/arch/arm/mach-spear6xx/include/mach/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/io.h
- *
- * IO definitions for SPEAr6xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_IO_H
-#define __MACH_IO_H
-
-#include <plat/io.h>
-
-#endif /* __MACH_IO_H */
-
diff --git a/arch/arm/mach-u300/include/mach/io.h b/arch/arm/mach-u300/include/mach/io.h
deleted file mode 100644
index 5d6b4c1..0000000
--- a/arch/arm/mach-u300/include/mach/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *
- * arch/arm/mach-u300/include/mach/io.h
- *
- *
- * Copyright (C) 2006-2009 ST-Ericsson AB
- * License terms: GNU General Public License (GPL) version 2
- * Dummy IO map for being able to use writew()/readw(),
- * writel()/readw() and similar accessor functions.
- * Author: Linus Walleij <linus.walleij@stericsson.com>
- */
-#ifndef __MACH_IO_H
-#define __MACH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-ux500/include/mach/io.h b/arch/arm/mach-ux500/include/mach/io.h
deleted file mode 100644
index 1cf3f44..0000000
--- a/arch/arm/mach-ux500/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-u8500/include/mach/io.h
- *
- * Copyright (C) 1997-1999 Russell King
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h
deleted file mode 100644
index f067c14..0000000
--- a/arch/arm/mach-versatile/include/mach/io.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-versatile/include/mach/io.h
- *
- * Copyright (C) 2003 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-vexpress/include/mach/io.h b/arch/arm/mach-vexpress/include/mach/io.h
deleted file mode 100644
index 13522d8..0000000
--- a/arch/arm/mach-vexpress/include/mach/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/mach-vexpress/include/mach/io.h
- *
- * Copyright (C) 2003 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-vt8500/include/mach/io.h b/arch/arm/mach-vt8500/include/mach/io.h
deleted file mode 100644
index 46181ee..0000000
--- a/arch/arm/mach-vt8500/include/mach/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * arch/arm/mach-vt8500/include/mach/io.h
- *
- * Copyright (C) 2010 Alexey Charkov
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define __io(a) __typesafe_io((a) + 0xf0000000)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/mach-w90x900/include/mach/io.h b/arch/arm/mach-w90x900/include/mach/io.h
deleted file mode 100644
index d96ab99..0000000
--- a/arch/arm/mach-w90x900/include/mach/io.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * arch/arm/mach-w90x900/include/mach/io.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * Wan ZongShun <mcuos.com@gmail.com>
- *
- * Based on arch/arm/mach-s3c2410/include/mach/io.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * 1:1 mapping for ioremapped regions.
- */
-
-#define __mem_pci(a) (a)
-#define __io(a) __typesafe_io(a)
-
-#endif
diff --git a/arch/arm/mach-zynq/include/mach/io.h b/arch/arm/mach-zynq/include/mach/io.h
deleted file mode 100644
index 39d9885..0000000
--- a/arch/arm/mach-zynq/include/mach/io.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* arch/arm/mach-zynq/include/mach/io.h
- *
- * Copyright (C) 2011 Xilinx
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_IO_H__
-#define __MACH_IO_H__
-
-/* Allow IO space to be anywhere in the memory */
-
-#define IO_SPACE_LIMIT 0xffff
-
-/* IO address mapping macros, nothing special at this time but required */
-
-#ifdef __ASSEMBLER__
-#define IOMEM(x) (x)
-#else
-#define IOMEM(x) ((void __force __iomem *)(x))
-#endif
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
deleted file mode 100644
index ea9d95e..0000000
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_MXC_IO_H__
-#define __ASM_ARCH_MXC_IO_H__
-
-/* Allow IO space to be anywhere in the memory */
-#define IO_SPACE_LIMIT 0xffffffff
-
-/* io address mapping macro */
-#define __io(a) __typesafe_io(a)
-
-#define __mem_pci(a) (a)
-
-#endif
diff --git a/arch/arm/plat-spear/include/plat/io.h b/arch/arm/plat-spear/include/plat/io.h
deleted file mode 100644
index 4d4ba82..0000000
--- a/arch/arm/plat-spear/include/plat/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/io.h
- *
- * IO definitions for SPEAr platform
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __PLAT_IO_H
-#define __PLAT_IO_H
-
-#define IO_SPACE_LIMIT 0xFFFFFFFF
-
-#define __io(a) __typesafe_io(a)
-#define __mem_pci(a) (a)
-
-#endif /* __PLAT_IO_H */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 18/30] ARM: remove bunch of now unused mach/io.h files
2012-03-02 3:13 ` [PATCH v3 18/30] ARM: remove bunch of now unused mach/io.h files Rob Herring
@ 2012-03-05 19:33 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:33 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Now that many platforms don't need mach/io.h, remove the usused ones.
unused*
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Acked-by: Jamie Iles <jamie@jamieiles.com>
> Acked-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/mach-at91/include/mach/io.h | 31 ------------------
> arch/arm/mach-bcmring/include/mach/io.h | 33 -------------------
> arch/arm/mach-clps711x/include/mach/io.h | 36 ---------------------
> arch/arm/mach-cns3xxx/include/mach/io.h | 17 ----------
> arch/arm/mach-davinci/include/mach/io.h | 24 --------------
> arch/arm/mach-ep93xx/include/mach/io.h | 13 --------
> arch/arm/mach-exynos/include/mach/io.h | 26 ---------------
> arch/arm/mach-gemini/include/mach/io.h | 18 ----------
> arch/arm/mach-h720x/include/mach/io.h | 22 -------------
> arch/arm/mach-highbank/include/mach/io.h | 7 ----
> arch/arm/mach-ks8695/include/mach/io.h | 19 -----------
> arch/arm/mach-lpc32xx/include/mach/io.h | 27 ----------------
> arch/arm/mach-mmp/include/mach/io.h | 21 ------------
> arch/arm/mach-msm/include/mach/io.h | 24 --------------
> arch/arm/mach-mxs/include/mach/io.h | 22 -------------
> arch/arm/mach-netx/include/mach/io.h | 28 ----------------
> arch/arm/mach-nomadik/include/mach/io.h | 22 -------------
> arch/arm/mach-omap1/include/mach/io.h | 46 ---------------------------
> arch/arm/mach-omap2/include/mach/io.h | 49 -----------------------------
> arch/arm/mach-orion5x/include/mach/io.h | 21 ------------
> arch/arm/mach-picoxcell/include/mach/io.h | 22 -------------
> arch/arm/mach-pnx4008/include/mach/io.h | 21 ------------
> arch/arm/mach-prima2/include/mach/io.h | 16 ---------
> arch/arm/mach-pxa/include/mach/io.h | 20 ------------
> arch/arm/mach-realview/include/mach/io.h | 28 ----------------
> arch/arm/mach-s3c64xx/include/mach/io.h | 18 ----------
> arch/arm/mach-s5p64x0/include/mach/io.h | 25 ---------------
> arch/arm/mach-s5pc100/include/mach/io.h | 18 ----------
> arch/arm/mach-s5pv210/include/mach/io.h | 26 ---------------
> arch/arm/mach-sa1100/include/mach/io.h | 20 ------------
> arch/arm/mach-shmobile/include/mach/io.h | 9 -----
> arch/arm/mach-spear3xx/include/mach/io.h | 19 -----------
> arch/arm/mach-spear6xx/include/mach/io.h | 20 ------------
> arch/arm/mach-u300/include/mach/io.h | 20 ------------
> arch/arm/mach-ux500/include/mach/io.h | 22 -------------
> arch/arm/mach-versatile/include/mach/io.h | 28 ----------------
> arch/arm/mach-vexpress/include/mach/io.h | 26 ---------------
> arch/arm/mach-vt8500/include/mach/io.h | 26 ---------------
> arch/arm/mach-w90x900/include/mach/io.h | 30 -----------------
> arch/arm/mach-zynq/include/mach/io.h | 33 -------------------
> arch/arm/plat-mxc/include/mach/io.h | 22 -------------
> arch/arm/plat-spear/include/plat/io.h | 22 -------------
> 42 files changed, 0 insertions(+), 997 deletions(-)
> delete mode 100644 arch/arm/mach-at91/include/mach/io.h
> delete mode 100644 arch/arm/mach-bcmring/include/mach/io.h
> delete mode 100644 arch/arm/mach-clps711x/include/mach/io.h
> delete mode 100644 arch/arm/mach-cns3xxx/include/mach/io.h
> delete mode 100644 arch/arm/mach-davinci/include/mach/io.h
> delete mode 100644 arch/arm/mach-ep93xx/include/mach/io.h
> delete mode 100644 arch/arm/mach-exynos/include/mach/io.h
> delete mode 100644 arch/arm/mach-gemini/include/mach/io.h
> delete mode 100644 arch/arm/mach-h720x/include/mach/io.h
> delete mode 100644 arch/arm/mach-highbank/include/mach/io.h
> delete mode 100644 arch/arm/mach-ks8695/include/mach/io.h
> delete mode 100644 arch/arm/mach-lpc32xx/include/mach/io.h
> delete mode 100644 arch/arm/mach-mmp/include/mach/io.h
> delete mode 100644 arch/arm/mach-msm/include/mach/io.h
> delete mode 100644 arch/arm/mach-mxs/include/mach/io.h
> delete mode 100644 arch/arm/mach-netx/include/mach/io.h
> delete mode 100644 arch/arm/mach-nomadik/include/mach/io.h
> delete mode 100644 arch/arm/mach-omap1/include/mach/io.h
> delete mode 100644 arch/arm/mach-omap2/include/mach/io.h
> delete mode 100644 arch/arm/mach-orion5x/include/mach/io.h
> delete mode 100644 arch/arm/mach-picoxcell/include/mach/io.h
> delete mode 100644 arch/arm/mach-pnx4008/include/mach/io.h
> delete mode 100644 arch/arm/mach-prima2/include/mach/io.h
> delete mode 100644 arch/arm/mach-pxa/include/mach/io.h
> delete mode 100644 arch/arm/mach-realview/include/mach/io.h
> delete mode 100644 arch/arm/mach-s3c64xx/include/mach/io.h
> delete mode 100644 arch/arm/mach-s5p64x0/include/mach/io.h
> delete mode 100644 arch/arm/mach-s5pc100/include/mach/io.h
> delete mode 100644 arch/arm/mach-s5pv210/include/mach/io.h
> delete mode 100644 arch/arm/mach-sa1100/include/mach/io.h
> delete mode 100644 arch/arm/mach-shmobile/include/mach/io.h
> delete mode 100644 arch/arm/mach-spear3xx/include/mach/io.h
> delete mode 100644 arch/arm/mach-spear6xx/include/mach/io.h
> delete mode 100644 arch/arm/mach-u300/include/mach/io.h
> delete mode 100644 arch/arm/mach-ux500/include/mach/io.h
> delete mode 100644 arch/arm/mach-versatile/include/mach/io.h
> delete mode 100644 arch/arm/mach-vexpress/include/mach/io.h
> delete mode 100644 arch/arm/mach-vt8500/include/mach/io.h
> delete mode 100644 arch/arm/mach-w90x900/include/mach/io.h
> delete mode 100644 arch/arm/mach-zynq/include/mach/io.h
> delete mode 100644 arch/arm/plat-mxc/include/mach/io.h
> delete mode 100644 arch/arm/plat-spear/include/plat/io.h
>
> diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
> deleted file mode 100644
> index 4003001..0000000
> --- a/arch/arm/mach-at91/include/mach/io.h
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -/*
> - * arch/arm/mach-at91/include/mach/io.h
> - *
> - * Copyright (C) 2003 SAN People
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -
> -#ifndef __ASM_ARCH_IO_H
> -#define __ASM_ARCH_IO_H
> -
> -#include <mach/hardware.h>
> -
> -#define IO_SPACE_LIMIT 0xFFFFFFFF
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-bcmring/include/mach/io.h b/arch/arm/mach-bcmring/include/mach/io.h
> deleted file mode 100644
> index dae5e9b..0000000
> --- a/arch/arm/mach-bcmring/include/mach/io.h
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -/*
> - *
> - * Copyright (C) 1999 ARM Limited
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#include <mach/hardware.h>
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-clps711x/include/mach/io.h b/arch/arm/mach-clps711x/include/mach/io.h
> deleted file mode 100644
> index 2e0b3ce..0000000
> --- a/arch/arm/mach-clps711x/include/mach/io.h
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -/*
> - * arch/arm/mach-clps711x/include/mach/io.h
> - *
> - * Copyright (C) 1999 ARM Limited
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -/*
> - * We don't support ins[lb]/outs[lb]. Make them fault.
> - */
> -#define __raw_readsb(p,d,l) do { *(int *)0 = 0; } while (0)
> -#define __raw_readsl(p,d,l) do { *(int *)0 = 0; } while (0)
> -#define __raw_writesb(p,d,l) do { *(int *)0 = 0; } while (0)
> -#define __raw_writesl(p,d,l) do { *(int *)0 = 0; } while (0)
> -
> -#endif
> diff --git a/arch/arm/mach-cns3xxx/include/mach/io.h b/arch/arm/mach-cns3xxx/include/mach/io.h
> deleted file mode 100644
> index 33b6fc1..0000000
> --- a/arch/arm/mach-cns3xxx/include/mach/io.h
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -/*
> - * Copyright 2008 Cavium Networks
> - * Copyright 2003 ARM Limited
> - *
> - * This file is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License, Version 2, as
> - * published by the Free Software Foundation.
> - */
> -#ifndef __MACH_IO_H
> -#define __MACH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
> deleted file mode 100644
> index b2267d1..0000000
> --- a/arch/arm/mach-davinci/include/mach/io.h
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -/*
> - * DaVinci IO address definitions
> - *
> - * Copied from include/asm/arm/arch-omap/io.h
> - *
> - * 2007 (c) MontaVista Software, Inc. This file is licensed under
> - * the terms of the GNU General Public License version 2. This program
> - * is licensed "as is" without any warranty of any kind, whether express
> - * or implied.
> - */
> -#ifndef __ASM_ARCH_IO_H
> -#define __ASM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -#define __mem_isa(a) (a)
> -
> -#endif /* __ASM_ARCH_IO_H */
> diff --git a/arch/arm/mach-ep93xx/include/mach/io.h b/arch/arm/mach-ep93xx/include/mach/io.h
> deleted file mode 100644
> index 17e76ef..0000000
> --- a/arch/arm/mach-ep93xx/include/mach/io.h
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -/*
> - * arch/arm/mach-ep93xx/include/mach/io.h
> - */
> -
> -#ifndef __ASM_MACH_IO_H
> -#define __ASM_MACH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(p) __typesafe_io(p)
> -#define __mem_pci(p) (p)
> -
> -#endif /* __ASM_MACH_IO_H */
> diff --git a/arch/arm/mach-exynos/include/mach/io.h b/arch/arm/mach-exynos/include/mach/io.h
> deleted file mode 100644
> index d5478d2..0000000
> --- a/arch/arm/mach-exynos/include/mach/io.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/* linux/arch/arm/mach-exynos4/include/mach/io.h
> - *
> - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
> - * http://www.samsung.com
> - *
> - * Copyright 2008-2010 Ben Dooks <ben-linux@fluff.org>
> - *
> - * Based on arch/arm/mach-s5p6442/include/mach/io.h
> - *
> - * Default IO routines for EXYNOS4
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> -*/
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H __FILE__
> -
> -/* No current ISA/PCI bus support. */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#define IO_SPACE_LIMIT (0xFFFFFFFF)
> -
> -#endif /* __ASM_ARM_ARCH_IO_H */
> diff --git a/arch/arm/mach-gemini/include/mach/io.h b/arch/arm/mach-gemini/include/mach/io.h
> deleted file mode 100644
> index c548056..0000000
> --- a/arch/arm/mach-gemini/include/mach/io.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/*
> - * Copyright (C) 2001-2006 Storlink, Corp.
> - * Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - */
> -#ifndef __MACH_IO_H
> -#define __MACH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif /* __MACH_IO_H */
> diff --git a/arch/arm/mach-h720x/include/mach/io.h b/arch/arm/mach-h720x/include/mach/io.h
> deleted file mode 100644
> index 2c8659c..0000000
> --- a/arch/arm/mach-h720x/include/mach/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * arch/arm/mach-h720x/include/mach/io.h
> - *
> - * Copyright (C) 2000 Steve Hill (sjhill at cotw.com)
> - *
> - * Changelog:
> - *
> - * 09-19-2001 JJKIM
> - * Created from arch/arm/mach-l7200/include/mach/io.h
> - *
> - * 03-27-2003 Robert Schwebel <r.schwebel@pengutronix.de>:
> - * re-unified header files for h720x
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-highbank/include/mach/io.h b/arch/arm/mach-highbank/include/mach/io.h
> deleted file mode 100644
> index 70cfa3b..0000000
> --- a/arch/arm/mach-highbank/include/mach/io.h
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -#ifndef __MACH_IO_H
> -#define __MACH_IO_H
> -
> -#define __io(a) ({ (void)(a); __typesafe_io(0); })
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-ks8695/include/mach/io.h b/arch/arm/mach-ks8695/include/mach/io.h
> deleted file mode 100644
> index a7a63ac..0000000
> --- a/arch/arm/mach-ks8695/include/mach/io.h
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -/*
> - * arch/arm/mach-ks8695/include/mach/io.h
> - *
> - * Copyright (C) 2006 Andrew Victor
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __ASM_ARCH_IO_H
> -#define __ASM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-lpc32xx/include/mach/io.h b/arch/arm/mach-lpc32xx/include/mach/io.h
> deleted file mode 100644
> index 9b59ab5..0000000
> --- a/arch/arm/mach-lpc32xx/include/mach/io.h
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/*
> - * arch/arm/mach-lpc32xx/include/mach/io.h
> - *
> - * Author: Kevin Wells <kevin.wells@nxp.com>
> - *
> - * Copyright (C) 2010 NXP Semiconductors
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-mmp/include/mach/io.h b/arch/arm/mach-mmp/include/mach/io.h
> deleted file mode 100644
> index e7adf3d..0000000
> --- a/arch/arm/mach-mmp/include/mach/io.h
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -/*
> - * linux/arch/arm/mach-mmp/include/mach/io.h
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#ifndef __ASM_MACH_IO_H
> -#define __ASM_MACH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif /* __ASM_MACH_IO_H */
> diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
> deleted file mode 100644
> index 1071f98..0000000
> --- a/arch/arm/mach-msm/include/mach/io.h
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -/* arch/arm/mach-msm/include/mach/io.h
> - *
> - * Copyright (C) 2007 Google, Inc.
> - *
> - * This software is licensed under the terms of the GNU General Public
> - * License version 2, as published by the Free Software Foundation, and
> - * may be copied, distributed, and modified under those terms.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-mxs/include/mach/io.h b/arch/arm/mach-mxs/include/mach/io.h
> deleted file mode 100644
> index 289b722..0000000
> --- a/arch/arm/mach-mxs/include/mach/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
> - */
> -
> -/*
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#ifndef __MACH_MXS_IO_H__
> -#define __MACH_MXS_IO_H__
> -
> -/* Allow IO space to be anywhere in the memory */
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/* io address mapping macro */
> -#define __io(a) __typesafe_io(a)
> -
> -#define __mem_pci(a) (a)
> -
> -#endif /* __MACH_MXS_IO_H__ */
> diff --git a/arch/arm/mach-netx/include/mach/io.h b/arch/arm/mach-netx/include/mach/io.h
> deleted file mode 100644
> index c3921cb..0000000
> --- a/arch/arm/mach-netx/include/mach/io.h
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -/*
> - * arch/arm/mach-netx/include/mach/io.h
> - *
> - * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2
> - * as published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-nomadik/include/mach/io.h b/arch/arm/mach-nomadik/include/mach/io.h
> deleted file mode 100644
> index 2e1eca1..0000000
> --- a/arch/arm/mach-nomadik/include/mach/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * arch/arm/mach-nomadik/include/mach/io.h (copied from mach-sa1100)
> - *
> - * Copyright (C) 1997-1999 Russell King
> - *
> - * Modifications:
> - * 06-12-1997 RMK Created.
> - * 07-04-1999 RMK Major cleanup
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h
> deleted file mode 100644
> index 37b12e1..0000000
> --- a/arch/arm/mach-omap1/include/mach/io.h
> +++ /dev/null
> @@ -1,46 +0,0 @@
> -/*
> - * arch/arm/mach-omap1/include/mach/io.h
> - *
> - * IO definitions for TI OMAP processors and boards
> - *
> - * Copied from arch/arm/mach-sa1100/include/mach/io.h
> - * Copyright (C) 1997-1999 Russell King
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - *
> - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
> - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
> - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
> - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
> - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
> - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
> - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> - *
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, write to the Free Software Foundation, Inc.,
> - * 675 Mass Ave, Cambridge, MA 02139, USA.
> - *
> - * Modifications:
> - * 06-12-1997 RMK Created.
> - * 07-04-1999 RMK Major cleanup
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-omap2/include/mach/io.h b/arch/arm/mach-omap2/include/mach/io.h
> deleted file mode 100644
> index b8758c8..0000000
> --- a/arch/arm/mach-omap2/include/mach/io.h
> +++ /dev/null
> @@ -1,49 +0,0 @@
> -/*
> - * arch/arm/mach-omap2/include/mach/io.h
> - *
> - * IO definitions for TI OMAP processors and boards
> - *
> - * Copied from arch/arm/mach-sa1100/include/mach/io.h
> - * Copyright (C) 1997-1999 Russell King
> - *
> - * Copyright (C) 2009 Texas Instruments
> - * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - *
> - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
> - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
> - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
> - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
> - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
> - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
> - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> - *
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, write to the Free Software Foundation, Inc.,
> - * 675 Mass Ave, Cambridge, MA 02139, USA.
> - *
> - * Modifications:
> - * 06-12-1997 RMK Created.
> - * 07-04-1999 RMK Major cleanup
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h
> deleted file mode 100644
> index 444136d..0000000
> --- a/arch/arm/mach-orion5x/include/mach/io.h
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -/*
> - * arch/arm/mach-orion5x/include/mach/io.h
> - *
> - * Tzachi Perelstein <tzachi@marvell.com>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __ASM_ARCH_IO_H
> -#define __ASM_ARCH_IO_H
> -
> -#include "orion5x.h"
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-picoxcell/include/mach/io.h b/arch/arm/mach-picoxcell/include/mach/io.h
> deleted file mode 100644
> index 7573ec7..0000000
> --- a/arch/arm/mach-picoxcell/include/mach/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * Copyright (c) 2011 Picochip Ltd., Jamie Iles
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -/* No ioports, but needed for driver compatibility. */
> -#define __io(a) __typesafe_io(a)
> -/* No PCI possible on picoxcell. */
> -#define __mem_pci(a) (a)
> -
> -#endif /* __ASM_ARM_ARCH_IO_H */
> diff --git a/arch/arm/mach-pnx4008/include/mach/io.h b/arch/arm/mach-pnx4008/include/mach/io.h
> deleted file mode 100644
> index cbf0904..0000000
> --- a/arch/arm/mach-pnx4008/include/mach/io.h
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -
> -/*
> - * arch/arm/mach-pnx4008/include/mach/io.h
> - *
> - * Author: Dmitry Chigirev <chigirev@ru.mvista.com>
> - *
> - * 2005 (c) MontaVista Software, Inc. This file is licensed under
> - * the terms of the GNU General Public License version 2. This program
> - * is licensed "as is" without any warranty of any kind, whether express
> - * or implied.
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-prima2/include/mach/io.h b/arch/arm/mach-prima2/include/mach/io.h
> deleted file mode 100644
> index 6c31e9e..0000000
> --- a/arch/arm/mach-prima2/include/mach/io.h
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/*
> - * arch/arm/mach-prima2/include/mach/io.h
> - *
> - * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
> - *
> - * Licensed under GPLv2 or later.
> - */
> -
> -#ifndef __MACH_PRIMA2_IO_H
> -#define __MACH_PRIMA2_IO_H
> -
> -#define IO_SPACE_LIMIT ((resource_size_t)0)
> -
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h
> deleted file mode 100644
> index fdca3be..0000000
> --- a/arch/arm/mach-pxa/include/mach/io.h
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -/*
> - * arch/arm/mach-pxa/include/mach/io.h
> - *
> - * Copied from asm/arch/sa1100/io.h
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#include <mach/hardware.h>
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-realview/include/mach/io.h b/arch/arm/mach-realview/include/mach/io.h
> deleted file mode 100644
> index f05bcdf..0000000
> --- a/arch/arm/mach-realview/include/mach/io.h
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -/*
> - * arch/arm/mach-realview/include/mach/io.h
> - *
> - * Copyright (C) 2003 ARM Limited
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-s3c64xx/include/mach/io.h b/arch/arm/mach-s3c64xx/include/mach/io.h
> deleted file mode 100644
> index de5716d..0000000
> --- a/arch/arm/mach-s3c64xx/include/mach/io.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/* arch/arm/mach-s3c64xxinclude/mach/io.h
> - *
> - * Copyright 2008 Simtec Electronics
> - * Ben Dooks <ben-linux@fluff.org>
> - *
> - * Default IO routines for S3C64XX based
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -/* No current ISA/PCI bus support. */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#define IO_SPACE_LIMIT (0xFFFFFFFF)
> -
> -#endif
> diff --git a/arch/arm/mach-s5p64x0/include/mach/io.h b/arch/arm/mach-s5p64x0/include/mach/io.h
> deleted file mode 100644
> index a3e095c..0000000
> --- a/arch/arm/mach-s5p64x0/include/mach/io.h
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/* linux/arch/arm/mach-s5p64x0/include/mach/io.h
> - *
> - * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> - * http://www.samsung.com
> - *
> - * Copyright 2008 Simtec Electronics
> - * Ben Dooks <ben-linux@fluff.org>
> - *
> - * Default IO routines for S5P64X0 based
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> -*/
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -/* No current ISA/PCI bus support. */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#define IO_SPACE_LIMIT (0xFFFFFFFF)
> -
> -#endif
> diff --git a/arch/arm/mach-s5pc100/include/mach/io.h b/arch/arm/mach-s5pc100/include/mach/io.h
> deleted file mode 100644
> index 819acf5..0000000
> --- a/arch/arm/mach-s5pc100/include/mach/io.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/* arch/arm/mach-s5pc100/include/mach/io.h
> - *
> - * Copyright 2008 Simtec Electronics
> - * Ben Dooks <ben-linux@fluff.org>
> - *
> - * Default IO routines for S5PC100 systems
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -/* No current ISA/PCI bus support. */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#define IO_SPACE_LIMIT (0xFFFFFFFF)
> -
> -#endif
> diff --git a/arch/arm/mach-s5pv210/include/mach/io.h b/arch/arm/mach-s5pv210/include/mach/io.h
> deleted file mode 100644
> index 5ab9d56..0000000
> --- a/arch/arm/mach-s5pv210/include/mach/io.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/* linux/arch/arm/mach-s5pv210/include/mach/io.h
> - *
> - * Copyright 2008-2010 Ben Dooks <ben-linux@fluff.org>
> - *
> - * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> - * http://www.samsung.com/
> - *
> - * Based on arch/arm/mach-s5p6442/include/mach/io.h
> - *
> - * Default IO routines for S5PV210
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> -*/
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H __FILE__
> -
> -/* No current ISA/PCI bus support. */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#define IO_SPACE_LIMIT (0xFFFFFFFF)
> -
> -#endif /* __ASM_ARM_ARCH_IO_H */
> diff --git a/arch/arm/mach-sa1100/include/mach/io.h b/arch/arm/mach-sa1100/include/mach/io.h
> deleted file mode 100644
> index dfc27ff..0000000
> --- a/arch/arm/mach-sa1100/include/mach/io.h
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -/*
> - * arch/arm/mach-sa1100/include/mach/io.h
> - *
> - * Copyright (C) 1997-1999 Russell King
> - *
> - * Modifications:
> - * 06-12-1997 RMK Created.
> - * 07-04-1999 RMK Major cleanup
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -/*
> - * __io() is required to be an equivalent mapping to __mem_pci() for
> - * SOC_COMMON to work.
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-shmobile/include/mach/io.h b/arch/arm/mach-shmobile/include/mach/io.h
> deleted file mode 100644
> index 7339fe4..0000000
> --- a/arch/arm/mach-shmobile/include/mach/io.h
> +++ /dev/null
> @@ -1,9 +0,0 @@
> -#ifndef __ASM_MACH_IO_H
> -#define __ASM_MACH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) ((void __iomem *)(a))
> -#define __mem_pci(a) (a)
> -
> -#endif /* __ASM_MACH_IO_H */
> diff --git a/arch/arm/mach-spear3xx/include/mach/io.h b/arch/arm/mach-spear3xx/include/mach/io.h
> deleted file mode 100644
> index 30cff8a..0000000
> --- a/arch/arm/mach-spear3xx/include/mach/io.h
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -/*
> - * arch/arm/mach-spear3xx/include/mach/io.h
> - *
> - * IO definitions for SPEAr3xx machine family
> - *
> - * Copyright (C) 2009 ST Microelectronics
> - * Viresh Kumar<viresh.kumar@st.com>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __MACH_IO_H
> -#define __MACH_IO_H
> -
> -#include <plat/io.h>
> -
> -#endif /* __MACH_IO_H */
> diff --git a/arch/arm/mach-spear6xx/include/mach/io.h b/arch/arm/mach-spear6xx/include/mach/io.h
> deleted file mode 100644
> index fb7c106..0000000
> --- a/arch/arm/mach-spear6xx/include/mach/io.h
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -/*
> - * arch/arm/mach-spear6xx/include/mach/io.h
> - *
> - * IO definitions for SPEAr6xx machine family
> - *
> - * Copyright (C) 2009 ST Microelectronics
> - * Rajeev Kumar Kumar<rajeev-dlh.kumar@st.com>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __MACH_IO_H
> -#define __MACH_IO_H
> -
> -#include <plat/io.h>
> -
> -#endif /* __MACH_IO_H */
> -
> diff --git a/arch/arm/mach-u300/include/mach/io.h b/arch/arm/mach-u300/include/mach/io.h
> deleted file mode 100644
> index 5d6b4c1..0000000
> --- a/arch/arm/mach-u300/include/mach/io.h
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -/*
> - *
> - * arch/arm/mach-u300/include/mach/io.h
> - *
> - *
> - * Copyright (C) 2006-2009 ST-Ericsson AB
> - * License terms: GNU General Public License (GPL) version 2
> - * Dummy IO map for being able to use writew()/readw(),
> - * writel()/readw() and similar accessor functions.
> - * Author: Linus Walleij <linus.walleij@stericsson.com>
> - */
> -#ifndef __MACH_IO_H
> -#define __MACH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-ux500/include/mach/io.h b/arch/arm/mach-ux500/include/mach/io.h
> deleted file mode 100644
> index 1cf3f44..0000000
> --- a/arch/arm/mach-ux500/include/mach/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * arch/arm/mach-u8500/include/mach/io.h
> - *
> - * Copyright (C) 1997-1999 Russell King
> - *
> - * Modifications:
> - * 06-12-1997 RMK Created.
> - * 07-04-1999 RMK Major cleanup
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * We don't actually have real ISA nor PCI buses, but there is so many
> - * drivers out there that might just work if we fake them...
> - */
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h
> deleted file mode 100644
> index f067c14..0000000
> --- a/arch/arm/mach-versatile/include/mach/io.h
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -/*
> - * arch/arm/mach-versatile/include/mach/io.h
> - *
> - * Copyright (C) 2003 ARM Limited
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-vexpress/include/mach/io.h b/arch/arm/mach-vexpress/include/mach/io.h
> deleted file mode 100644
> index 13522d8..0000000
> --- a/arch/arm/mach-vexpress/include/mach/io.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/*
> - * arch/arm/mach-vexpress/include/mach/io.h
> - *
> - * Copyright (C) 2003 ARM Limited
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-vt8500/include/mach/io.h b/arch/arm/mach-vt8500/include/mach/io.h
> deleted file mode 100644
> index 46181ee..0000000
> --- a/arch/arm/mach-vt8500/include/mach/io.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/*
> - * arch/arm/mach-vt8500/include/mach/io.h
> - *
> - * Copyright (C) 2010 Alexey Charkov
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> - */
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define __io(a) __typesafe_io((a) + 0xf0000000)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/mach-w90x900/include/mach/io.h b/arch/arm/mach-w90x900/include/mach/io.h
> deleted file mode 100644
> index d96ab99..0000000
> --- a/arch/arm/mach-w90x900/include/mach/io.h
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/*
> - * arch/arm/mach-w90x900/include/mach/io.h
> - *
> - * Copyright (c) 2008 Nuvoton technology corporation
> - * All rights reserved.
> - *
> - * Wan ZongShun <mcuos.com@gmail.com>
> - *
> - * Based on arch/arm/mach-s3c2410/include/mach/io.h
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - */
> -
> -#ifndef __ASM_ARM_ARCH_IO_H
> -#define __ASM_ARM_ARCH_IO_H
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/*
> - * 1:1 mapping for ioremapped regions.
> - */
> -
> -#define __mem_pci(a) (a)
> -#define __io(a) __typesafe_io(a)
> -
> -#endif
> diff --git a/arch/arm/mach-zynq/include/mach/io.h b/arch/arm/mach-zynq/include/mach/io.h
> deleted file mode 100644
> index 39d9885..0000000
> --- a/arch/arm/mach-zynq/include/mach/io.h
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -/* arch/arm/mach-zynq/include/mach/io.h
> - *
> - * Copyright (C) 2011 Xilinx
> - *
> - * This software is licensed under the terms of the GNU General Public
> - * License version 2, as published by the Free Software Foundation, and
> - * may be copied, distributed, and modified under those terms.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - */
> -
> -#ifndef __MACH_IO_H__
> -#define __MACH_IO_H__
> -
> -/* Allow IO space to be anywhere in the memory */
> -
> -#define IO_SPACE_LIMIT 0xffff
> -
> -/* IO address mapping macros, nothing special at this time but required */
> -
> -#ifdef __ASSEMBLER__
> -#define IOMEM(x) (x)
> -#else
> -#define IOMEM(x) ((void __force __iomem *)(x))
> -#endif
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
> deleted file mode 100644
> index ea9d95e..0000000
> --- a/arch/arm/plat-mxc/include/mach/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
> - */
> -
> -/*
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#ifndef __ASM_ARCH_MXC_IO_H__
> -#define __ASM_ARCH_MXC_IO_H__
> -
> -/* Allow IO space to be anywhere in the memory */
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -/* io address mapping macro */
> -#define __io(a) __typesafe_io(a)
> -
> -#define __mem_pci(a) (a)
> -
> -#endif
> diff --git a/arch/arm/plat-spear/include/plat/io.h b/arch/arm/plat-spear/include/plat/io.h
> deleted file mode 100644
> index 4d4ba82..0000000
> --- a/arch/arm/plat-spear/include/plat/io.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/*
> - * arch/arm/plat-spear/include/plat/io.h
> - *
> - * IO definitions for SPEAr platform
> - *
> - * Copyright (C) 2009 ST Microelectronics
> - * Viresh Kumar<viresh.kumar@st.com>
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __PLAT_IO_H
> -#define __PLAT_IO_H
> -
> -#define IO_SPACE_LIMIT 0xFFFFFFFF
> -
> -#define __io(a) __typesafe_io(a)
> -#define __mem_pci(a) (a)
> -
> -#endif /* __PLAT_IO_H */
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 19/30] ARM: kill off __mem_pci
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (17 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 18/30] ARM: remove bunch of now unused mach/io.h files Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 20/30] iop13xx: use more regular PCI I/O space handling Rob Herring
` (10 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
__mem_pci is only used to enable readl/writel and friends. Just condition
this on readl being defined and remove all the __mem_pci defines.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Stephen Warren <swarren@nvidia.com>
---
arch/arm/include/asm/io.h | 46 ++++++++++-----------------
arch/arm/mach-dove/include/mach/io.h | 1 -
| 13 --------
arch/arm/mach-integrator/include/mach/io.h | 1 -
arch/arm/mach-iop13xx/include/mach/io.h | 2 -
arch/arm/mach-iop32x/include/mach/io.h | 1 -
arch/arm/mach-iop33x/include/mach/io.h | 1 -
arch/arm/mach-ixp2000/include/mach/io.h | 1 -
arch/arm/mach-ixp23xx/include/mach/io.h | 1 -
arch/arm/mach-ixp4xx/include/mach/io.h | 6 +---
arch/arm/mach-kirkwood/include/mach/io.h | 2 -
arch/arm/mach-mv78xx0/include/mach/io.h | 2 -
arch/arm/mach-rpc/include/mach/io.h | 5 ---
arch/arm/mach-s3c2410/include/mach/io.h | 5 ---
arch/arm/mach-shark/include/mach/io.h | 2 -
arch/arm/mach-tegra/include/mach/io.h | 1 -
16 files changed, 18 insertions(+), 72 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index cd8c125..d7861b9 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -113,7 +113,6 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
#include <mach/io.h>
#else
#define __io(a) ({ (void)(a); __typesafe_io(0); })
-#define __mem_pci(a) (a)
#endif
/*
@@ -216,18 +215,18 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
* Again, this are defined to perform little endian accesses. See the
* IO port primitives for more information.
*/
-#ifdef __mem_pci
-#define readb_relaxed(c) ({ u8 __r = __raw_readb(__mem_pci(c)); __r; })
+#ifndef readl
+#define readb_relaxed(c) ({ u8 __r = __raw_readb(c); __r; })
#define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \
- __raw_readw(__mem_pci(c))); __r; })
+ __raw_readw(c)); __r; })
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
- __raw_readl(__mem_pci(c))); __r; })
+ __raw_readl(c)); __r; })
-#define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c)))
+#define writeb_relaxed(v,c) ((void)__raw_writeb(v,c))
#define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \
- cpu_to_le16(v),__mem_pci(c)))
+ cpu_to_le16(v),c))
#define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \
- cpu_to_le32(v),__mem_pci(c)))
+ cpu_to_le32(v),c))
#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; })
#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
@@ -237,30 +236,19 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
#define writew(v,c) ({ __iowmb(); writew_relaxed(v,c); })
#define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
-#define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l)
-#define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l)
-#define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l)
+#define readsb(p,d,l) __raw_readsb(p,d,l)
+#define readsw(p,d,l) __raw_readsw(p,d,l)
+#define readsl(p,d,l) __raw_readsl(p,d,l)
-#define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l)
-#define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l)
-#define writesl(p,d,l) __raw_writesl(__mem_pci(p),d,l)
+#define writesb(p,d,l) __raw_writesb(p,d,l)
+#define writesw(p,d,l) __raw_writesw(p,d,l)
+#define writesl(p,d,l) __raw_writesl(p,d,l)
-#define memset_io(c,v,l) _memset_io(__mem_pci(c),(v),(l))
-#define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l))
-#define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l))
+#define memset_io(c,v,l) _memset_io(c,(v),(l))
+#define memcpy_fromio(a,c,l) _memcpy_fromio((a),c,(l))
+#define memcpy_toio(c,a,l) _memcpy_toio(c,(a),(l))
-#elif !defined(readb)
-
-#define readb(c) (__readwrite_bug("readb"),0)
-#define readw(c) (__readwrite_bug("readw"),0)
-#define readl(c) (__readwrite_bug("readl"),0)
-#define writeb(v,c) __readwrite_bug("writeb")
-#define writew(v,c) __readwrite_bug("writew")
-#define writel(v,c) __readwrite_bug("writel")
-
-#define check_signature(io,sig,len) (0)
-
-#endif /* __mem_pci */
+#endif /* readl */
/*
* ioremap and friends.
diff --git a/arch/arm/mach-dove/include/mach/io.h b/arch/arm/mach-dove/include/mach/io.h
index eb4936f..29c8b85 100644
--- a/arch/arm/mach-dove/include/mach/io.h
+++ b/arch/arm/mach-dove/include/mach/io.h
@@ -15,6 +15,5 @@
#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \
DOVE_PCIE0_IO_VIRT_BASE))
-#define __mem_pci(a) (a)
#endif
--git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h
index 15a7039..aba531ee 100644
--- a/arch/arm/mach-footbridge/include/mach/io.h
+++ b/arch/arm/mach-footbridge/include/mach/io.h
@@ -27,18 +27,5 @@
* Translation of various region addresses to virtual addresses
*/
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
-#if 1
-#define __mem_pci(a) (a)
-#else
-
-static inline void __iomem *___mem_pci(void __iomem *p)
-{
- unsigned long a = (unsigned long)p;
- BUG_ON(a <= 0xc0000000 || a >= 0xe0000000);
- return p;
-}
-
-#define __mem_pci(a) ___mem_pci(a)
-#endif
#endif
diff --git a/arch/arm/mach-integrator/include/mach/io.h b/arch/arm/mach-integrator/include/mach/io.h
index 37beed3..8de70de 100644
--- a/arch/arm/mach-integrator/include/mach/io.h
+++ b/arch/arm/mach-integrator/include/mach/io.h
@@ -29,6 +29,5 @@
#define PCI_IO_VADDR 0xee000000
#define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a)))
-#define __mem_pci(a) (a)
#endif
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index 058dbfd..f131885 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -22,8 +22,6 @@
#define IO_SPACE_LIMIT 0xffffffff
#define __io(a) __iop13xx_io(a)
-#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
extern void __iomem * __iop13xx_io(unsigned long io_addr);
diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h
index 2d88264..e2ada26 100644
--- a/arch/arm/mach-iop32x/include/mach/io.h
+++ b/arch/arm/mach-iop32x/include/mach/io.h
@@ -15,6 +15,5 @@
#define IO_SPACE_LIMIT 0xffffffff
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
-#define __mem_pci(a) (a)
#endif
diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h
index a8a66fc..f7c1b65 100644
--- a/arch/arm/mach-iop33x/include/mach/io.h
+++ b/arch/arm/mach-iop33x/include/mach/io.h
@@ -15,6 +15,5 @@
#define IO_SPACE_LIMIT 0xffffffff
#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
-#define __mem_pci(a) (a)
#endif
diff --git a/arch/arm/mach-ixp2000/include/mach/io.h b/arch/arm/mach-ixp2000/include/mach/io.h
index 859e584..f6552d6 100644
--- a/arch/arm/mach-ixp2000/include/mach/io.h
+++ b/arch/arm/mach-ixp2000/include/mach/io.h
@@ -18,7 +18,6 @@
#include <mach/hardware.h>
#define IO_SPACE_LIMIT 0xffffffff
-#define __mem_pci(a) (a)
/*
* The A? revisions of the IXP2000s assert byte lanes for PCI I/O
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h
index 4ce4353..a7aceb5 100644
--- a/arch/arm/mach-ixp23xx/include/mach/io.h
+++ b/arch/arm/mach-ixp23xx/include/mach/io.h
@@ -18,6 +18,5 @@
#define IO_SPACE_LIMIT 0xffffffff
#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
-#define __mem_pci(a) (a)
#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index ffb9d6a..d76a9bb 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -39,11 +39,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
* but in some cases the performance hit is acceptable. In addition, you
* cannot mmap() PCI devices in this case.
*/
-#ifndef CONFIG_IXP4XX_INDIRECT_PCI
-
-#define __mem_pci(a) (a)
-
-#else
+#ifdef CONFIG_IXP4XX_INDIRECT_PCI
/*
* In the case of using indirect PCI, we simply return the actual PCI
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h
index 49dd0cb..5d0ab61 100644
--- a/arch/arm/mach-kirkwood/include/mach/io.h
+++ b/arch/arm/mach-kirkwood/include/mach/io.h
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr)
}
#define __io(a) __io(a)
-#define __mem_pci(a) (a)
-
#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/io.h b/arch/arm/mach-mv78xx0/include/mach/io.h
index 450e0e1..c7d9d00 100644
--- a/arch/arm/mach-mv78xx0/include/mach/io.h
+++ b/arch/arm/mach-mv78xx0/include/mach/io.h
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr)
}
#define __io(a) __io(a)
-#define __mem_pci(a) (a)
-
#endif
diff --git a/arch/arm/mach-rpc/include/mach/io.h b/arch/arm/mach-rpc/include/mach/io.h
index 695f4ed..707071a 100644
--- a/arch/arm/mach-rpc/include/mach/io.h
+++ b/arch/arm/mach-rpc/include/mach/io.h
@@ -28,9 +28,4 @@
*/
#define __io(a) (PCIO_BASE + ((a) << 2))
-/*
- * 1:1 mapping for ioremapped regions.
- */
-#define __mem_pci(x) (x)
-
#endif
diff --git a/arch/arm/mach-s3c2410/include/mach/io.h b/arch/arm/mach-s3c2410/include/mach/io.h
index 118749f..5dd1db4 100644
--- a/arch/arm/mach-s3c2410/include/mach/io.h
+++ b/arch/arm/mach-s3c2410/include/mach/io.h
@@ -208,9 +208,4 @@ DECLARE_IO(int,l,"")
#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
#define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l)
-/*
- * 1:1 mapping for ioremapped regions.
- */
-#define __mem_pci(x) (x)
-
#endif
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h
index 9ccbcec..1a45fc0 100644
--- a/arch/arm/mach-shark/include/mach/io.h
+++ b/arch/arm/mach-shark/include/mach/io.h
@@ -15,6 +15,4 @@
#define __io(a) ((void __iomem *)(0xe0000000 + (a)))
-#define __mem_pci(addr) (addr)
-
#endif
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h
index 47b4b61..fe700f9 100644
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ b/arch/arm/mach-tegra/include/mach/io.h
@@ -40,7 +40,6 @@ static inline void __iomem *__io(unsigned long addr)
#endif
#define __io(a) __io(a)
-#define __mem_pci(a) (a)
#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 20/30] iop13xx: use more regular PCI I/O space handling
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (18 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 19/30] ARM: kill off __mem_pci Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 21/30] ARM: Add fixed PCI i/o mapping Rob Herring
` (9 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Arnd Bergmann <arnd@arndb.de>
iop13xx confuses I/O port numbers with physical addresses, which breaks
legacy ISA I/O access behind PCI bridges and makes it unnecessarily hard
to unify the inb/outb accessors with other platforms. This removes the
special-casing and just puts all I/O ports into a single 128KB virtually
mapped I/O port range starting at port zero.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-iop13xx/include/mach/io.h | 6 ++--
arch/arm/mach-iop13xx/include/mach/iop13xx.h | 12 ++--------
arch/arm/mach-iop13xx/io.c | 27 --------------------------
arch/arm/mach-iop13xx/pci.c | 12 +++++-----
4 files changed, 12 insertions(+), 45 deletions(-)
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index f131885..e197cb8 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -19,10 +19,10 @@
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
-#define IO_SPACE_LIMIT 0xffffffff
+#include <mach/iop13xx.h>
-#define __io(a) __iop13xx_io(a)
+#define IO_SPACE_LIMIT (IOP13XX_PCIE_IO_WINDOW_SIZE + IOP13XX_PCIX_IO_WINDOW_SIZE - 1)
-extern void __iomem * __iop13xx_io(unsigned long io_addr);
+#define __io(a) (IOP13XX_PCIX_LOWER_IO_VA + ((a) & IO_SPACE_LIMIT))
#endif
diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
index 07e9ff7..ee1dfd2 100644
--- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h
+++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
@@ -68,17 +68,15 @@ extern unsigned long get_iop_tick_rate(void);
* 0x8000.0000 + 928M 0x2.8000.0000 (ioremap) PCIE outbound memory window
*
* IO MAP
- * 0x1000 + 64K 0x0.fffb.1000 0xfec6.1000 PCIX outbound i/o window
+ * 0x1000 + 64K 0x0.fffb.1000 0xfed6.1000 PCIX outbound i/o window
* 0x1000 + 64K 0x0.fffd.1000 0xfed7.1000 PCIE outbound i/o window
*/
#define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL
#define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL
-#define IOP13XX_PCIX_LOWER_IO_VA 0xfec60000UL
+#define IOP13XX_PCIX_LOWER_IO_VA 0xfed60000UL
#define IOP13XX_PCIX_LOWER_IO_BA 0x0UL /* OIOTVR */
#define IOP13XX_PCIX_IO_BUS_OFFSET 0x1000UL
-#define IOP13XX_PCIX_UPPER_IO_PA (IOP13XX_PCIX_LOWER_IO_PA +\
- IOP13XX_PCIX_IO_WINDOW_SIZE - 1)
-#define IOP13XX_PCIX_UPPER_IO_VA (IOP13XX_PCIX_LOWER_IO_VA +\
+#define IOP13XX_PCIX_UPPER_IO_BA (IOP13XX_PCIX_LOWER_IO_BA +\
IOP13XX_PCIX_IO_WINDOW_SIZE - 1)
#define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\
(IOP13XX_PCIX_LOWER_IO_PA\
@@ -107,10 +105,6 @@ extern unsigned long get_iop_tick_rate(void);
#define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL
#define IOP13XX_PCIE_LOWER_IO_BA 0x0UL /* OIOTVR */
#define IOP13XX_PCIE_IO_BUS_OFFSET 0x1000UL
-#define IOP13XX_PCIE_UPPER_IO_PA (IOP13XX_PCIE_LOWER_IO_PA +\
- IOP13XX_PCIE_IO_WINDOW_SIZE - 1)
-#define IOP13XX_PCIE_UPPER_IO_VA (IOP13XX_PCIE_LOWER_IO_VA +\
- IOP13XX_PCIE_IO_WINDOW_SIZE - 1)
#define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\
IOP13XX_PCIE_IO_WINDOW_SIZE - 1)
#define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 70f716f..e0ecb38 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -23,25 +23,6 @@
#include "pci.h"
-void * __iomem __iop13xx_io(unsigned long io_addr)
-{
- void __iomem * io_virt;
-
- switch (io_addr) {
- case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA:
- io_virt = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(io_addr);
- break;
- case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA:
- io_virt = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(io_addr);
- break;
- default:
- BUG();
- }
-
- return io_virt;
-}
-EXPORT_SYMBOL(__iop13xx_io);
-
void __iomem * __iop13xx_ioremap(unsigned long cookie, size_t size,
unsigned int mtype)
{
@@ -67,12 +48,6 @@ void __iomem * __iop13xx_ioremap(unsigned long cookie, size_t size,
(cookie - IOP13XX_PBI_LOWER_MEM_RA),
size, mtype, __builtin_return_address(0));
break;
- case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA:
- retval = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(cookie);
- break;
- case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA:
- retval = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(cookie);
- break;
case IOP13XX_PMMR_PHYS_MEM_BASE ... IOP13XX_PMMR_UPPER_MEM_PA:
retval = (void *) IOP13XX_PMMR_PHYS_TO_VIRT(cookie);
break;
@@ -102,8 +77,6 @@ void __iop13xx_iounmap(volatile void __iomem *addr)
goto skip;
switch ((u32) addr) {
- case IOP13XX_PCIE_LOWER_IO_VA ... IOP13XX_PCIE_UPPER_IO_VA:
- case IOP13XX_PCIX_LOWER_IO_VA ... IOP13XX_PCIX_UPPER_IO_VA:
case IOP13XX_PMMR_VIRT_MEM_BASE ... IOP13XX_PMMR_UPPER_MEM_VA:
goto skip;
}
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index b8f5a87..d72eddf 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -1042,8 +1042,8 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
<< IOP13XX_ATUX_PCIXSR_FUNC_NUM;
__raw_writel(pcixsr, IOP13XX_ATUX_PCIXSR);
- res[0].start = IOP13XX_PCIX_LOWER_IO_PA + IOP13XX_PCIX_IO_BUS_OFFSET;
- res[0].end = IOP13XX_PCIX_UPPER_IO_PA;
+ res[0].start = IOP13XX_PCIX_LOWER_IO_BA + IOP13XX_PCIX_IO_BUS_OFFSET;
+ res[0].end = IOP13XX_PCIX_UPPER_IO_BA;
res[0].name = "IQ81340 ATUX PCI I/O Space";
res[0].flags = IORESOURCE_IO;
@@ -1052,7 +1052,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
res[1].name = "IQ81340 ATUX PCI Memory Space";
res[1].flags = IORESOURCE_MEM;
sys->mem_offset = IOP13XX_PCIX_MEM_OFFSET;
- sys->io_offset = IOP13XX_PCIX_LOWER_IO_PA;
+ sys->io_offset = IOP13XX_PCIX_LOWER_IO_BA;
break;
case IOP13XX_INIT_ATU_ATUE:
/* Note: the function number field in the PCSR is ro */
@@ -1063,8 +1063,8 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
__raw_writel(pcsr, IOP13XX_ATUE_PCSR);
- res[0].start = IOP13XX_PCIE_LOWER_IO_PA + IOP13XX_PCIE_IO_BUS_OFFSET;
- res[0].end = IOP13XX_PCIE_UPPER_IO_PA;
+ res[0].start = IOP13XX_PCIE_LOWER_IO_BA + IOP13XX_PCIE_IO_BUS_OFFSET;
+ res[0].end = IOP13XX_PCIE_UPPER_IO_BA;
res[0].name = "IQ81340 ATUE PCI I/O Space";
res[0].flags = IORESOURCE_IO;
@@ -1073,7 +1073,7 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys)
res[1].name = "IQ81340 ATUE PCI Memory Space";
res[1].flags = IORESOURCE_MEM;
sys->mem_offset = IOP13XX_PCIE_MEM_OFFSET;
- sys->io_offset = IOP13XX_PCIE_LOWER_IO_PA;
+ sys->io_offset = IOP13XX_PCIE_LOWER_IO_BA;
sys->map_irq = iop13xx_pcie_map_irq;
break;
default:
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 21/30] ARM: Add fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (19 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 20/30] iop13xx: use more regular PCI I/O space handling Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:41 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 22/30] ARM: tegra: use " Rob Herring
` (8 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
This adds a fixed virtual mapping for PCI i/o addresses. The mapping is
located at the last 1MB of vmalloc region (0xfef00000).
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/include/asm/io.h | 5 +++++
arch/arm/include/asm/mach/pci.h | 18 ++++++++++++++++++
arch/arm/kernel/bios32.c | 23 +++++++++++++++++++++++
3 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index d7861b9..5a01930 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -106,11 +106,16 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
#define __iowmb() do { } while (0)
#endif
+#define PCI_IO_VIRT_BASE 0xfef00000
+
/*
* Now, pick up the machine-defined IO definitions
*/
#ifdef CONFIG_NEED_MACH_IO_H
#include <mach/io.h>
+#elif defined(CONFIG_PCI)
+#define IO_SPACE_LIMIT ((resource_size_t)0xfffff)
+#define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT))
#else
#define __io(a) ({ (void)(a); __typesafe_io(0); })
#endif
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index d943b7d..6d326d7 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -60,6 +60,24 @@ struct pci_sys_data {
void pci_common_init(struct hw_pci *);
/*
+ * Setup fixed I/O mapping. Must be called from .map_io function.
+ */
+#ifdef CONFIG_PCI
+extern void pci_map_io_pfn(unsigned long pfn[], int nr);
+#else
+static inline void pci_map_io_pfn(unsigned long pfn[], int nr) {}
+#endif
+static inline void __init pci_map_io_single_pfn(unsigned long pfn)
+{
+ pci_map_io_pfn(&pfn, 1);
+}
+
+static inline void __init pci_map_io_single(unsigned long paddr)
+{
+ pci_map_io_single_pfn(__phys_to_pfn(paddr));
+}
+
+/*
* PCI controllers
*/
extern int iop3xx_pci_setup(int nr, struct pci_sys_data *);
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index f58ba35..199f383 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -13,6 +13,7 @@
#include <linux/io.h>
#include <asm/mach-types.h>
+#include <asm/mach/map.h>
#include <asm/mach/pci.h>
static int debug_pci;
@@ -674,3 +675,25 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
return 0;
}
+
+static struct map_desc pci_io_desc __initdata = {
+ .virtual = PCI_IO_VIRT_BASE,
+ .length = SZ_1M,
+ .type = MT_DEVICE,
+};
+
+void __init pci_map_io_pfn(unsigned long pfn[], int nr)
+{
+ int i;
+
+ if (nr > 1)
+ pci_io_desc.length = SZ_64K;
+
+ for (i = 0; i < nr; i++) {
+ pci_io_desc.pfn = pfn[i];
+ iotable_init(&pci_io_desc, 1);
+
+ pci_io_desc.virtual += SZ_64K;
+ }
+}
+
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 21/30] ARM: Add fixed PCI i/o mapping
2012-03-02 3:13 ` [PATCH v3 21/30] ARM: Add fixed PCI i/o mapping Rob Herring
@ 2012-03-05 19:41 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:41 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> This adds a fixed virtual mapping for PCI i/o addresses. The mapping is
> located at the last 1MB of vmalloc region (0xfef00000).
Please also document this in Documentation/arm/memory.txt.
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Russell King <linux@arm.linux.org.uk>
With the above comment addressed:
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/include/asm/io.h | 5 +++++
> arch/arm/include/asm/mach/pci.h | 18 ++++++++++++++++++
> arch/arm/kernel/bios32.c | 23 +++++++++++++++++++++++
> 3 files changed, 46 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index d7861b9..5a01930 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -106,11 +106,16 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
> #define __iowmb() do { } while (0)
> #endif
>
> +#define PCI_IO_VIRT_BASE 0xfef00000
> +
> /*
> * Now, pick up the machine-defined IO definitions
> */
> #ifdef CONFIG_NEED_MACH_IO_H
> #include <mach/io.h>
> +#elif defined(CONFIG_PCI)
> +#define IO_SPACE_LIMIT ((resource_size_t)0xfffff)
> +#define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT))
> #else
> #define __io(a) ({ (void)(a); __typesafe_io(0); })
> #endif
> diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
> index d943b7d..6d326d7 100644
> --- a/arch/arm/include/asm/mach/pci.h
> +++ b/arch/arm/include/asm/mach/pci.h
> @@ -60,6 +60,24 @@ struct pci_sys_data {
> void pci_common_init(struct hw_pci *);
>
> /*
> + * Setup fixed I/O mapping. Must be called from .map_io function.
> + */
> +#ifdef CONFIG_PCI
> +extern void pci_map_io_pfn(unsigned long pfn[], int nr);
> +#else
> +static inline void pci_map_io_pfn(unsigned long pfn[], int nr) {}
> +#endif
> +static inline void __init pci_map_io_single_pfn(unsigned long pfn)
> +{
> + pci_map_io_pfn(&pfn, 1);
> +}
> +
> +static inline void __init pci_map_io_single(unsigned long paddr)
> +{
> + pci_map_io_single_pfn(__phys_to_pfn(paddr));
> +}
> +
> +/*
> * PCI controllers
> */
> extern int iop3xx_pci_setup(int nr, struct pci_sys_data *);
> diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
> index f58ba35..199f383 100644
> --- a/arch/arm/kernel/bios32.c
> +++ b/arch/arm/kernel/bios32.c
> @@ -13,6 +13,7 @@
> #include <linux/io.h>
>
> #include <asm/mach-types.h>
> +#include <asm/mach/map.h>
> #include <asm/mach/pci.h>
>
> static int debug_pci;
> @@ -674,3 +675,25 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
>
> return 0;
> }
> +
> +static struct map_desc pci_io_desc __initdata = {
> + .virtual = PCI_IO_VIRT_BASE,
> + .length = SZ_1M,
> + .type = MT_DEVICE,
> +};
> +
> +void __init pci_map_io_pfn(unsigned long pfn[], int nr)
> +{
> + int i;
> +
> + if (nr > 1)
> + pci_io_desc.length = SZ_64K;
> +
> + for (i = 0; i < nr; i++) {
> + pci_io_desc.pfn = pfn[i];
> + iotable_init(&pci_io_desc, 1);
> +
> + pci_io_desc.virtual += SZ_64K;
> + }
> +}
> +
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 22/30] ARM: tegra: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (20 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 21/30] ARM: Add fixed PCI i/o mapping Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 6:59 ` Thierry Reding
2012-03-02 3:13 ` [PATCH v3 23/30] ARM: integrator: " Rob Herring
` (7 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-tegra/include/mach/io.h | 46 ------------------------------
arch/arm/mach-tegra/include/mach/iomap.h | 3 ++
arch/arm/mach-tegra/io.c | 2 +
arch/arm/mach-tegra/pcie.c | 41 ++------------------------
5 files changed, 9 insertions(+), 84 deletions(-)
delete mode 100644 arch/arm/mach-tegra/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ae016cd..c98861f2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -660,7 +660,6 @@ config ARCH_TEGRA
select HAVE_SCHED_CLOCK
select HAVE_SMP
select MIGHT_HAVE_CACHE_L2X0
- select NEED_MACH_IO_H if PCI
select ARCH_HAS_CPUFREQ
help
This enables support for NVIDIA Tegra based systems (Tegra APX,
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h
deleted file mode 100644
index fe700f9..0000000
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/io.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Colin Cross <ccross@google.com>
- * Erik Gilling <konkers@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_TEGRA_IO_H
-#define __MACH_TEGRA_IO_H
-
-#define IO_SPACE_LIMIT 0xffff
-
-#ifndef __ASSEMBLER__
-
-#ifdef CONFIG_TEGRA_PCI
-extern void __iomem *tegra_pcie_io_base;
-
-static inline void __iomem *__io(unsigned long addr)
-{
- return tegra_pcie_io_base + (addr & IO_SPACE_LIMIT);
-}
-#else
-static inline void __iomem *__io(unsigned long addr)
-{
- return (void __iomem *)addr;
-}
-#endif
-
-#define __io(a) __io(a)
-
-#endif
-
-#endif
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h
index 082b4d1..e2b700a 100644
--- a/arch/arm/mach-tegra/include/mach/iomap.h
+++ b/arch/arm/mach-tegra/include/mach/iomap.h
@@ -303,6 +303,9 @@
#define IO_APB_VIRT IOMEM(0xFE300000)
#define IO_APB_SIZE SZ_1M
+#define TEGRA_PCIE_BASE 0x80000000
+#define TEGRA_PCIE_IO_BASE (TEGRA_PCIE_BASE + SZ_4M)
+
#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
#define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index 58b4baf..7a29e10 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -26,6 +26,7 @@
#include <asm/page.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <mach/iomap.h>
#include "board.h"
@@ -59,5 +60,6 @@ static struct map_desc tegra_io_desc[] __initdata = {
void __init tegra_map_common_io(void)
{
+ pci_map_io_single(TEGRA_PCIE_IO_BASE);
iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
}
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index af8b634..442af44 100644
--- a/arch/arm/mach-tegra/pcie.c
+++ b/arch/arm/mach-tegra/pcie.c
@@ -171,8 +171,6 @@ static void __iomem *reg_pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
* 0x90000000 - 0x9fffffff - non-prefetchable memory
* 0xa0000000 - 0xbfffffff - prefetchable memory
*/
-#define TEGRA_PCIE_BASE 0x80000000
-
#define PCIE_REGS_SZ SZ_16K
#define PCIE_CFG_OFF PCIE_REGS_SZ
#define PCIE_CFG_SZ SZ_1M
@@ -180,8 +178,6 @@ static void __iomem *reg_pmc_base = IO_ADDRESS(TEGRA_PMC_BASE);
#define PCIE_EXT_CFG_SZ SZ_1M
#define PCIE_IOMAP_SZ (PCIE_REGS_SZ + PCIE_CFG_SZ + PCIE_EXT_CFG_SZ)
-#define MMIO_BASE (TEGRA_PCIE_BASE + SZ_4M)
-#define MMIO_SIZE SZ_64K
#define MEM_BASE_0 (TEGRA_PCIE_BASE + SZ_256M)
#define MEM_SIZE_0 SZ_128M
#define MEM_BASE_1 (MEM_BASE_0 + MEM_SIZE_0)
@@ -223,17 +219,7 @@ struct tegra_pcie_info {
struct clk *pll_e;
};
-static struct tegra_pcie_info tegra_pcie = {
- .res_mmio = {
- .name = "PCI IO",
- .start = MMIO_BASE,
- .end = MMIO_BASE + MMIO_SIZE - 1,
- .flags = IORESOURCE_MEM,
- },
-};
-
-void __iomem *tegra_pcie_io_base;
-EXPORT_SYMBOL(tegra_pcie_io_base);
+static struct tegra_pcie_info tegra_pcie;
static inline void afi_writel(u32 value, unsigned long offset)
{
@@ -542,8 +528,8 @@ static void tegra_pcie_setup_translations(void)
/* Bar 2: downstream IO bar */
fpci_bar = ((__u32)0xfdfc << 16);
- size = MMIO_SIZE;
- axi_address = MMIO_BASE;
+ size = SZ_64K;
+ axi_address = TEGRA_PCIE_IO_BASE;
afi_writel(axi_address, AFI_AXI_BAR2_START);
afi_writel(size >> 12, AFI_AXI_BAR2_SZ);
afi_writel(fpci_bar, AFI_FPCI_BAR2);
@@ -771,7 +757,6 @@ static void tegra_pcie_clocks_put(void)
static int __init tegra_pcie_get_resources(void)
{
- struct resource *res_mmio = &tegra_pcie.res_mmio;
int err;
err = tegra_pcie_clocks_get();
@@ -793,34 +778,16 @@ static int __init tegra_pcie_get_resources(void)
goto err_map_reg;
}
- err = request_resource(&iomem_resource, res_mmio);
- if (err) {
- pr_err("PCIE: Failed to request resources: %d\n", err);
- goto err_req_io;
- }
-
- tegra_pcie_io_base = ioremap_nocache(res_mmio->start,
- resource_size(res_mmio));
- if (tegra_pcie_io_base == NULL) {
- pr_err("PCIE: Failed to map IO\n");
- err = -ENOMEM;
- goto err_map_io;
- }
-
err = request_irq(INT_PCIE_INTR, tegra_pcie_isr,
IRQF_SHARED, "PCIE", &tegra_pcie);
if (err) {
pr_err("PCIE: Failed to register IRQ: %d\n", err);
- goto err_irq;
+ goto err_req_io;
}
set_irq_flags(INT_PCIE_INTR, IRQF_VALID);
return 0;
-err_irq:
- iounmap(tegra_pcie_io_base);
-err_map_io:
- release_resource(&tegra_pcie.res_mmio);
err_req_io:
iounmap(tegra_pcie.regs);
err_map_reg:
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 22/30] ARM: tegra: use fixed PCI i/o mapping
2012-03-02 3:13 ` [PATCH v3 22/30] ARM: tegra: use " Rob Herring
@ 2012-03-02 6:59 ` Thierry Reding
0 siblings, 0 replies; 67+ messages in thread
From: Thierry Reding @ 2012-03-02 6:59 UTC (permalink / raw)
To: linux-arm-kernel
* Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Colin Cross <ccross@android.com>
> Cc: Olof Johansson <olof@lixom.net>
> Acked-by: Stephen Warren <swarren@nvidia.com>
> ---
> arch/arm/Kconfig | 1 -
> arch/arm/mach-tegra/include/mach/io.h | 46 ------------------------------
> arch/arm/mach-tegra/include/mach/iomap.h | 3 ++
> arch/arm/mach-tegra/io.c | 2 +
> arch/arm/mach-tegra/pcie.c | 41 ++------------------------
> 5 files changed, 9 insertions(+), 84 deletions(-)
> delete mode 100644 arch/arm/mach-tegra/include/mach/io.h
[...]
This looks good to me. Moreover this gets rid of some of the ugly globals
initialized by the PCI support and should fit in nicely with the work I'm
doing to rewrite it as a driver and add device tree support.
Unfortunately I'm unable to test actual accesses because none of the PCI
devices that I use have I/O regions.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120302/04cf7d86/attachment-0001.sig>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 23/30] ARM: integrator: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (21 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 22/30] ARM: tegra: use " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 24/30] ARM: shark: " Rob Herring
` (6 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-integrator/include/mach/io.h | 33 ----------------------
arch/arm/mach-integrator/include/mach/platform.h | 4 ++
arch/arm/mach-integrator/integrator_ap.c | 11 ++----
4 files changed, 8 insertions(+), 41 deletions(-)
delete mode 100644 arch/arm/mach-integrator/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c98861f2..682c5d8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -268,7 +268,6 @@ config ARCH_INTEGRATOR
select GENERIC_CLOCKEVENTS
select PLAT_VERSATILE
select PLAT_VERSATILE_FPGA_IRQ
- select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for ARM's Integrator platform.
diff --git a/arch/arm/mach-integrator/include/mach/io.h b/arch/arm/mach-integrator/include/mach/io.h
deleted file mode 100644
index 8de70de..0000000
--- a/arch/arm/mach-integrator/include/mach/io.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * arch/arm/mach-integrator/include/mach/io.h
- *
- * Copyright (C) 1999 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-/*
- * WARNING: this has to mirror definitions in platform.h
- */
-#define PCI_MEMORY_VADDR 0xe8000000
-#define PCI_CONFIG_VADDR 0xec000000
-#define PCI_V3_VADDR 0xed000000
-#define PCI_IO_VADDR 0xee000000
-
-#define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a)))
-
-#endif
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h
index ec467ba..4c03475 100644
--- a/arch/arm/mach-integrator/include/mach/platform.h
+++ b/arch/arm/mach-integrator/include/mach/platform.h
@@ -324,6 +324,10 @@
*/
#define PHYS_PCI_V3_BASE 0x62000000
+#define PCI_MEMORY_VADDR 0xe8000000
+#define PCI_CONFIG_VADDR 0xec000000
+#define PCI_V3_VADDR 0xed000000
+
/* ------------------------------------------------------------------------
* Integrator Interrupt Controllers
* ------------------------------------------------------------------------
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 21a1d6c..410e6b1 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -48,13 +48,14 @@
#include <asm/mach/arch.h>
#include <asm/mach/irq.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <asm/mach/time.h>
#include <plat/fpga-irq.h>
#include "common.h"
-/*
+/*
* All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx
* is the (PA >> 12).
*
@@ -71,7 +72,7 @@
* e8000000 40000000 PCI memory PHYS_PCI_MEM_BASE (max 512M)
* ec000000 61000000 PCI config space PHYS_PCI_CONFIG_BASE (max 16M)
* ed000000 62000000 PCI V3 regs PHYS_PCI_V3_BASE (max 64k)
- * ee000000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M)
+ * fef00000 60000000 PCI IO PHYS_PCI_IO_BASE (max 16M)
* ef000000 Cache flush
* f1000000 10000000 Core module registers
* f1100000 11000000 System controller registers
@@ -145,16 +146,12 @@ static struct map_desc ap_io_desc[] __initdata = {
.pfn = __phys_to_pfn(PHYS_PCI_V3_BASE),
.length = SZ_64K,
.type = MT_DEVICE
- }, {
- .virtual = PCI_IO_VADDR,
- .pfn = __phys_to_pfn(PHYS_PCI_IO_BASE),
- .length = SZ_64K,
- .type = MT_DEVICE
}
};
static void __init ap_map_io(void)
{
+ pci_map_io_single(PHYS_PCI_IO_BASE);
iotable_init(ap_io_desc, ARRAY_SIZE(ap_io_desc));
vga_base = PCI_MEMORY_VADDR;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 24/30] ARM: shark: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (22 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 23/30] ARM: integrator: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 25/30] ARM: footbridge: " Rob Herring
` (5 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-shark/core.c | 14 ++------------
arch/arm/mach-shark/include/mach/debug-macro.S | 7 ++++---
arch/arm/mach-shark/include/mach/entry-macro.S | 3 ++-
arch/arm/mach-shark/include/mach/io.h | 18 ------------------
5 files changed, 8 insertions(+), 35 deletions(-)
delete mode 100644 arch/arm/mach-shark/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 682c5d8..b14bf3c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -893,7 +893,6 @@ config ARCH_SHARK
select PCI
select ARCH_USES_GETTIMEOFFSET
select NEED_MACH_MEMORY_H
- select NEED_MACH_IO_H
help
Support for the StrongARM based Digital DNARD machine, also known
as "Shark" (<http://www.shark-linux.de/shark.html>).
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index 6a2a7f2..da12ad0 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -17,11 +17,10 @@
#include <asm/param.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>
-#define IO_BASE 0xe0000000
-#define IO_SIZE 0x08000000
#define IO_START 0x40000000
#define ROMCARD_SIZE 0x08000000
#define ROMCARD_START 0x10000000
@@ -103,18 +102,9 @@ arch_initcall(shark_init);
extern void shark_init_irq(void);
-static struct map_desc shark_io_desc[] __initdata = {
- {
- .virtual = IO_BASE,
- .pfn = __phys_to_pfn(IO_START),
- .length = IO_SIZE,
- .type = MT_DEVICE
- }
-};
-
static void __init shark_map_io(void)
{
- iotable_init(shark_io_desc, ARRAY_SIZE(shark_io_desc));
+ pci_map_io_single(IO_START);
}
#define IRQ_TIMER 0
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
index 20eb2bf..b08ef9d 100644
--- a/arch/arm/mach-shark/include/mach/debug-macro.S
+++ b/arch/arm/mach-shark/include/mach/debug-macro.S
@@ -12,9 +12,10 @@
*/
.macro addruart, rp, rv, tmp
- mov \rp, #0xe0000000
- orr \rp, \rp, #0x000003f8
- mov \rv, \rp
+ mov \rp, #0x3f8
+ orr \rv, \rp, #0xfe000000
+ orr \rv, \rv, #0x00f00000
+ orr \rp, \rp, #0x40000000
.endm
.macro senduart,rd,rx
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
index 0bb6cc6..3ff46fc 100644
--- a/arch/arm/mach-shark/include/mach/entry-macro.S
+++ b/arch/arm/mach-shark/include/mach/entry-macro.S
@@ -11,7 +11,8 @@
.endm
.macro get_irqnr_preamble, base, tmp
- mov \base, #0xe0000000
+ mov \base, #0xfe000000
+ orr \base, \base, #0x00f00000
.endm
.macro arch_ret_to_user, tmp1, tmp2
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h
deleted file mode 100644
index 1a45fc0..0000000
--- a/arch/arm/mach-shark/include/mach/io.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/io.h
- *
- * by Alexander Schulz
- *
- * derived from:
- * arch/arm/mach-ebsa110/include/mach/io.h
- * Copyright (C) 1997,1998 Russell King
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) ((void __iomem *)(0xe0000000 + (a)))
-
-#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 25/30] ARM: footbridge: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (23 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 24/30] ARM: shark: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 26/30] ARM: dove: " Rob Herring
` (4 subsequent siblings)
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
arch/arm/Kconfig | 2 +-
| 12 +++++-------
| 3 ++-
| 12 ++----------
4 files changed, 10 insertions(+), 19 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b14bf3c..f2c6727 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -430,7 +430,7 @@ config ARCH_FOOTBRIDGE
select FOOTBRIDGE
select GENERIC_CLOCKEVENTS
select HAVE_IDE
- select NEED_MACH_IO_H
+ select NEED_MACH_IO_H if !MMU
select NEED_MACH_MEMORY_H
help
Support for systems based on the DC21285 companion chip
--git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 41978ee..5c3c7a7 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -15,7 +15,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/spinlock.h>
-
+
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/irq.h>
@@ -25,6 +25,7 @@
#include <asm/mach/irq.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include "common.h"
@@ -174,11 +175,6 @@ static struct map_desc ebsa285_host_io_desc[] __initdata = {
.pfn = __phys_to_pfn(DC21285_PCI_IACK),
.length = PCIIACK_SIZE,
.type = MT_DEVICE,
- }, {
- .virtual = PCIO_BASE,
- .pfn = __phys_to_pfn(DC21285_PCI_IO),
- .length = PCIO_SIZE,
- .type = MT_DEVICE,
},
#endif
};
@@ -195,8 +191,10 @@ void __init footbridge_map_io(void)
* Now, work out what we've got to map in addition on this
* platform.
*/
- if (footbridge_cfn_mode())
+ if (footbridge_cfn_mode()) {
+ pci_map_io_single(DC21285_PCI_IO);
iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc));
+ }
}
void footbridge_restart(char mode, const char *cmd)
--git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S
index e5acde2..87c75c8 100644
--- a/arch/arm/mach-footbridge/include/mach/debug-macro.S
+++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S
@@ -17,7 +17,8 @@
/* For NetWinder debugging */
.macro addruart, rp, rv, tmp
mov \rp, #0x000003f8
- orr \rv, \rp, #0xff000000 @ virtual
+ orr \rv, \rp, #0xfe000000 @ virtual
+ orr \rv, \rv, #0x00f00000 @ virtual
orr \rp, \rp, #0x7c000000 @ physical
.endm
--git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h
index aba531ee..aba4638 100644
--- a/arch/arm/mach-footbridge/include/mach/io.h
+++ b/arch/arm/mach-footbridge/include/mach/io.h
@@ -14,18 +14,10 @@
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H
-#ifdef CONFIG_MMU
-#define MMU_IO(a, b) (a)
-#else
-#define MMU_IO(a, b) (b)
-#endif
-
-#define PCIO_SIZE 0x00100000
-#define PCIO_BASE MMU_IO(0xff000000, 0x7c000000)
-
/*
- * Translation of various region addresses to virtual addresses
+ * Translation of various i/o addresses to host addresses for !CONFIG_MMU
*/
+#define PCIO_BASE 0x7c000000
#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
#endif
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 26/30] ARM: dove: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (24 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 25/30] ARM: footbridge: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 20:12 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 27/30] ARM: kirkwood: " Rob Herring
` (3 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
The i/o regions are changed from 1MB to 64KB. It's likely that the 2nd
bus is not setup correctly.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-dove/common.c | 15 +++++----------
arch/arm/mach-dove/include/mach/dove.h | 8 +++-----
arch/arm/mach-dove/include/mach/io.h | 19 -------------------
arch/arm/mach-dove/pcie.c | 9 ++-------
5 files changed, 10 insertions(+), 42 deletions(-)
delete mode 100644 arch/arm/mach-dove/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f2c6727..24fe29e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -553,7 +553,6 @@ config ARCH_DOVE
select PCI
select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS
- select NEED_MACH_IO_H
select PLAT_ORION
help
Support for the Marvell Dove SoC 88AP510
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index dd1429a..a062ba6 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -48,21 +48,16 @@ static struct map_desc dove_io_desc[] __initdata = {
.pfn = __phys_to_pfn(DOVE_NB_REGS_PHYS_BASE),
.length = DOVE_NB_REGS_SIZE,
.type = MT_DEVICE,
- }, {
- .virtual = DOVE_PCIE0_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(DOVE_PCIE0_IO_PHYS_BASE),
- .length = DOVE_PCIE0_IO_SIZE,
- .type = MT_DEVICE,
- }, {
- .virtual = DOVE_PCIE1_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(DOVE_PCIE1_IO_PHYS_BASE),
- .length = DOVE_PCIE1_IO_SIZE,
- .type = MT_DEVICE,
},
};
void __init dove_map_io(void)
{
+ unsigned long pci_io_pfn[] = {
+ __phys_to_pfn(DOVE_PCIE0_IO_PHYS_BASE),
+ __phys_to_pfn(DOVE_PCIE1_IO_PHYS_BASE),
+ };
+ pci_map_io_pfn(pci_io_pfn, ARRAY_SIZE(pci_io_pfn));
iotable_init(dove_io_desc, ARRAY_SIZE(dove_io_desc));
}
diff --git a/arch/arm/mach-dove/include/mach/dove.h b/arch/arm/mach-dove/include/mach/dove.h
index ad1165d..50b9046 100644
--- a/arch/arm/mach-dove/include/mach/dove.h
+++ b/arch/arm/mach-dove/include/mach/dove.h
@@ -50,14 +50,12 @@
#define DOVE_NB_REGS_SIZE SZ_8M
#define DOVE_PCIE0_IO_PHYS_BASE 0xf2000000
-#define DOVE_PCIE0_IO_VIRT_BASE 0xfee00000
#define DOVE_PCIE0_IO_BUS_BASE 0x00000000
-#define DOVE_PCIE0_IO_SIZE SZ_1M
+#define DOVE_PCIE0_IO_SIZE SZ_64K
#define DOVE_PCIE1_IO_PHYS_BASE 0xf2100000
-#define DOVE_PCIE1_IO_VIRT_BASE 0xfef00000
-#define DOVE_PCIE1_IO_BUS_BASE 0x00100000
-#define DOVE_PCIE1_IO_SIZE SZ_1M
+#define DOVE_PCIE1_IO_BUS_BASE 0x00010000
+#define DOVE_PCIE1_IO_SIZE SZ_64K
/*
* Dove Core Registers Map
diff --git a/arch/arm/mach-dove/include/mach/io.h b/arch/arm/mach-dove/include/mach/io.h
deleted file mode 100644
index 29c8b85..0000000
--- a/arch/arm/mach-dove/include/mach/io.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-dove/include/mach/io.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#include "dove.h"
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \
- DOVE_PCIE0_IO_VIRT_BASE))
-
-#endif
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c
index 52e96d3..0a741bd 100644
--- a/arch/arm/mach-dove/pcie.c
+++ b/arch/arm/mach-dove/pcie.c
@@ -59,13 +59,8 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys)
"PCIe %d I/O", pp->index);
pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0;
pp->res[0].name = pp->io_space_name;
- if (pp->index == 0) {
- pp->res[0].start = DOVE_PCIE0_IO_PHYS_BASE;
- pp->res[0].end = pp->res[0].start + DOVE_PCIE0_IO_SIZE - 1;
- } else {
- pp->res[0].start = DOVE_PCIE1_IO_PHYS_BASE;
- pp->res[0].end = pp->res[0].start + DOVE_PCIE1_IO_SIZE - 1;
- }
+ pp->res[0].start = nr * SZ_64K;
+ pp->res[0].end = pp->res[0].start + SZ_64K;
pp->res[0].flags = IORESOURCE_IO;
if (request_resource(&ioport_resource, &pp->res[0]))
panic("Request PCIe IO resource failed\n");
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 26/30] ARM: dove: use fixed PCI i/o mapping
2012-03-02 3:13 ` [PATCH v3 26/30] ARM: dove: " Rob Herring
@ 2012-03-05 20:12 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 20:12 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> The i/o regions are changed from 1MB to 64KB. It's likely that the 2nd
> bus is not setup correctly.
[...]
> index ad1165d..50b9046 100644
> --- a/arch/arm/mach-dove/include/mach/dove.h
> +++ b/arch/arm/mach-dove/include/mach/dove.h
> @@ -50,14 +50,12 @@
> #define DOVE_NB_REGS_SIZE SZ_8M
>
> #define DOVE_PCIE0_IO_PHYS_BASE 0xf2000000
> -#define DOVE_PCIE0_IO_VIRT_BASE 0xfee00000
> #define DOVE_PCIE0_IO_BUS_BASE 0x00000000
> -#define DOVE_PCIE0_IO_SIZE SZ_1M
> +#define DOVE_PCIE0_IO_SIZE SZ_64K
>
> #define DOVE_PCIE1_IO_PHYS_BASE 0xf2100000
> -#define DOVE_PCIE1_IO_VIRT_BASE 0xfef00000
> -#define DOVE_PCIE1_IO_BUS_BASE 0x00100000
> -#define DOVE_PCIE1_IO_SIZE SZ_1M
> +#define DOVE_PCIE1_IO_BUS_BASE 0x00010000
> +#define DOVE_PCIE1_IO_SIZE SZ_64K
You better not touch DOVE_PCIE1_IO_BUS_BASE and just leave it at
0x00100000. This is used for configuration of the physical window
address, to match with DOVE_PCIE1_IO_PHYS_BASE, and that has no impact
on the virtual address used to map that window (yes, Dove and the rest
of the Orion based SOCs have the ability to change their physical memory
map).
With that fixed:
Acked-by: Nicolas Pitre <nico@linaro.org>
>
> /*
> * Dove Core Registers Map
> diff --git a/arch/arm/mach-dove/include/mach/io.h b/arch/arm/mach-dove/include/mach/io.h
> deleted file mode 100644
> index 29c8b85..0000000
> --- a/arch/arm/mach-dove/include/mach/io.h
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -/*
> - * arch/arm/mach-dove/include/mach/io.h
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __ASM_ARCH_IO_H
> -#define __ASM_ARCH_IO_H
> -
> -#include "dove.h"
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \
> - DOVE_PCIE0_IO_VIRT_BASE))
> -
> -#endif
> diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c
> index 52e96d3..0a741bd 100644
> --- a/arch/arm/mach-dove/pcie.c
> +++ b/arch/arm/mach-dove/pcie.c
> @@ -59,13 +59,8 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys)
> "PCIe %d I/O", pp->index);
> pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0;
> pp->res[0].name = pp->io_space_name;
> - if (pp->index == 0) {
> - pp->res[0].start = DOVE_PCIE0_IO_PHYS_BASE;
> - pp->res[0].end = pp->res[0].start + DOVE_PCIE0_IO_SIZE - 1;
> - } else {
> - pp->res[0].start = DOVE_PCIE1_IO_PHYS_BASE;
> - pp->res[0].end = pp->res[0].start + DOVE_PCIE1_IO_SIZE - 1;
> - }
> + pp->res[0].start = nr * SZ_64K;
> + pp->res[0].end = pp->res[0].start + SZ_64K;
> pp->res[0].flags = IORESOURCE_IO;
> if (request_resource(&ioport_resource, &pp->res[0]))
> panic("Request PCIe IO resource failed\n");
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 27/30] ARM: kirkwood: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (25 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 26/30] ARM: dove: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 19:59 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 28/30] ARM: ixp23xx: " Rob Herring
` (2 subsequent siblings)
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-kirkwood/common.c | 21 +++++++++------------
arch/arm/mach-kirkwood/include/mach/io.h | 24 ------------------------
arch/arm/mach-kirkwood/include/mach/kirkwood.h | 8 +++-----
arch/arm/mach-kirkwood/pcie.c | 8 ++++----
5 files changed, 16 insertions(+), 46 deletions(-)
delete mode 100644 arch/arm/mach-kirkwood/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 24fe29e..50e68b6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -563,7 +563,6 @@ config ARCH_KIRKWOOD
select PCI
select ARCH_REQUIRE_GPIOLIB
select GENERIC_CLOCKEVENTS
- select NEED_MACH_IO_H
select PLAT_ORION
help
Support for the following Marvell Kirkwood series SoCs:
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index cc15426..db4caa3 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -20,6 +20,7 @@
#include <asm/timex.h>
#include <asm/kexec.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <asm/mach/time.h>
#include <mach/kirkwood.h>
#include <mach/bridge-regs.h>
@@ -37,16 +38,6 @@
****************************************************************************/
static struct map_desc kirkwood_io_desc[] __initdata = {
{
- .virtual = KIRKWOOD_PCIE_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
- .length = KIRKWOOD_PCIE_IO_SIZE,
- .type = MT_DEVICE,
- }, {
- .virtual = KIRKWOOD_PCIE1_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(KIRKWOOD_PCIE1_IO_PHYS_BASE),
- .length = KIRKWOOD_PCIE1_IO_SIZE,
- .type = MT_DEVICE,
- }, {
.virtual = KIRKWOOD_REGS_VIRT_BASE,
.pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
.length = KIRKWOOD_REGS_SIZE,
@@ -56,6 +47,12 @@ static struct map_desc kirkwood_io_desc[] __initdata = {
void __init kirkwood_map_io(void)
{
+ unsigned long pci_io_pfn[] = {
+ __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
+ __phys_to_pfn(KIRKWOOD_PCIE1_IO_PHYS_BASE),
+ };
+ pci_map_io_pfn(pci_io_pfn, ARRAY_SIZE(pci_io_pfn));
+
iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc));
}
@@ -472,7 +469,7 @@ void __init kirkwood_init(void)
kirkwood_xor1_init();
kirkwood_crypto_init();
-#ifdef CONFIG_KEXEC
+#ifdef CONFIG_KEXEC
kexec_reinit = kirkwood_enable_pcie;
#endif
}
@@ -502,7 +499,7 @@ static int __init kirkwood_clock_gate(void)
/* Disable PHY */
writel(readl(SATA1_IF_CTRL) | 0x200, SATA1_IF_CTRL);
}
-
+
/* For PCIe: first shutdown the phy */
if (!(kirkwood_clk_ctrl & CGC_PEX0)) {
writel(readl(PCIE_LINK_CTRL) | 0x10, PCIE_LINK_CTRL);
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h
deleted file mode 100644
index 5d0ab61..0000000
--- a/arch/arm/mach-kirkwood/include/mach/io.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/include/mach/io.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#include "kirkwood.h"
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-static inline void __iomem *__io(unsigned long addr)
-{
- return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_BUS_BASE)
- + KIRKWOOD_PCIE_IO_VIRT_BASE);
-}
-
-#define __io(a) __io(a)
-
-#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
index fede3d5..63565fb 100644
--- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
@@ -37,14 +37,12 @@
#define KIRKWOOD_NAND_MEM_SIZE SZ_1K
#define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000
-#define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000
-#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00100000
-#define KIRKWOOD_PCIE1_IO_SIZE SZ_1M
+#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00010000
+#define KIRKWOOD_PCIE1_IO_SIZE SZ_64K
#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
-#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfee00000
#define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
-#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
+#define KIRKWOOD_PCIE_IO_SIZE SZ_64K
#define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
#define KIRKWOOD_REGS_VIRT_BASE 0xfed00000
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index a066a6d..11f557e 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -126,8 +126,8 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp)
* IORESOURCE_IO
*/
pp->res[0].name = "PCIe 0 I/O Space";
- pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE;
- pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
+ pp->res[0].start = 0;
+ pp->res[0].end = pp->res[0].start + SZ_64K - 1;
pp->res[0].flags = IORESOURCE_IO;
/*
@@ -148,8 +148,8 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp)
* IORESOURCE_IO
*/
pp->res[0].name = "PCIe 1 I/O Space";
- pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE;
- pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
+ pp->res[0].start = SZ_64K;
+ pp->res[0].end = pp->res[0].start + SZ_64K - 1;
pp->res[0].flags = IORESOURCE_IO;
/*
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 27/30] ARM: kirkwood: use fixed PCI i/o mapping
2012-03-02 3:13 ` [PATCH v3 27/30] ARM: kirkwood: " Rob Herring
@ 2012-03-05 19:59 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 19:59 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Lennert Buytenhek <kernel@wantstofly.org>
> Cc: Nicolas Pitre <nico@fluxnic.net>
I have no PCI hardware making use of the legacy IO area to test this
with. But this looks fine.
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/Kconfig | 1 -
> arch/arm/mach-kirkwood/common.c | 21 +++++++++------------
> arch/arm/mach-kirkwood/include/mach/io.h | 24 ------------------------
> arch/arm/mach-kirkwood/include/mach/kirkwood.h | 8 +++-----
> arch/arm/mach-kirkwood/pcie.c | 8 ++++----
> 5 files changed, 16 insertions(+), 46 deletions(-)
> delete mode 100644 arch/arm/mach-kirkwood/include/mach/io.h
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 24fe29e..50e68b6 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -563,7 +563,6 @@ config ARCH_KIRKWOOD
> select PCI
> select ARCH_REQUIRE_GPIOLIB
> select GENERIC_CLOCKEVENTS
> - select NEED_MACH_IO_H
> select PLAT_ORION
> help
> Support for the following Marvell Kirkwood series SoCs:
> diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
> index cc15426..db4caa3 100644
> --- a/arch/arm/mach-kirkwood/common.c
> +++ b/arch/arm/mach-kirkwood/common.c
> @@ -20,6 +20,7 @@
> #include <asm/timex.h>
> #include <asm/kexec.h>
> #include <asm/mach/map.h>
> +#include <asm/mach/pci.h>
> #include <asm/mach/time.h>
> #include <mach/kirkwood.h>
> #include <mach/bridge-regs.h>
> @@ -37,16 +38,6 @@
> ****************************************************************************/
> static struct map_desc kirkwood_io_desc[] __initdata = {
> {
> - .virtual = KIRKWOOD_PCIE_IO_VIRT_BASE,
> - .pfn = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
> - .length = KIRKWOOD_PCIE_IO_SIZE,
> - .type = MT_DEVICE,
> - }, {
> - .virtual = KIRKWOOD_PCIE1_IO_VIRT_BASE,
> - .pfn = __phys_to_pfn(KIRKWOOD_PCIE1_IO_PHYS_BASE),
> - .length = KIRKWOOD_PCIE1_IO_SIZE,
> - .type = MT_DEVICE,
> - }, {
> .virtual = KIRKWOOD_REGS_VIRT_BASE,
> .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE),
> .length = KIRKWOOD_REGS_SIZE,
> @@ -56,6 +47,12 @@ static struct map_desc kirkwood_io_desc[] __initdata = {
>
> void __init kirkwood_map_io(void)
> {
> + unsigned long pci_io_pfn[] = {
> + __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE),
> + __phys_to_pfn(KIRKWOOD_PCIE1_IO_PHYS_BASE),
> + };
> + pci_map_io_pfn(pci_io_pfn, ARRAY_SIZE(pci_io_pfn));
> +
> iotable_init(kirkwood_io_desc, ARRAY_SIZE(kirkwood_io_desc));
> }
>
> @@ -472,7 +469,7 @@ void __init kirkwood_init(void)
> kirkwood_xor1_init();
> kirkwood_crypto_init();
>
> -#ifdef CONFIG_KEXEC
> +#ifdef CONFIG_KEXEC
> kexec_reinit = kirkwood_enable_pcie;
> #endif
> }
> @@ -502,7 +499,7 @@ static int __init kirkwood_clock_gate(void)
> /* Disable PHY */
> writel(readl(SATA1_IF_CTRL) | 0x200, SATA1_IF_CTRL);
> }
> -
> +
> /* For PCIe: first shutdown the phy */
> if (!(kirkwood_clk_ctrl & CGC_PEX0)) {
> writel(readl(PCIE_LINK_CTRL) | 0x10, PCIE_LINK_CTRL);
> diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h
> deleted file mode 100644
> index 5d0ab61..0000000
> --- a/arch/arm/mach-kirkwood/include/mach/io.h
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -/*
> - * arch/arm/mach-kirkwood/include/mach/io.h
> - *
> - * This file is licensed under the terms of the GNU General Public
> - * License version 2. This program is licensed "as is" without any
> - * warranty of any kind, whether express or implied.
> - */
> -
> -#ifndef __ASM_ARCH_IO_H
> -#define __ASM_ARCH_IO_H
> -
> -#include "kirkwood.h"
> -
> -#define IO_SPACE_LIMIT 0xffffffff
> -
> -static inline void __iomem *__io(unsigned long addr)
> -{
> - return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_BUS_BASE)
> - + KIRKWOOD_PCIE_IO_VIRT_BASE);
> -}
> -
> -#define __io(a) __io(a)
> -
> -#endif
> diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
> index fede3d5..63565fb 100644
> --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
> +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
> @@ -37,14 +37,12 @@
> #define KIRKWOOD_NAND_MEM_SIZE SZ_1K
>
> #define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000
> -#define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000
> -#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00100000
> -#define KIRKWOOD_PCIE1_IO_SIZE SZ_1M
> +#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00010000
> +#define KIRKWOOD_PCIE1_IO_SIZE SZ_64K
>
> #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
> -#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfee00000
> #define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
> -#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
> +#define KIRKWOOD_PCIE_IO_SIZE SZ_64K
>
> #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
> #define KIRKWOOD_REGS_VIRT_BASE 0xfed00000
> diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
> index a066a6d..11f557e 100644
> --- a/arch/arm/mach-kirkwood/pcie.c
> +++ b/arch/arm/mach-kirkwood/pcie.c
> @@ -126,8 +126,8 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp)
> * IORESOURCE_IO
> */
> pp->res[0].name = "PCIe 0 I/O Space";
> - pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE;
> - pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
> + pp->res[0].start = 0;
> + pp->res[0].end = pp->res[0].start + SZ_64K - 1;
> pp->res[0].flags = IORESOURCE_IO;
>
> /*
> @@ -148,8 +148,8 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp)
> * IORESOURCE_IO
> */
> pp->res[0].name = "PCIe 1 I/O Space";
> - pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE;
> - pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
> + pp->res[0].start = SZ_64K;
> + pp->res[0].end = pp->res[0].start + SZ_64K - 1;
> pp->res[0].flags = IORESOURCE_IO;
>
> /*
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread
* [PATCH v3 28/30] ARM: ixp23xx: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (26 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 27/30] ARM: kirkwood: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 29/30] ARM: iop13xx: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 30/30] ARM: orion5x: " Rob Herring
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-ixp23xx/core.c | 7 ++-----
arch/arm/mach-ixp23xx/include/mach/io.h | 22 ----------------------
arch/arm/mach-ixp23xx/include/mach/ixp23xx.h | 20 +++++++++-----------
arch/arm/mach-ixp23xx/pci.c | 2 +-
5 files changed, 12 insertions(+), 40 deletions(-)
delete mode 100644 arch/arm/mach-ixp23xx/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 50e68b6..73a86c7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -517,7 +517,6 @@ config ARCH_IXP23XX
select CPU_XSC3
select PCI
select ARCH_USES_GETTIMEOFFSET
- select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for Intel's IXP23xx (XScale) family of processors.
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index 7c1495e..38cbb99 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -39,6 +39,7 @@
#include <asm/pgtable.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <asm/mach/time.h>
#include <asm/mach/irq.h>
#include <asm/mach/arch.h>
@@ -73,11 +74,6 @@ static struct map_desc ixp23xx_io_desc[] __initdata = {
.pfn = __phys_to_pfn(IXP23XX_MSF_CSR_PHYS),
.length = IXP23XX_MSF_CSR_SIZE,
.type = MT_DEVICE,
- }, { /* PCI I/O Space */
- .virtual = IXP23XX_PCI_IO_VIRT,
- .pfn = __phys_to_pfn(IXP23XX_PCI_IO_PHYS),
- .length = IXP23XX_PCI_IO_SIZE,
- .type = MT_DEVICE,
}, { /* PCI Config Space */
.virtual = IXP23XX_PCI_CFG_VIRT,
.pfn = __phys_to_pfn(IXP23XX_PCI_CFG_PHYS),
@@ -98,6 +94,7 @@ static struct map_desc ixp23xx_io_desc[] __initdata = {
void __init ixp23xx_map_io(void)
{
+ pci_map_io_single(__phys_to_pfn(IXP23XX_PCI_IO_PHYS));
iotable_init(ixp23xx_io_desc, ARRAY_SIZE(ixp23xx_io_desc));
}
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h
deleted file mode 100644
index a7aceb5..0000000
--- a/arch/arm/mach-ixp23xx/include/mach/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * arch/arm/mach-ixp23xx/include/mach/io.h
- *
- * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
- * Maintainer: Deepak Saxena <dsaxena@plexity.net>
- *
- * Copyright (C) 2003-2005 Intel Corp.
- * Copyright (C) 2005 MontaVista Software, Inc
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_IO_H
-#define __ASM_ARCH_IO_H
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
-
-#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
index 6d02481..93309d7 100644
--- a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
+++ b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
@@ -20,13 +20,12 @@
* IXP2300 linux memory map:
*
* virt phys size
- * fffd0000 a0000000 64K XSI2CPP_CSR
- * fffc0000 c4000000 4K EXP_CFG
- * fff00000 c8000000 64K PERIPHERAL
- * fe000000 1c0000000 16M CAP_CSR
+ * fef00000 1d8000000 1M PCI_IO
* fd000000 1c8000000 16M MSF_CSR
- * fb000000 16M ---
- * fa000000 1d8000000 32M PCI_IO
+ * fbfd0000 a0000000 64K XSI2CPP_CSR
+ * fbfc0000 c4000000 4K EXP_CFG
+ * fbf00000 c8000000 64K PERIPHERAL
+ * fa000000 1c0000000 16M CAP_CSR
* f8000000 1da000000 32M PCI_CFG
* f6000000 1de000000 32M PCI_CREG
* f4000000 32M ---
@@ -39,19 +38,19 @@
* Static mappings.
****************************************************************************/
#define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000
-#define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000
+#define IXP23XX_XSI2CPP_CSR_VIRT 0xfbfd0000
#define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000
#define IXP23XX_EXP_CFG_PHYS 0xc4000000
-#define IXP23XX_EXP_CFG_VIRT 0xfffc0000
+#define IXP23XX_EXP_CFG_VIRT 0xfbfc0000
#define IXP23XX_EXP_CFG_SIZE 0x00001000
#define IXP23XX_PERIPHERAL_PHYS 0xc8000000
-#define IXP23XX_PERIPHERAL_VIRT 0xfff00000
+#define IXP23XX_PERIPHERAL_VIRT 0xfbf00000
#define IXP23XX_PERIPHERAL_SIZE 0x00010000
#define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL
-#define IXP23XX_CAP_CSR_VIRT 0xfe000000
+#define IXP23XX_CAP_CSR_VIRT 0xfa000000
#define IXP23XX_CAP_CSR_SIZE 0x01000000
#define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL
@@ -59,7 +58,6 @@
#define IXP23XX_MSF_CSR_SIZE 0x01000000
#define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL
-#define IXP23XX_PCI_IO_VIRT 0xfa000000
#define IXP23XX_PCI_IO_SIZE 0x02000000
#define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c
index 25b5c46..f6f9b89 100644
--- a/arch/arm/mach-ixp23xx/pci.c
+++ b/arch/arm/mach-ixp23xx/pci.c
@@ -271,7 +271,7 @@ static struct resource ixp23xx_pci_mem_space = {
static struct resource ixp23xx_pci_io_space = {
.start = 0x00000100,
- .end = 0x01ffffff,
+ .end = SZ_1M - 1,
.flags = IORESOURCE_IO,
.name = "PCI I/O Space"
};
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 29/30] ARM: iop13xx: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (27 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 28/30] ARM: ixp23xx: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-02 3:13 ` [PATCH v3 30/30] ARM: orion5x: " Rob Herring
29 siblings, 0 replies; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/Kconfig | 1 -
arch/arm/mach-iop13xx/include/mach/io.h | 28 --------------------------
arch/arm/mach-iop13xx/include/mach/iop13xx.h | 7 ++---
arch/arm/mach-iop13xx/setup.c | 17 ++++++---------
4 files changed, 10 insertions(+), 43 deletions(-)
delete mode 100644 arch/arm/mach-iop13xx/include/mach/io.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 73a86c7..10c99f9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -483,7 +483,6 @@ config ARCH_IOP13XX
select PCI
select ARCH_SUPPORTS_MSI
select VMSPLIT_1G
- select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
help
Support for Intel's IOP13XX (XScale) family of processors.
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
deleted file mode 100644
index e197cb8..0000000
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * iop13xx custom ioremap implementation
- * Copyright (c) 2005-2006, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#include <mach/iop13xx.h>
-
-#define IO_SPACE_LIMIT (IOP13XX_PCIE_IO_WINDOW_SIZE + IOP13XX_PCIX_IO_WINDOW_SIZE - 1)
-
-#define __io(a) (IOP13XX_PCIX_LOWER_IO_VA + ((a) & IO_SPACE_LIMIT))
-
-#endif
diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
index ee1dfd2..8153ed2 100644
--- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h
+++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
@@ -5,6 +5,7 @@
/* The ATU offsets can change based on the strapping */
extern u32 iop13xx_atux_pmmr_offset;
extern u32 iop13xx_atue_pmmr_offset;
+void iop13xx_init_early(void);
void iop13xx_init_irq(void);
void iop13xx_map_io(void);
void iop13xx_platform_init(void);
@@ -68,12 +69,11 @@ extern unsigned long get_iop_tick_rate(void);
* 0x8000.0000 + 928M 0x2.8000.0000 (ioremap) PCIE outbound memory window
*
* IO MAP
- * 0x1000 + 64K 0x0.fffb.1000 0xfed6.1000 PCIX outbound i/o window
- * 0x1000 + 64K 0x0.fffd.1000 0xfed7.1000 PCIE outbound i/o window
+ * 0x1000 + 64K 0x0.fffb.1000 0xfef0.1000 PCIX outbound i/o window
+ * 0x1000 + 64K 0x0.fffd.1000 0xfef1.1000 PCIE outbound i/o window
*/
#define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL
#define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL
-#define IOP13XX_PCIX_LOWER_IO_VA 0xfed60000UL
#define IOP13XX_PCIX_LOWER_IO_BA 0x0UL /* OIOTVR */
#define IOP13XX_PCIX_IO_BUS_OFFSET 0x1000UL
#define IOP13XX_PCIX_UPPER_IO_BA (IOP13XX_PCIX_LOWER_IO_BA +\
@@ -102,7 +102,6 @@ extern unsigned long get_iop_tick_rate(void);
/* PCI-E ranges */
#define IOP13XX_PCIE_IO_WINDOW_SIZE 0x10000UL
#define IOP13XX_PCIE_LOWER_IO_PA 0xfffd0000UL
-#define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL
#define IOP13XX_PCIE_LOWER_IO_BA 0x0UL /* OIOTVR */
#define IOP13XX_PCIE_IO_BUS_OFFSET 0x1000UL
#define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index daabb1f..9038626 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -24,6 +24,7 @@
#include <linux/mtd/physmap.h>
#endif
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/hardware/iop_adma.h>
@@ -40,16 +41,6 @@ static struct map_desc iop13xx_std_desc[] __initdata = {
.pfn = __phys_to_pfn(IOP13XX_PMMR_PHYS_MEM_BASE),
.length = IOP13XX_PMMR_SIZE,
.type = MT_DEVICE,
- }, { /* PCIE IO space */
- .virtual = IOP13XX_PCIE_LOWER_IO_VA,
- .pfn = __phys_to_pfn(IOP13XX_PCIE_LOWER_IO_PA),
- .length = IOP13XX_PCIX_IO_WINDOW_SIZE,
- .type = MT_DEVICE,
- }, { /* PCIX IO space */
- .virtual = IOP13XX_PCIX_LOWER_IO_VA,
- .pfn = __phys_to_pfn(IOP13XX_PCIX_LOWER_IO_PA),
- .length = IOP13XX_PCIX_IO_WINDOW_SIZE,
- .type = MT_DEVICE,
},
};
@@ -363,6 +354,12 @@ static struct platform_device iop13xx_adma_2_channel = {
void __init iop13xx_map_io(void)
{
+ unsigned long pfn[] = {
+ __phys_to_pfn(IOP13XX_PCIX_LOWER_IO_PA),
+ __phys_to_pfn(IOP13XX_PCIE_LOWER_IO_PA),
+ };
+ pci_map_io_pfn(pfn, ARRAY_SIZE(pfn));
+
/* Initialize the Static Page Table maps */
iotable_init(iop13xx_std_desc, ARRAY_SIZE(iop13xx_std_desc));
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 30/30] ARM: orion5x: use fixed PCI i/o mapping
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
` (28 preceding siblings ...)
2012-03-02 3:13 ` [PATCH v3 29/30] ARM: iop13xx: " Rob Herring
@ 2012-03-02 3:13 ` Rob Herring
2012-03-05 20:13 ` Nicolas Pitre
29 siblings, 1 reply; 67+ messages in thread
From: Rob Herring @ 2012-03-02 3:13 UTC (permalink / raw)
To: linux-arm-kernel
From: Rob Herring <rob.herring@calxeda.com>
orion5x i/o handling must have been broken as it had no __io()
translation. It may actually work now.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
---
arch/arm/mach-orion5x/common.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 0e28bae..9bab4cb 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -24,6 +24,7 @@
#include <asm/timex.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
+#include <asm/mach/pci.h>
#include <asm/mach/time.h>
#include <mach/bridge-regs.h>
#include <mach/hardware.h>
@@ -44,16 +45,6 @@ static struct map_desc orion5x_io_desc[] __initdata = {
.length = ORION5X_REGS_SIZE,
.type = MT_DEVICE,
}, {
- .virtual = ORION5X_PCIE_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
- .length = ORION5X_PCIE_IO_SIZE,
- .type = MT_DEVICE,
- }, {
- .virtual = ORION5X_PCI_IO_VIRT_BASE,
- .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
- .length = ORION5X_PCI_IO_SIZE,
- .type = MT_DEVICE,
- }, {
.virtual = ORION5X_PCIE_WA_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
.length = ORION5X_PCIE_WA_SIZE,
@@ -63,6 +54,11 @@ static struct map_desc orion5x_io_desc[] __initdata = {
void __init orion5x_map_io(void)
{
+ unsigned long pci_io_pfn[] = {
+ __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
+ __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
+ };
+ pci_map_io_pfn(pci_io_pfn, ARRAY_SIZE(pci_io_pfn));
iotable_init(orion5x_io_desc, ARRAY_SIZE(orion5x_io_desc));
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 67+ messages in thread
* [PATCH v3 30/30] ARM: orion5x: use fixed PCI i/o mapping
2012-03-02 3:13 ` [PATCH v3 30/30] ARM: orion5x: " Rob Herring
@ 2012-03-05 20:13 ` Nicolas Pitre
0 siblings, 0 replies; 67+ messages in thread
From: Nicolas Pitre @ 2012-03-05 20:13 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 1 Mar 2012, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> orion5x i/o handling must have been broken as it had no __io()
> translation. It may actually work now.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Lennert Buytenhek <kernel@wantstofly.org>
> Cc: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Nicolas Pitre <nico@linaro.org>
> ---
> arch/arm/mach-orion5x/common.c | 16 ++++++----------
> 1 files changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
> index 0e28bae..9bab4cb 100644
> --- a/arch/arm/mach-orion5x/common.c
> +++ b/arch/arm/mach-orion5x/common.c
> @@ -24,6 +24,7 @@
> #include <asm/timex.h>
> #include <asm/mach/arch.h>
> #include <asm/mach/map.h>
> +#include <asm/mach/pci.h>
> #include <asm/mach/time.h>
> #include <mach/bridge-regs.h>
> #include <mach/hardware.h>
> @@ -44,16 +45,6 @@ static struct map_desc orion5x_io_desc[] __initdata = {
> .length = ORION5X_REGS_SIZE,
> .type = MT_DEVICE,
> }, {
> - .virtual = ORION5X_PCIE_IO_VIRT_BASE,
> - .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
> - .length = ORION5X_PCIE_IO_SIZE,
> - .type = MT_DEVICE,
> - }, {
> - .virtual = ORION5X_PCI_IO_VIRT_BASE,
> - .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
> - .length = ORION5X_PCI_IO_SIZE,
> - .type = MT_DEVICE,
> - }, {
> .virtual = ORION5X_PCIE_WA_VIRT_BASE,
> .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
> .length = ORION5X_PCIE_WA_SIZE,
> @@ -63,6 +54,11 @@ static struct map_desc orion5x_io_desc[] __initdata = {
>
> void __init orion5x_map_io(void)
> {
> + unsigned long pci_io_pfn[] = {
> + __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
> + __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
> + };
> + pci_map_io_pfn(pci_io_pfn, ARRAY_SIZE(pci_io_pfn));
> iotable_init(orion5x_io_desc, ARRAY_SIZE(orion5x_io_desc));
> }
>
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 67+ messages in thread