mach/io.h cleanup and removal
Subsystems (29)
v3 cover mach/io.h cleanup and removal
From: Rob Herring <[email protected]>
The last version got bounced from lists with too many CC's, so I've cut back the CC lists.
This series removes mach/io.h from all but a few platforms. The major change from the last version is the addition of fixed PCI I/O mapping and coverting most PCI platforms over. I don't have any platforms with PCI to test on, so I need people to test. Dove and Kirkwood with 2 buses in particular need testing.
Changes from last version:
- use pfn rather than phys addr as some platforms have >32-bit addresses
- move pci_map_io (now pci_map_io_pfn) into bios32.c
- omap and davinci mach/io.h fixes
- remove Tegra MMIO_BASE define
- move ep93xx IO_MEM define
- fix some compile breaks
I'd like to merge the first 19 patches for 3.4. The PCI changes need time to review and test, so they I don't think they will get sorted out in time.
These are the remaining io.h headers and reasons they are still needed:
Non-standard io accessors or mapping:arch/arm/mach-ebsa110/include/mach/io.harch/arm/mach-rpc/include/mach/io.harch/arm/mach-s3c2410/include/mach/io.harch/arm/mach-ixp4xx/include/mach/io.h
Probably can be fixed, but needs more work on PCI mapping and resources:arch/arm/mach-mv78xx0/include/mach/io.h arch/arm/mach-iop32x/include/mach/io.h arch/arm/mach-iop33x/include/mach/io.h
Propose removing the platform altogether:arch/arm/mach-ixp2000/include/mach/io.h
See http://www.spinics.net/lists/arm-kernel/msg161977.html
Only needed for !CONFIG_MMU:arch/arm/mach-footbridge/include/mach/io.h
This is based on at91 and omap io.h clean-up from these 2 trees queued for 3.4:git://github.com/at91linux/linux-at91 at91-3.4-for_cleanup2git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap iomap
This series is available here:git://sources.calxeda.com/kernel/linux.git io-cleanup
Rob
Arnd Bergmann (1):
iop13xx: use more regular PCI I/O space handling
Rob Herring (28):
usb: ohci-pxa27x: add explicit include of hardware.h
ARM: provide runtime hook for ioremap/iounmap
ARM: imx: convert to common runtime ioremap hook
ARM: msm: use runtime ioremap hook
ARM: msm: clean-up mach/io.h
ARM: iop13xx: use runtime ioremap hook
ARM: iop13xx: move io.h externs to pci.h
[media] davinci: remove includes of mach/io.h
ARM: davinci: remove unneeded mach/io.h include
ARM: orion5x: clean-up mach/io.h
ARM: tegra: clean-up mach/io.h
ARM: ep93xx: clean-up mach/io.h
ARM: at91: add explicit include of hardware.h to uncompressor
ARM: dove: add explicit include of dove.h to addr-map.c
ARM: clps711x: remove unneeded include of mach/io.h
ARM: make mach/io.h include optional
ARM: remove bunch of now unused mach/io.h files
ARM: kill off __mem_pci
ARM: Add fixed PCI i/o mapping
ARM: tegra: use fixed PCI i/o mapping
ARM: integrator: use fixed PCI i/o mapping
ARM: shark: use fixed PCI i/o mapping
ARM: footbridge: use fixed PCI i/o mapping
ARM: dove: use fixed PCI i/o mapping
ARM: kirkwood: use fixed PCI i/o mapping
ARM: ixp23xx: use fixed PCI i/o mapping
ARM: iop13xx: use fixed PCI i/o mapping
ARM: orion5x: use fixed PCI i/o mapping
Tony Lindgren (1):
ARM: OMAP: Remove remaining includes for mach/io.h
arch/arm/Kconfig | 12 +++ arch/arm/include/asm/io.h | 62 +++++++------ arch/arm/include/asm/mach/pci.h | 18 ++++ arch/arm/kernel/bios32.c | 23 +++++ arch/arm/mach-at91/include/mach/io.h | 31 ------- arch/arm/mach-at91/include/mach/uncompress.h | 1 + arch/arm/mach-bcmring/include/mach/io.h | 33 ------- arch/arm/mach-clps711x/include/mach/io.h | 36 -------- arch/arm/mach-clps711x/include/mach/uncompress.h | 1 - arch/arm/mach-cns3xxx/include/mach/io.h | 17 ---- arch/arm/mach-davinci/include/mach/entry-macro.S | 1 - arch/arm/mach-davinci/include/mach/io.h | 24 ----- arch/arm/mach-dove/addr-map.c | 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 | 20 ---- arch/arm/mach-dove/pcie.c | 9 +-- arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 9 ++ arch/arm/mach-ep93xx/include/mach/io.h | 22 ----- arch/arm/mach-exynos/include/mach/io.h | 26 ------ arch/arm/mach-footbridge/common.c | 12 +-- .../arm/mach-footbridge/include/mach/debug-macro.S | 3 +- arch/arm/mach-footbridge/include/mach/io.h | 25 +----- 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-imx/mm-imx3.c | 4 +- arch/arm/mach-integrator/include/mach/io.h | 34 ------- arch/arm/mach-integrator/include/mach/platform.h | 4 + arch/arm/mach-integrator/integrator_ap.c | 11 +-- arch/arm/mach-iop13xx/include/mach/io.h | 41 --------- arch/arm/mach-iop13xx/include/mach/iop13xx.h | 15 +--- arch/arm/mach-iop13xx/io.c | 37 ++------ arch/arm/mach-iop13xx/iq81340mc.c | 1 + arch/arm/mach-iop13xx/iq81340sc.c | 1 + arch/arm/mach-iop13xx/pci.c | 12 ++-- arch/arm/mach-iop13xx/pci.h | 6 ++ arch/arm/mach-iop13xx/setup.c | 17 ++-- 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/core.c | 7 +- arch/arm/mach-ixp23xx/include/mach/io.h | 23 ----- arch/arm/mach-ixp23xx/include/mach/ixp23xx.h | 20 ++--- arch/arm/mach-ixp23xx/pci.c | 2 +- arch/arm/mach-ixp4xx/include/mach/io.h | 6 +- arch/arm/mach-kirkwood/common.c | 21 ++--- arch/arm/mach-kirkwood/include/mach/io.h | 26 ------ arch/arm/mach-kirkwood/include/mach/kirkwood.h | 8 +- arch/arm/mach-kirkwood/pcie.c | 8 +- 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/board-halibut.c | 6 ++ arch/arm/mach-msm/board-trout.c | 6 ++ arch/arm/mach-msm/include/mach/io.h | 36 -------- arch/arm/mach-msm/include/mach/msm_iomap-7x00.h | 6 ++ 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 + arch/arm/mach-msm/io.c | 1 - arch/arm/mach-mv78xx0/include/mach/io.h | 2 - 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/entry-macro.S | 1 - arch/arm/mach-omap1/include/mach/io.h | 46 ---------- arch/arm/mach-omap1/sram.S | 1 - arch/arm/mach-omap2/include/mach/io.h | 49 ---------- arch/arm/mach-orion5x/common.c | 16 ++-- arch/arm/mach-orion5x/common.h | 9 ++ arch/arm/mach-orion5x/include/mach/io.h | 33 ------- arch/arm/mach-orion5x/pci.c | 1 + arch/arm/mach-orion5x/tsx09-common.c | 1 + 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-rpc/include/mach/io.h | 5 - arch/arm/mach-s3c2410/include/mach/io.h | 5 - 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-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 | 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-tegra/include/mach/debug-macro.S | 1 - arch/arm/mach-tegra/include/mach/io.h | 95 -------------------- arch/arm/mach-tegra/include/mach/iomap.h | 51 +++++++++++ arch/arm/mach-tegra/io.c | 3 + arch/arm/mach-tegra/pcie.c | 41 +-------- 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/mm/ioremap.c | 6 ++ arch/arm/plat-mxc/include/mach/hardware.h | 3 + arch/arm/plat-mxc/include/mach/io.h | 39 -------- arch/arm/plat-omap/include/plat/sdrc.h | 1 - arch/arm/plat-spear/include/plat/io.h | 22 ----- drivers/media/video/davinci/vpbe_osd.c | 1 - drivers/media/video/davinci/vpbe_venc.c | 1 - drivers/usb/host/ohci-pxa27x.c | 1 + drivers/video/omap2/vrfb.c | 1 - 115 files changed, 315 insertions(+), 1584 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-dove/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-integrator/include/mach/io.h delete mode 100644 arch/arm/mach-iop13xx/include/mach/io.h create mode 100644 arch/arm/mach-iop13xx/pci.h delete mode 100644 arch/arm/mach-ixp23xx/include/mach/io.h delete mode 100644 arch/arm/mach-kirkwood/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-shark/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-tegra/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
Signature · 1 line
1.7.5.4
PATCH v3 1/30 usb: ohci-pxa27x: add explicit include of hardware.h
From: Rob Herring <[email protected]>
ohci-pxa27x needs cpu_is_pxa3xx macro.
--- drivers/usb/host/ohci-pxa27x.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/usb/host/ohci-pxa27x.c +1 -0
@@ -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>
Signature · 1 line
1.7.5.4
PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap
In reply to Rob HerringFrom: Rob Herring <[email protected]>
We have compile time over-ride of ioremap and iounmap, but an run-time override is needed for multi-platform builds.
--- arch/arm/include/asm/io.h | 8 ++++++-- arch/arm/mm/ioremap.c | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-)
arch/arm/include/asm/io.h +6 -2
@@ -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)
arch/arm/mm/ioremap.c +6 -0
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap
Quoted 7 lines · Rob Herring
From: Rob Herring <[email protected]>
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 <[email protected]>Cc Russell King <[email protected]>
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.
Quoted 49 lines
--- arch/arm/include/asm/io.h | 8 ++++++-- arch/arm/mm/ioremap.c | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-)arch/arm/include/asm/io.h +6
-2@@ -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)arch/arm/mm/ioremap.c +6
-0@@ -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);Signature · 1 line
1.7.5.4
PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap
Quoted 5 lines · Nicolas Pitre
Given that the majority of existing platforms don't need the indirection, should we make this indirection conditional on
CONFIG_NEED_IOREMAP_HOOKand 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
PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap
Quoted 10 lines · Arnd Bergmann
Quoted 5 lines · Nicolas Pitre
Given that the majority of existing platforms don't need the indirection, should we make this indirection conditional on
CONFIG_NEED_IOREMAP_HOOKand 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
PATCH v4 1/4 ARM: provide runtime hook for ioremap/iounmap
From: Rob Herring <[email protected]>
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.
--- arch/arm/include/asm/io.h | 7 ++++++- arch/arm/mm/ioremap.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletions(-)
arch/arm/include/asm/io.h +6 -1
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsextern 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)
arch/arm/mm/ioremap.c +16 -0
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v4 2/4 ARM: imx: convert to common runtime ioremap hook
From: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-imx/mm-imx3.c +5 -5
@@ -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 )
arch/arm/plat-mxc/include/mach/hardware.h +3 -0
@@ -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)
arch/arm/plat-mxc/include/mach/io.h +0 -17
@@ -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)
Signature · 1 line
1.7.5.4
PATCH v4 3/4 ARM: msm: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-msm/board-halibut.c +6 -0
@@ -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,
arch/arm/mach-msm/board-trout.c +6 -0
@@ -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,
arch/arm/mach-msm/include/mach/io.h +0 -5
@@ -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)
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h +6 -0
@@ -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
arch/arm/mach-msm/io.c +3 -5
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v4 3/4 ARM: msm: use runtime ioremap hook
Quoted 5 lines · Rob Herring
From: Rob Herring <[email protected]>
Convert msm platforms to use run-time ioremap hook instead of the compile time hook.
Quoted 7 lines
According to David Brown, only the msm7201 needed the ioremap hook.
Signed-off-by Rob Herring <[email protected]>Tested-by David Brown <[email protected]>Acked-by David Brown <[email protected]>Cc Daniel Walker <[email protected]>Cc Bryan Huntsman <[email protected]>
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
Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
PATCH v4 3/4 ARM: msm: use runtime ioremap hook
Quoted 14 lines · David Brown
Quoted 5 lines · Rob Herring
From: Rob Herring <[email protected]>
Convert msm platforms to use run-time ioremap hook instead of the compile time hook.
Quoted 7 lines
According to David Brown, only the msm7201 needed the ioremap hook.
Signed-off-by Rob Herring <[email protected]>Tested-by David Brown <[email protected]>Acked-by David Brown <[email protected]>Cc Daniel Walker <[email protected]>Cc Bryan Huntsman <[email protected]>
Quoted 5 lines
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
PATCH v4 4/4 ARM: iop13xx: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-iop13xx/include/mach/io.h +0 -7
@@ -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
arch/arm/mach-iop13xx/io.c +10 -8
@@ -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; +}
arch/arm/mach-iop13xx/iq81340mc.c +1 -0
@@ -92,6 +92,7 @@ static struct sys_timer iq81340mc_timer = {MACHINE_START (IQ81340MC ,"Intel IQ81340MC" )/* Maintainer: Dan Williams <[email protected]> */ .atag_offset = 0x100, + .init_early = iop13xx_init_early, .map_io = iop13xx_map_io, .init_irq = iop13xx_init_irq, .timer = &iq81340mc_timer,
arch/arm/mach-iop13xx/iq81340sc.c +1 -0
@@ -94,6 +94,7 @@ static struct sys_timer iq81340sc_timer = {MACHINE_START (IQ81340SC ,"Intel IQ81340SC" )/* Maintainer: Dan Williams <[email protected]> */ .atag_offset = 0x100, + .init_early = iop13xx_init_early, .map_io = iop13xx_map_io, .init_irq = iop13xx_init_irq, .timer = &iq81340sc_timer,
Signature · 1 line
1.7.5.4
PATCH v4 1/4 ARM: provide runtime hook for ioremap/iounmap
In reply to Rob HerringQuoted 7 lines · Rob Herring
From: Rob Herring <[email protected]>
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.
Quoted 5 lines
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 <[email protected]>Cc Russell King <[email protected]>
Very nice!
Just one small comment:
Quoted 22 lines
arch/arm/mm/ioremap.c +7
-0@@ -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); }
arch/arm/mm/ioremap.c void __iounmap(volatile void __iomem *io_addr) · line 388
Quoted 10 lines
arch/arm/mm/ioremap.c +9
-0EXPORT_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:
PATCH v4 1/4 ARM: provide runtime hook for ioremap/iounmap
In reply to Rob HerringQuoted 13 lines · Rob Herring
From: Rob Herring <[email protected]>
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 <[email protected]>Cc Russell King <[email protected]>---
[...]
arch/arm/mm/ioremap.c __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, · line 310
Quoted 9 lines
index 80632e8..c37c67a 100644
arch/arm/mm/ioremap.c +2
-0@@ -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.
arch/arm/mm/ioremap.c __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, · line 320
Quoted 9 lines
arch/arm/mm/ioremap.c +4
-0void __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.
arch/arm/mm/ioremap.c void __iounmap(volatile void __iomem *io_addr) · line 382
Quoted 7 lines
arch/arm/mm/ioremap.c +3
-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);
Same comment as above about the export.
Quoted 8 lines
arch/arm/mm/ioremap.c +5
-0+void __arm_iounmap (volatile void __iomem *io_addr) +{ +arch_iounmap (io_addr); +} +EXPORT_SYMBOL (__arm_iounmap);Signature · 1 line
1.7.5.4
PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap
In reply to Nicolas PitreQuoted 32 lines · Nicolas Pitre
Quoted 10 lines · Arnd Bergmann
Quoted 5 lines · Nicolas Pitre
Given that the majority of existing platforms don't need the indirection, should we make this indirection conditional on
CONFIG_NEED_IOREMAP_HOOKand 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_ioremaparch_ioremap
#define__arch_iounmaparch_iounmapby:
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 longphys_addr,size_tsize, unsigned int mtype)
Quoted 8 lines
{ 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
PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap
Quoted 2 lines · Rob Herring
There's not much point in converting ixp4xx and ebsa110 to runtime hooks as they still have other
io.hneeds.
I think there is. Uniformity is highly valuable.
Nicolas
PATCH v5 1/7 ARM: provide runtime hook for ioremap/iounmap
In reply to Nicolas PitreFrom: Rob Herring <[email protected]>
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.
--- arch/arm/include/asm/io.h | 7 ++++++- arch/arm/mm/ioremap.c | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-)
arch/arm/include/asm/io.h +6 -1
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsextern 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)
arch/arm/mm/ioremap.c +14 -3
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v5 2/7 ARM: imx: convert to common runtime ioremap hook
From: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-imx/mm-imx3.c +5 -5
@@ -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 )
arch/arm/plat-mxc/include/mach/hardware.h +3 -0
@@ -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)
arch/arm/plat-mxc/include/mach/io.h +0 -17
@@ -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)
Signature · 1 line
1.7.5.4
PATCH v5 3/7 ARM: msm: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-msm/board-halibut.c +6 -0
@@ -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,
arch/arm/mach-msm/board-trout.c +6 -0
@@ -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,
arch/arm/mach-msm/include/mach/io.h +0 -5
@@ -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)
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h +6 -0
@@ -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
arch/arm/mach-msm/io.c +3 -5
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v5 4/7 ARM: iop13xx: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-iop13xx/include/mach/io.h +0 -7
@@ -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
arch/arm/mach-iop13xx/io.c +10 -8
@@ -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; +}
arch/arm/mach-iop13xx/iq81340mc.c +1 -0
@@ -92,6 +92,7 @@ static struct sys_timer iq81340mc_timer = {MACHINE_START (IQ81340MC ,"Intel IQ81340MC" )/* Maintainer: Dan Williams <[email protected]> */ .atag_offset = 0x100, + .init_early = iop13xx_init_early, .map_io = iop13xx_map_io, .init_irq = iop13xx_init_irq, .timer = &iq81340mc_timer,
arch/arm/mach-iop13xx/iq81340sc.c +1 -0
@@ -94,6 +94,7 @@ static struct sys_timer iq81340sc_timer = {MACHINE_START (IQ81340SC ,"Intel IQ81340SC" )/* Maintainer: Dan Williams <[email protected]> */ .atag_offset = 0x100, + .init_early = iop13xx_init_early, .map_io = iop13xx_map_io, .init_irq = iop13xx_init_irq, .timer = &iq81340sc_timer,
Signature · 1 line
1.7.5.4
PATCH v5 5/7 ARM: ixp4xx: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Convert ixp4xx platforms to use run-time ioremap hook instead of the compile time hook.
--- 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(-)
arch/arm/mach-ixp4xx/avila-setup.c +2 -0
@@ -165,6 +165,7 @@ static void __init avila_init(void)MACHINE_START (AVILA ,"Gateworks Avila Network Platform" )/* Maintainer: Deepak Saxena <[email protected]> */ .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_ENDMACHINE_START (LOFT ,"Giant Shoulder Inc Loft board" )/* Maintainer: Tom Billman <[email protected]> */ .map_io = ixp4xx_map_io, + .init_early = ixp4xx_init_early, .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .atag_offset = 0x100,
arch/arm/mach-ixp4xx/common.c +33 -0
@@ -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
arch/arm/mach-ixp4xx/coyote-setup.c +2 -0
@@ -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_ENDMACHINE_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,
arch/arm/mach-ixp4xx/dsmg600-setup.c +1 -0
@@ -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,
arch/arm/mach-ixp4xx/fsg-setup.c +1 -0
@@ -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,
arch/arm/mach-ixp4xx/gateway7001-setup.c +1 -0
@@ -97,6 +97,7 @@ static void __init gateway7001_init(void)MACHINE_START (GATEWAY7001 ,"Gateway 7001 AP" )/* Maintainer: Imre Kaloz <[email protected]> */ .map_io = ixp4xx_map_io, + .init_early = ixp4xx_init_early, .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .atag_offset = 0x100,
arch/arm/mach-ixp4xx/goramo_mlr.c +1 -0
@@ -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,
arch/arm/mach-ixp4xx/gtwx5715-setup.c +1 -0
@@ -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,
arch/arm/mach-ixp4xx/include/mach/io.h +0 -18
@@ -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)
arch/arm/mach-ixp4xx/include/mach/platform.h +1 -0
@@ -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 );
arch/arm/mach-ixp4xx/ixdp425-setup.c +4 -0
@@ -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_ENDMACHINE_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_ENDMACHINE_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_ENDMACHINE_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,
arch/arm/mach-ixp4xx/nas100d-setup.c +1 -0
@@ -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,
arch/arm/mach-ixp4xx/nslu2-setup.c +1 -0
@@ -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,
arch/arm/mach-ixp4xx/omixp-setup.c +3 -0
@@ -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_ENDMACHINE_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_ENDMACHINE_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,
arch/arm/mach-ixp4xx/vulcan-setup.c +1 -0
@@ -237,6 +237,7 @@ static void __init vulcan_init(void)MACHINE_START (ARCOM_VULCAN ,"Arcom/Eurotech Vulcan" )/* Maintainer: Marc Zyngier <[email protected]> */ .map_io = ixp4xx_map_io, + .init_early = ixp4xx_init_early, .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .atag_offset = 0x100,
arch/arm/mach-ixp4xx/wg302v2-setup.c +1 -0
@@ -98,6 +98,7 @@ static void __init wg302v2_init(void)MACHINE_START (WG302V2 ,"Netgear WG302 v2 / WAG302 v2" )/* Maintainer: Imre Kaloz <[email protected]> */ .map_io = ixp4xx_map_io, + .init_early = ixp4xx_init_early, .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .atag_offset = 0x100,
Signature · 1 line
1.7.5.4
PATCH v5 5/7 ARM: ixp4xx: use runtime ioremap hook
arch/arm/mach-ixp4xx/common.c line 34
Quoted 9 lines · Rob Herring
arch/arm/mach-ixp4xx/common.c +1
-0@@ -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...
PATCH v5 5/7 ARM: ixp4xx: use runtime ioremap hook
Quoted 7 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Herring
arch/arm/mach-ixp4xx/common.c +0
-0@@ -31,6 +31,7 @@
Quoted 6 lines
arch/arm/mach-ixp4xx/common.c line 34
Quoted 3 lines
arch/arm/mach-ixp4xx/common.c +1
-0#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
PATCH v5 5/7 ARM: ixp4xx: use runtime ioremap hook
Quoted 15 lines · Rob Herring
Quoted 7 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Herring
arch/arm/mach-ixp4xx/common.c +0
-0@@ -31,6 +31,7 @@Quoted 6 lines
arch/arm/mach-ixp4xx/common.c line 34
Quoted 3 lines
arch/arm/mach-ixp4xx/common.c +1
-0#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...
Quoted 2 lines
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
PATCH v5 6/7 ARM: ebsa110: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Convert ebsa110 platforms to use run-time ioremap hook instead of the compile time hook.
--- arch/arm/mach-ebsa110/core.c | 15 +++++++++++++++ arch/arm/mach-ebsa110/include/mach/io.h | 9 --------- 2 files changed, 15 insertions(+), 9 deletions(-)
arch/arm/mach-ebsa110/core.c +15 -0
@@ -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,
arch/arm/mach-ebsa110/include/mach/io.h +0 -9
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v5 6/7 ARM: ebsa110: use runtime ioremap hook
Quoted 22 lines · Rob Herring
From: Rob Herring <[email protected]>
Convert ebsa110 platforms to use run-time ioremap hook instead of the compile time hook.
Signed-off-by Rob Herring <[email protected]>Cc Russell King <[email protected]>--- arch/arm/mach-ebsa110/core.c | 15 +++++++++++++++ arch/arm/mach-ebsa110/include/mach/io.h | 9 --------- 2 files changed, 15 insertions(+), 9 deletions(-)arch/arm/mach-ebsa110/core.c +2
-0@@ -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)
arch/arm/mach-ebsa110/core.c static void __init ebsa110_map_io(void) · line 133
Quoted 10 lines
arch/arm/mach-ebsa110/core.c +10
-0+{ +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
PATCH 1/1 ARM: ebsa110: use runtime ioremap hook
From: Rob Herring <[email protected]>
Convert ebsa110 platforms to use run-time ioremap hook instead of the compile time hook.
---
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(-)
arch/arm/mach-ebsa110/core.c +15 -0
@@ -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,
arch/arm/mach-ebsa110/include/mach/io.h +0 -9
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v5 7/7 ARM: remove compile time __arch_ioremap/__arch_iounmap
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Now that all custom ioremap/iounmap users are converted to runtime hook, remove the compile time defines.
--- arch/arm/include/asm/io.h | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-)
arch/arm/include/asm/io.h +5 -10
@@ -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
Signature · 1 line
1.7.5.4
PATCH v5 7/7 ARM: remove compile time __arch_ioremap/__arch_iounmap
Quoted 7 lines · Rob Herring
From: Rob Herring <[email protected]>
Now that all custom ioremap/iounmap users are converted to runtime hook, remove the compile time defines.
Signed-off-by Rob Herring <[email protected]>Cc Russell King <[email protected]>
Quoted 33 lines
--- arch/arm/include/asm/io.h | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-)arch/arm/include/asm/io.h +5
-10@@ -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 Signature · 1 line
1.7.5.4
PATCH v5 1/7 ARM: provide runtime hook for ioremap/iounmap
In reply to Rob HerringQuoted 7 lines · Rob Herring
From: Rob Herring <[email protected]>
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.
Quoted 5 lines
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 <[email protected]>Cc Russell King <[email protected]>
Quoted 68 lines
--- arch/arm/include/asm/io.h | 7 ++++++- arch/arm/mm/ioremap.c | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-)arch/arm/include/asm/io.h +6
-1@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsextern 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)arch/arm/mm/ioremap.c +14
-3@@ -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);Signature · 1 line
1.7.5.4
PATCH v3 3/30 ARM: imx: convert to common runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-imx/mm-imx3.c +2 -2
@@ -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 )
arch/arm/plat-mxc/include/mach/hardware.h +3 -0
@@ -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)
arch/arm/plat-mxc/include/mach/io.h +0 -17
@@ -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)
Signature · 1 line
1.7.5.4
PATCH v3 4/30 ARM: msm: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-msm/board-halibut.c +6 -0
@@ -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,
arch/arm/mach-msm/board-trout.c +6 -0
@@ -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,
arch/arm/mach-msm/include/mach/io.h +0 -5
@@ -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)
arch/arm/mach-msm/include/mach/msm_iomap-7x00.h +6 -0
@@ -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
arch/arm/mach-msm/io.c +0 -1
@@ -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);
Signature · 1 line
1.7.5.4
PATCH v3 5/30 ARM: msm: clean-up mach/io.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Move msm specifics in mach/io.h to respective msm_iomap-*.h headers.
--- 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(-)
arch/arm/mach-msm/include/mach/io.h +0 -7
@@ -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
arch/arm/mach-msm/include/mach/msm_iomap-7x30.h +4 -0
@@ -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
arch/arm/mach-msm/include/mach/msm_iomap-8960.h +4 -0
@@ -50,4 +50,8 @@#define MSM_DEBUG_UART_PHYS 0x16440000#endif +#ifndef __ASSEMBLY__ +extern void msm_map_msm8960_io (void ); +#endif +#endif
arch/arm/mach-msm/include/mach/msm_iomap-8x50.h +4 -0
@@ -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
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h +4 -0
@@ -67,4 +67,8 @@#define MSM_DEBUG_UART_PHYS 0x19C40000#endif +#ifndef __ASSEMBLY__ +extern void msm_map_msm8x60_io (void ); +#endif +#endif
Signature · 1 line
1.7.5.4
PATCH v3 6/30 ARM: iop13xx: use runtime ioremap hook
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- 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(-)
arch/arm/mach-iop13xx/include/mach/io.h +0 -7
@@ -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
arch/arm/mach-iop13xx/io.c +8 -2
@@ -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; +}
arch/arm/mach-iop13xx/iq81340mc.c +1 -0
@@ -92,6 +92,7 @@ static struct sys_timer iq81340mc_timer = {MACHINE_START (IQ81340MC ,"Intel IQ81340MC" )/* Maintainer: Dan Williams <[email protected]> */ .atag_offset = 0x100, + .init_early = iop13xx_init_early, .map_io = iop13xx_map_io, .init_irq = iop13xx_init_irq, .timer = &iq81340mc_timer,
arch/arm/mach-iop13xx/iq81340sc.c +1 -0
@@ -94,6 +94,7 @@ static struct sys_timer iq81340sc_timer = {MACHINE_START (IQ81340SC ,"Intel IQ81340SC" )/* Maintainer: Dan Williams <[email protected]> */ .atag_offset = 0x100, + .init_early = iop13xx_init_early, .map_io = iop13xx_map_io, .init_irq = iop13xx_init_irq, .timer = &iq81340sc_timer,
Signature · 1 line
1.7.5.4
PATCH v3 7/30 ARM: iop13xx: move io.h externs to pci.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
These variables are just needed in pci.c and io.c, so move them out of io.h in preparation to remove io.h.
--- 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
arch/arm/mach-iop13xx/include/mach/io.h +0 -4
@@ -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
arch/arm/mach-iop13xx/io.c +2 -0
@@ -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;
arch/arm/mach-iop13xx/pci.h new file +6 -0
@@ -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;
Signature · 1 line
1.7.5.4
PATCH v3 8/30 ARM: OMAP: Remove remaining includes for mach/io.h
In reply to Rob HerringFrom: Tony Lindgren <[email protected]>
These are no longer needed with the recent iomap.h changes.
--- 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(-)
arch/arm/mach-omap1/include/mach/entry-macro.S +0 -1
@@ -11,7 +11,6 @@ */ #include <mach/hardware.h> -#include <mach/io.h> #include <mach/irqs.h> #include "../../iomap.h"
arch/arm/mach-omap1/sram.S +0 -1
@@ -12,7 +12,6 @@ #include <asm/assembler.h> -#include <mach/io.h> #include <mach/hardware.h> #include "iomap.h"
arch/arm/plat-omap/include/plat/sdrc.h +0 -1
@@ -16,7 +16,6 @@* published by the Free Software Foundation. */ -#include <mach/io.h> /* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
drivers/video/omap2/vrfb.c +0 -1
@@ -27,7 +27,6 @@#include <linux/bitops.h> #include <linux/mutex.h> -#include <mach/io.h> #include <plat/vrfb.h> #include <plat/sdrc.h>
Signature · 1 line
1.7.5.4
PATCH v3 9/30 davinci: remove includes of mach/io.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Remove a few remaining includes of mach/io.h.
--- drivers/media/video/davinci/vpbe_osd.c | 1 - drivers/media/video/davinci/vpbe_venc.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
drivers/media/video/davinci/vpbe_osd.c +0 -1
@@ -28,7 +28,6 @@#include <linux/clk.h> #include <linux/slab.h> -#include <mach/io.h> #include <mach/cputype.h> #include <mach/hardware.h>
drivers/media/video/davinci/vpbe_venc.c +0 -1
@@ -27,7 +27,6 @@#include <mach/hardware.h> #include <mach/mux.h> -#include <mach/io.h> #include <mach/i2c.h> #include <linux/io.h>
Signature · 1 line
1.7.5.4
PATCH v3 10/30 ARM: davinci: remove unneeded mach/io.h include
In reply to Rob HerringFrom: Rob Herring <[email protected]>
entry-macro.S doesn't actually need mach/io.h, so remove it.
--- arch/arm/mach-davinci/include/mach/entry-macro.S | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-davinci/include/mach/entry-macro.S +0 -1
@@ -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
Signature · 1 line
1.7.5.4
PATCH v3 11/30 ARM: orion5x: clean-up mach/io.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Move orion5x specific mach/io.h parts into common.h.
--- 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(-)
arch/arm/mach-orion5x/common.h +9 -0
@@ -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
arch/arm/mach-orion5x/include/mach/io.h +0 -12
@@ -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
arch/arm/mach-orion5x/pci.c +1 -0
@@ -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" /*****************************************************************************
arch/arm/mach-orion5x/tsx09-common.c +1 -0
@@ -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"
Signature · 1 line
1.7.5.4
PATCH v3 11/30 ARM: orion5x: clean-up mach/io.h
Quoted 7 lines · Rob Herring
From: Rob Herring <[email protected]>
Move orion5x specific
mach/io.hparts intocommon.h.Signed-off-by Rob Herring <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Nicolas Pitre <[email protected]>
Quoted 74 lines
--- 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(-)arch/arm/mach-orion5x/common.h +9
-0@@ -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 arch/arm/mach-orion5x/include/mach/io.h +0
-12@@ -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 arch/arm/mach-orion5x/pci.c +1
-0@@ -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" /***************************************************************************** arch/arm/mach-orion5x/tsx09-common.c +1
-0@@ -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" Signature · 1 line
1.7.5.4
PATCH v3 12/30 ARM: tegra: clean-up mach/io.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Move tegra specific mach/io.h parts into iomap.h.
--- 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(-)
arch/arm/mach-tegra/include/mach/debug-macro.S +0 -1
@@ -18,7 +18,6 @@ * */ -#include <mach/io.h> #include <mach/iomap.h> .macro addruart, rp, rv, tmp
arch/arm/mach-tegra/include/mach/io.h +0 -48
56 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/iomap.h +48 -0
52 lines not on this page · raw message
arch/arm/mach-tegra/io.c +1 -0
@@ -26,6 +26,7 @@#include <asm/page.h> #include <asm/mach/map.h> +#include <mach/iomap.h> #include "board.h"
Signature · 1 line
1.7.5.4
PATCH v3 13/30 ARM: ep93xx: clean-up mach/io.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Move ep93xx specifics in mach/io.h to ep93xx-regs.h.
--- 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(-)
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +9 -0
@@ -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
arch/arm/mach-ep93xx/include/mach/io.h +0 -9
@@ -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 */
Signature · 1 line
1.7.5.4
PATCH v3 14/30 ARM: at91: add explicit include of hardware.h to uncompressor
In reply to Rob HerringFrom: Rob Herring <[email protected]>
In preparation to remove mach/io.h, add explicit include of hardware.h.
--- arch/arm/mach-at91/include/mach/uncompress.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-at91/include/mach/uncompress.h +1 -0
@@ -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
Signature · 1 line
1.7.5.4
PATCH v3 15/30 ARM: dove: add explicit include of dove.h to addr-map.c
In reply to Rob HerringFrom: Rob Herring <[email protected]>
In preparation to remove mach/io.h, add explicit include of mach/dove.h
--- arch/arm/mach-dove/addr-map.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-dove/addr-map.c +1 -0
@@ -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"
Signature · 1 line
1.7.5.4
PATCH v3 15/30 ARM: dove: add explicit include of dove.h to addr-map.c
Quoted 5 lines · Rob Herring
From: Rob Herring <[email protected]>
In preparation to remove
mach/io.h, add explicit include ofmach/dove.hSigned-off-by Rob Herring <[email protected]>
Quoted 19 lines
--- arch/arm/mach-dove/addr-map.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/mach-dove/addr-map.c +1
-0@@ -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" Signature · 1 line
1.7.5.4
PATCH v3 16/30 ARM: clps711x: remove unneeded include of mach/io.h
In reply to Rob HerringFrom: Rob Herring <[email protected]>
In preparation to remove mach/io.h, remove an unneeded include of it.
--- arch/arm/mach-clps711x/include/mach/uncompress.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-clps711x/include/mach/uncompress.h +0 -1
@@ -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>
Signature · 1 line
1.7.5.4
PATCH v3 17/30 ARM: make mach/io.h include optional
In reply to Rob HerringFrom: Rob Herring <[email protected]>
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.
--- arch/arm/Kconfig | 19 +++++++++++++++++++ arch/arm/include/asm/io.h | 5 +++++ 2 files changed, 24 insertions(+), 0 deletions(-)
arch/arm/Kconfig +19 -0
@@ -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>).
arch/arm/include/asm/io.h +5 -0
@@ -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
Signature · 1 line
1.7.5.4
PATCH v3 17/30 ARM: make mach/io.h include optional
Quoted 23 lines · Rob Herring
From: Rob Herring <[email protected]>
Add a kconfig option
NEED_MACH_IO_Hto conditionally includemach/io.h.Basing this on
CONFIG_PCIandCONFIG_ISAdoesn't quite work. Most ISA platforms don't needmach/io.h, but ebsa110 does. Most PCI platforms needmach/io.hfor now, but ks8695 doesn't which means it's broken? omap has a lot of other stuff in itsio.h, so it also needsio.huntil it is cleaned up.Signed-off-by Rob Herring <[email protected]>Cc Russell King <[email protected]>--- arch/arm/Kconfig | 19 +++++++++++++++++++ arch/arm/include/asm/io.h | 5 +++++ 2 files changed, 24 insertions(+), 0 deletions(-)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config GENERIC_ISA_DMA · line 194
Quoted 9 lines
arch/arm/Kconfig +3
-0@@ -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:
Quoted 148 lines
arch/arm/Kconfig +16
-0@@ -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>).arch/arm/include/asm/io.h +5
-0@@ -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 Signature · 1 line
1.7.5.4
PATCH v3 18/30 ARM: remove bunch of now unused mach/io.h files
In reply to Rob HerringFrom: Rob Herring <[email protected]>
Now that many platforms don't need mach/io.h, remove the usused ones.
--- 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
arch/arm/mach-at91/include/mach/io.h deleted +0 -31
@@ -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
arch/arm/mach-bcmring/include/mach/io.h deleted +0 -33
@@ -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
arch/arm/mach-clps711x/include/mach/io.h deleted +0 -36
@@ -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
arch/arm/mach-cns3xxx/include/mach/io.h deleted +0 -17
@@ -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
arch/arm/mach-davinci/include/mach/io.h deleted +0 -24
@@ -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 */
arch/arm/mach-ep93xx/include/mach/io.h deleted +0 -13
@@ -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 */
arch/arm/mach-exynos/include/mach/io.h deleted +0 -26
@@ -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 <[email protected]> -* -* 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 */
arch/arm/mach-gemini/include/mach/io.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* -* Copyright (C) 2001-2006 Storlink, Corp. -* Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]> -* -* 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 */
arch/arm/mach-h720x/include/mach/io.h deleted +0 -22
@@ -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 <[email protected]>: -* 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
arch/arm/mach-highbank/include/mach/io.h deleted +0 -7
@@ -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
arch/arm/mach-ks8695/include/mach/io.h deleted +0 -19
@@ -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
arch/arm/mach-lpc32xx/include/mach/io.h deleted +0 -27
@@ -1,27 +0,0 @@ -/* -* arch/arm/mach-lpc32xx/include/mach/io.h -* -* Author: Kevin Wells <[email protected]> -* -* 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
arch/arm/mach-mmp/include/mach/io.h deleted +0 -21
@@ -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 */
arch/arm/mach-msm/include/mach/io.h deleted +0 -24
@@ -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
arch/arm/mach-mxs/include/mach/io.h deleted +0 -22
@@ -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__ */
arch/arm/mach-netx/include/mach/io.h deleted +0 -28
@@ -1,28 +0,0 @@ -/* -* arch/arm/mach-netx/include/mach/io.h -* -* Copyright (C) 2005 Sascha Hauer <[email protected]>, 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
arch/arm/mach-nomadik/include/mach/io.h deleted +0 -22
@@ -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
arch/arm/mach-omap1/include/mach/io.h deleted +0 -46
46 lines not on this page · raw message
arch/arm/mach-omap2/include/mach/io.h deleted +0 -49
49 lines not on this page · raw message
arch/arm/mach-orion5x/include/mach/io.h deleted +0 -21
@@ -1,21 +0,0 @@ -/* -* arch/arm/mach-orion5x/include/mach/io.h -* -* Tzachi Perelstein <[email protected]> -* -* 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
arch/arm/mach-picoxcell/include/mach/io.h deleted +0 -22
@@ -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 */
arch/arm/mach-pnx4008/include/mach/io.h deleted +0 -21
@@ -1,21 +0,0 @@ - -/* -* arch/arm/mach-pnx4008/include/mach/io.h -* -* Author: Dmitry Chigirev <[email protected]> -* -* 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
arch/arm/mach-prima2/include/mach/io.h deleted +0 -16
@@ -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
arch/arm/mach-pxa/include/mach/io.h deleted +0 -20
@@ -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
arch/arm/mach-realview/include/mach/io.h deleted +0 -28
@@ -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
arch/arm/mach-s3c64xx/include/mach/io.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* arch/arm/mach-s3c64xxinclude/mach/io.h -* -* Copyright 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* 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
arch/arm/mach-s5p64x0/include/mach/io.h deleted +0 -25
@@ -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 <[email protected]> -* -* 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
arch/arm/mach-s5pc100/include/mach/io.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* arch/arm/mach-s5pc100/include/mach/io.h -* -* Copyright 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* 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
arch/arm/mach-s5pv210/include/mach/io.h deleted +0 -26
@@ -1,26 +0,0 @@ -/* linux/arch/arm/mach-s5pv210/include/mach/io.h -* -* Copyright 2008-2010 Ben Dooks <[email protected]> -* -* 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 */
arch/arm/mach-sa1100/include/mach/io.h deleted +0 -20
@@ -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
arch/arm/mach-shmobile/include/mach/io.h deleted +0 -9
@@ -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 */
arch/arm/mach-spear3xx/include/mach/io.h deleted +0 -19
@@ -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<[email protected]> -* -* 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 */
arch/arm/mach-spear6xx/include/mach/io.h deleted +0 -20
@@ -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<[email protected]> -* -* 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 */ -
arch/arm/mach-u300/include/mach/io.h deleted +0 -20
@@ -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 <[email protected]> -*/ -#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
arch/arm/mach-ux500/include/mach/io.h deleted +0 -22
@@ -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
arch/arm/mach-versatile/include/mach/io.h deleted +0 -28
@@ -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
arch/arm/mach-vexpress/include/mach/io.h deleted +0 -26
@@ -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
arch/arm/mach-vt8500/include/mach/io.h deleted +0 -26
@@ -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
arch/arm/mach-w90x900/include/mach/io.h deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* arch/arm/mach-w90x900/include/mach/io.h -* -* Copyright (c) 2008 Nuvoton technology corporation -* All rights reserved. -* -* Wan ZongShun <[email protected]> -* -* 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
arch/arm/mach-zynq/include/mach/io.h deleted +0 -33
@@ -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
arch/arm/plat-mxc/include/mach/io.h deleted +0 -22
@@ -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
arch/arm/plat-spear/include/plat/io.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* -* arch/arm/plat-spear/include/plat/io.h -* -* IO definitions for SPEAr platform -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar<[email protected]> -* -* 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 */
Signature · 1 line
1.7.5.4
PATCH v3 18/30 ARM: remove bunch of now unused mach/io.h files
Quoted 3 lines · Rob Herring
From: Rob Herring <[email protected]>
Now that many platforms don't need
mach/io.h, remove the usused ones.
unused*
Quoted 7 lines
Signed-off-by Rob Herring <[email protected]>Acked-by Shawn Guo <[email protected]>Acked-by Linus Walleij <[email protected]>Acked-by Jamie Iles <[email protected]>Acked-by Pawel Moll <[email protected]>
Quoted 1,339 lines
--- 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.harch/arm/mach-at91/include/mach/io.h deleted +0
-31@@ -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 arch/arm/mach-bcmring/include/mach/io.h deleted +0
-33@@ -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 arch/arm/mach-clps711x/include/mach/io.h deleted +0
-36@@ -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 arch/arm/mach-cns3xxx/include/mach/io.h deleted +0
-17@@ -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 arch/arm/mach-davinci/include/mach/io.h deleted +0
-24@@ -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 */ arch/arm/mach-ep93xx/include/mach/io.h deleted +0
-13@@ -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 */ arch/arm/mach-exynos/include/mach/io.h deleted +0
-26@@ -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 <[email protected]> -* -* 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 */ arch/arm/mach-gemini/include/mach/io.h deleted +0
-18@@ -1,18 +0,0 @@ -/* -* Copyright (C) 2001-2006 Storlink, Corp. -* Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]> -* -* 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 */ arch/arm/mach-h720x/include/mach/io.h deleted +0
-22@@ -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 <[email protected]>: -* 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 arch/arm/mach-highbank/include/mach/io.h deleted +0
-7@@ -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 arch/arm/mach-ks8695/include/mach/io.h deleted +0
-19@@ -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 arch/arm/mach-lpc32xx/include/mach/io.h deleted +0
-27@@ -1,27 +0,0 @@ -/* -* arch/arm/mach-lpc32xx/include/mach/io.h -* -* Author: Kevin Wells <[email protected]> -* -* 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 arch/arm/mach-mmp/include/mach/io.h deleted +0
-21@@ -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 */ arch/arm/mach-msm/include/mach/io.h deleted +0
-24@@ -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 arch/arm/mach-mxs/include/mach/io.h deleted +0
-22@@ -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__ */ arch/arm/mach-netx/include/mach/io.h deleted +0
-28@@ -1,28 +0,0 @@ -/* -* arch/arm/mach-netx/include/mach/io.h -* -* Copyright (C) 2005 Sascha Hauer <[email protected]>, 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 arch/arm/mach-nomadik/include/mach/io.h deleted +0
-22@@ -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 arch/arm/mach-omap1/include/mach/io.h deleted +0
-46@@ -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 arch/arm/mach-omap2/include/mach/io.h deleted +0
-49@@ -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 <[email protected]> -* -* 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 arch/arm/mach-orion5x/include/mach/io.h deleted +0
-21@@ -1,21 +0,0 @@ -/* -* arch/arm/mach-orion5x/include/mach/io.h -* -* Tzachi Perelstein <[email protected]> -* -* 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 arch/arm/mach-picoxcell/include/mach/io.h deleted +0
-22@@ -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 */ arch/arm/mach-pnx4008/include/mach/io.h deleted +0
-21@@ -1,21 +0,0 @@ - -/* -* arch/arm/mach-pnx4008/include/mach/io.h -* -* Author: Dmitry Chigirev <[email protected]> -* -* 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 arch/arm/mach-prima2/include/mach/io.h deleted +0
-16@@ -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 arch/arm/mach-pxa/include/mach/io.h deleted +0
-20@@ -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 arch/arm/mach-realview/include/mach/io.h deleted +0
-28@@ -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 arch/arm/mach-s3c64xx/include/mach/io.h deleted +0
-18@@ -1,18 +0,0 @@ -/* arch/arm/mach-s3c64xxinclude/mach/io.h -* -* Copyright 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* 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 arch/arm/mach-s5p64x0/include/mach/io.h deleted +0
-25@@ -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 <[email protected]> -* -* 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 arch/arm/mach-s5pc100/include/mach/io.h deleted +0
-18@@ -1,18 +0,0 @@ -/* arch/arm/mach-s5pc100/include/mach/io.h -* -* Copyright 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* 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 arch/arm/mach-s5pv210/include/mach/io.h deleted +0
-26@@ -1,26 +0,0 @@ -/* linux/arch/arm/mach-s5pv210/include/mach/io.h -* -* Copyright 2008-2010 Ben Dooks <[email protected]> -* -* 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 */ arch/arm/mach-sa1100/include/mach/io.h deleted +0
-20@@ -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 arch/arm/mach-shmobile/include/mach/io.h deleted +0
-9@@ -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 */ arch/arm/mach-spear3xx/include/mach/io.h deleted +0
-19@@ -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<[email protected]> -* -* 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 */ arch/arm/mach-spear6xx/include/mach/io.h deleted +0
-20@@ -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<[email protected]> -* -* 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 */ -arch/arm/mach-u300/include/mach/io.h deleted +0
-20@@ -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 <[email protected]> -*/ -#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 arch/arm/mach-ux500/include/mach/io.h deleted +0
-22@@ -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 arch/arm/mach-versatile/include/mach/io.h deleted +0
-28@@ -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 arch/arm/mach-vexpress/include/mach/io.h deleted +0
-26@@ -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 arch/arm/mach-vt8500/include/mach/io.h deleted +0
-26@@ -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 arch/arm/mach-w90x900/include/mach/io.h deleted +0
-30@@ -1,30 +0,0 @@ -/* -* arch/arm/mach-w90x900/include/mach/io.h -* -* Copyright (c) 2008 Nuvoton technology corporation -* All rights reserved. -* -* Wan ZongShun <[email protected]> -* -* 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 arch/arm/mach-zynq/include/mach/io.h deleted +0
-33@@ -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 arch/arm/plat-mxc/include/mach/io.h deleted +0
-22@@ -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 arch/arm/plat-spear/include/plat/io.h deleted +0
-22@@ -1,22 +0,0 @@ -/* -* arch/arm/plat-spear/include/plat/io.h -* -* IO definitions for SPEAr platform -* -* Copyright (C) 2009 ST Microelectronics -* Viresh Kumar<[email protected]> -* -* 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 */ Signature · 1 line
1.7.5.4
PATCH v3 19/30 ARM: kill off __mem_pci
In reply to Rob HerringFrom: Rob Herring <[email protected]>
__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.
--- arch/arm/include/asm/io.h | 46 ++++++++++----------------- arch/arm/mach-dove/include/mach/io.h | 1 - arch/arm/mach-footbridge/include/mach/io.h | 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(-)
arch/arm/include/asm/io.h +17 -29
@@ -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.
arch/arm/mach-dove/include/mach/io.h +0 -1
@@ -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
arch/arm/mach-footbridge/include/mach/io.h +0 -13
@@ -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
arch/arm/mach-integrator/include/mach/io.h +0 -1
@@ -29,6 +29,5 @@#define PCI_IO_VADDR 0xee000000#define __io (a) ((void __iomem *)(PCI_IO_VADDR + (a))) -#define __mem_pci (a) (a)#endif
arch/arm/mach-iop13xx/include/mach/io.h +0 -2
@@ -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);
arch/arm/mach-iop32x/include/mach/io.h +0 -1
@@ -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
arch/arm/mach-iop33x/include/mach/io.h +0 -1
@@ -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
arch/arm/mach-ixp2000/include/mach/io.h +0 -1
@@ -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
arch/arm/mach-ixp23xx/include/mach/io.h +0 -1
@@ -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
arch/arm/mach-ixp4xx/include/mach/io.h +1 -5
@@ -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
arch/arm/mach-kirkwood/include/mach/io.h +0 -2
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr) }#define __io (a) __io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-mv78xx0/include/mach/io.h +0 -2
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr) }#define __io (a) __io(a) -#define __mem_pci (a) (a) -#endif
arch/arm/mach-rpc/include/mach/io.h +0 -5
@@ -28,9 +28,4 @@*/ #define __io (a) (PCIO_BASE + ((a) << 2)) -/* -* 1:1 mapping for ioremapped regions. -*/ -#define __mem_pci (x) (x) -#endif
arch/arm/mach-s3c2410/include/mach/io.h +0 -5
@@ -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
arch/arm/mach-shark/include/mach/io.h +0 -2
@@ -15,6 +15,4 @@#define __io (a) ((void __iomem *)(0xe0000000 + (a))) -#define __mem_pci (addr) (addr) -#endif
arch/arm/mach-tegra/include/mach/io.h +0 -1
@@ -40,7 +40,6 @@ static inline void __iomem *__io(unsigned long addr)#endif #define __io (a) __io(a) -#define __mem_pci (a) (a)#endif
Signature · 1 line
1.7.5.4
PATCH v3 20/30 iop13xx: use more regular PCI I/O space handling
In reply to Rob HerringFrom: Arnd Bergmann <[email protected]>
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.
--- 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(-)
arch/arm/mach-iop13xx/include/mach/io.h +3 -3
@@ -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
arch/arm/mach-iop13xx/include/mach/iop13xx.h +3 -9
@@ -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 -\
arch/arm/mach-iop13xx/io.c +0 -27
@@ -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; }
arch/arm/mach-iop13xx/pci.c +6 -6
@@ -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 :
Signature · 1 line
1.7.5.4
PATCH v3 21/30 ARM: Add fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
This adds a fixed virtual mapping for PCI i/o addresses. The mapping is located at the last 1MB of vmalloc region (0xfef00000).
--- 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(-)
arch/arm/include/asm/io.h +5 -0
@@ -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
arch/arm/include/asm/mach/pci.h +18 -0
@@ -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 *);
arch/arm/kernel/bios32.c +23 -0
@@ -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 ; + } +} +
Signature · 1 line
1.7.5.4
PATCH v3 21/30 ARM: Add fixed PCI i/o mapping
Quoted 4 lines · Rob Herring
From: Rob Herring <[email protected]>
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.
Quoted 2 lines
Signed-off-by Rob Herring <[email protected]>Cc Russell King <[email protected]>
With the above comment addressed:
Quoted 97 lines
--- 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(-)arch/arm/include/asm/io.h +5
-0@@ -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 arch/arm/include/asm/mach/pci.h +18
-0@@ -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 *);arch/arm/kernel/bios32.c +23
-0@@ -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 ; + } +} +Signature · 1 line
1.7.5.4
PATCH v3 22/30 ARM: tegra: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- 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
arch/arm/Kconfig +0 -1
@@ -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,
arch/arm/mach-tegra/include/mach/io.h deleted +0 -46
46 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/iomap.h +3 -0
@@ -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)))
arch/arm/mach-tegra/io.c +2 -0
@@ -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)); }
arch/arm/mach-tegra/pcie.c +4 -37
86 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v3 22/30 ARM: tegra: use fixed PCI i/o mapping
Quoted 6 lines · Rob Herring
From: Rob Herring <[email protected]>
Signed-off-by Rob Herring <[email protected]>Cc Colin Cross <[email protected]>Cc Olof Johansson <[email protected]>Acked-by Stephen Warren <[email protected]>
Quoted 8 lines
--- 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>
PATCH v3 23/30 ARM: integrator: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- 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
arch/arm/Kconfig +0 -1
@@ -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.
arch/arm/mach-integrator/include/mach/io.h deleted +0 -33
@@ -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
arch/arm/mach-integrator/include/mach/platform.h +4 -0
@@ -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 * ------------------------------------------------------------------------
arch/arm/mach-integrator/integrator_ap.c +4 -7
@@ -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 ; }
Signature · 1 line
1.7.5.4
PATCH v3 24/30 ARM: shark: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- 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
arch/arm/Kconfig +0 -1
@@ -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>).
arch/arm/mach-shark/core.c +2 -12
@@ -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
arch/arm/mach-shark/include/mach/debug-macro.S +4 -3
@@ -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
arch/arm/mach-shark/include/mach/entry-macro.S +2 -1
@@ -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
arch/arm/mach-shark/include/mach/io.h deleted +0 -18
@@ -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
Signature · 1 line
1.7.5.4
PATCH v3 25/30 ARM: footbridge: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- arch/arm/Kconfig | 2 +- arch/arm/mach-footbridge/common.c | 12 +++++------- .../arm/mach-footbridge/include/mach/debug-macro.S | 3 ++- arch/arm/mach-footbridge/include/mach/io.h | 12 ++---------- 4 files changed, 10 insertions(+), 19 deletions(-)
arch/arm/Kconfig +1 -1
@@ -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
arch/arm/mach-footbridge/common.c +5 -7
@@ -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)
arch/arm/mach-footbridge/include/mach/debug-macro.S +2 -1
@@ -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
arch/arm/mach-footbridge/include/mach/io.h +2 -10
@@ -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
Signature · 1 line
1.7.5.4
PATCH v3 26/30 ARM: dove: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
The i/o regions are changed from 1MB to 64KB. It's likely that the 2nd bus is not setup correctly.
--- 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
arch/arm/Kconfig +0 -1
@@ -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
arch/arm/mach-dove/common.c +5 -10
@@ -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)); }
arch/arm/mach-dove/include/mach/dove.h +3 -5
@@ -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
arch/arm/mach-dove/include/mach/io.h deleted +0 -19
@@ -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
arch/arm/mach-dove/pcie.c +2 -7
@@ -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" );
Signature · 1 line
1.7.5.4
PATCH v3 26/30 ARM: dove: use fixed PCI i/o mapping
Quoted 4 lines · Rob Herring
From: Rob Herring <[email protected]>
The i/o regions are changed from 1MB to 64KB. It's likely that the 2nd bus is not setup correctly.
[...]
Quoted 8 lines
index ad1165d..50b9046 100644
arch/arm/mach-dove/include/mach/dove.h +0
-1@@ -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
arch/arm/mach-dove/include/mach/dove.h line 58
Quoted 10 lines
arch/arm/mach-dove/include/mach/dove.h +3
-4#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:
Quoted 51 lines
arch/arm/mach-dove/include/mach/dove.h +0
-0/* * Dove Core Registers Map arch/arm/mach-dove/include/mach/io.h deleted +0
-19@@ -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 arch/arm/mach-dove/pcie.c +2
-7@@ -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" );Signature · 1 line
1.7.5.4
PATCH v3 27/30 ARM: kirkwood: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- 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
arch/arm/Kconfig +0 -1
@@ -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:
arch/arm/mach-kirkwood/common.c +9 -12
@@ -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 );
arch/arm/mach-kirkwood/include/mach/io.h deleted +0 -24
@@ -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
arch/arm/mach-kirkwood/include/mach/kirkwood.h +3 -5
@@ -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
arch/arm/mach-kirkwood/pcie.c +4 -4
@@ -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 ;/*
Signature · 1 line
1.7.5.4
PATCH v3 27/30 ARM: kirkwood: use fixed PCI i/o mapping
Quoted 5 lines · Rob Herring
From: Rob Herring <[email protected]>
Signed-off-by Rob Herring <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Nicolas Pitre <[email protected]>
I have no PCI hardware making use of the legacy IO area to test this with. But this looks fine.
Quoted 162 lines
--- 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.harch/arm/Kconfig +0
-1@@ -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:arch/arm/mach-kirkwood/common.c +9
-12@@ -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 );arch/arm/mach-kirkwood/include/mach/io.h deleted +0
-24@@ -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 arch/arm/mach-kirkwood/include/mach/kirkwood.h +3
-5@@ -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 0xfed00000arch/arm/mach-kirkwood/pcie.c +4
-4@@ -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 ;/* Signature · 1 line
1.7.5.4
PATCH v3 28/30 ARM: ixp23xx: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- 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
arch/arm/Kconfig +0 -1
@@ -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.
arch/arm/mach-ixp23xx/core.c +2 -5
@@ -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)); }
arch/arm/mach-ixp23xx/include/mach/io.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* -* arch/arm/mach-ixp23xx/include/mach/io.h -* -* Original Author: Naeem M Afzal <[email protected]> -* Maintainer: Deepak Saxena <[email protected]> -* -* 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
arch/arm/mach-ixp23xx/include/mach/ixp23xx.h +9 -11
@@ -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
arch/arm/mach-ixp23xx/pci.c +1 -1
@@ -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" };
Signature · 1 line
1.7.5.4
PATCH v3 29/30 ARM: iop13xx: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
--- 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
arch/arm/Kconfig +0 -1
@@ -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.
arch/arm/mach-iop13xx/include/mach/io.h deleted +0 -28
@@ -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
arch/arm/mach-iop13xx/include/mach/iop13xx.h +3 -4
@@ -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 +\
arch/arm/mach-iop13xx/setup.c +7 -10
@@ -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)); }
Signature · 1 line
1.7.5.4
PATCH v3 30/30 ARM: orion5x: use fixed PCI i/o mapping
In reply to Rob HerringFrom: Rob Herring <[email protected]>
orion5x i/o handling must have been broken as it had no __io() translation. It may actually work now.
--- arch/arm/mach-orion5x/common.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)
arch/arm/mach-orion5x/common.c +6 -10
@@ -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)); }
Signature · 1 line
1.7.5.4
PATCH v3 30/30 ARM: orion5x: use fixed PCI i/o mapping
Quoted 8 lines · Rob Herring
From: Rob Herring <[email protected]>
orion5x i/o handling must have been broken as it had no
__io()translation. It may actually work now.Signed-off-by Rob Herring <[email protected]>Cc Lennert Buytenhek <[email protected]>Cc Nicolas Pitre <[email protected]>
Quoted 48 lines
--- arch/arm/mach-orion5x/common.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)arch/arm/mach-orion5x/common.c +6
-10@@ -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)); }Signature · 1 line
1.7.5.4