Skip to contentSkip to conversation

mach/io.h cleanup and removal

PATCH New Rob Herring 6 participants 67 messages Mar 2, 2012 – Mar 7, 2012

Subsystems (29)
lore
Share & tools
lore
#0 lore raw

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.h
arch/arm/mach-rpc/include/mach/io.h
arch/arm/mach-s3c2410/include/mach/io.h
arch/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_cleanup2
git://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
#1 lore raw

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.

Cc Alan Stern <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
Cc linux-kernel at vger.kernel.org
---
 drivers/usb/host/ohci-pxa27x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/usb/host/ohci-pxa27x.c +1 -0
index 6313e44..4db399c 100644
@@ -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
#2 lore raw

PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap

In reply to 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.

---
 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
index 9275828..9bf9d00 100644
@@ -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
index 80632e8..d164dea 100644
@@ -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
#3 lore raw

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.

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
index 9275828..9bf9d00 100644
@@ -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
index 80632e8..d164dea 100644
@@ -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
#4 lore raw

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_HOOK and let those who need it select it? Or maybe this isn't performance critical and we just don't care? In any case I'd like to see such reasoning captured in the commit log.

It's certainly not performance critical, but there may be some space overhead in the .text section of the kernel that we could avoid by adding another indirection.

Arnd

#5 lore raw

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_HOOK and let those who need it select it? Or maybe this isn't performance critical and we just don't care? In any case I'd like to see such reasoning captured in the commit log.

It's certainly not performance critical, but there may be some space overhead in the .text section of the kernel that we could avoid by adding another indirection.

Of course the size issue can be mitigated significantly by replacing:

extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int); extern void (*arch_iounmap)(volatile void __iomem *);

#define __arch_ioremap arch_ioremap
#define __arch_iounmap arch_iounmap

by:

extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int); extern void (*arch_iounmap)(volatile void __iomem *);

extern void __iomem * __arch_ioremap(unsigned long, size_t, unsigned int); extern void __arch_iounmap(volatile void __iomem *);

and out of line:

void __iomem *__arch_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)

{
	return arch_ioremap(phys_addr, size, mtype);
}

void __arch_iounmap(volatile void __iomem *io_addr)

{
	arch_iounmap(io_addr);
}

Nicolas

#6 lore raw

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
index 9275828..6c363c1 100644
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
 extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
 extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
 extern void __iounmap(volatile void __iomem *addr);
+extern void __arm_iounmap(volatile void __iomem *addr);
+
+extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+	unsigned int, void *);
+extern void (*arch_iounmap)(volatile void __iomem *);
 
 /*
  * Bad read/write accesses...
@@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  */
 #ifndef __arch_ioremap
 #define __arch_ioremap			__arm_ioremap
-#define __arch_iounmap			__iounmap
+#define __arch_iounmap			__arm_iounmap
 #endif
 
 #define ioremap(cookie,size)		__arch_ioremap((cookie), (size), MT_DEVICE)
arch/arm/mm/ioremap.c +16 -0
index 80632e8..c37c67a 100644
@@ -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
#7 lore raw

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
index 8404ee7..04be18d 100644
@@ -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
index a599f01..ca06a68 100644
@@ -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
index 338300b..ea9d95e 100644
@@ -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
#8 lore raw

PATCH v4 3/4 ARM: msm: use runtime ioremap hook

In reply to Rob Herring

From: 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
index a60ab6d..3698a37 100644
@@ -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
index 6b9b227..5414f76 100644
@@ -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
index dc1b928..c6ff9bb 100644
@@ -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
index 8af4612..152b3b7 100644
@@ -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
index 578b04e..a1e7b11 100644
@@ -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
#9 lore raw

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.

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.
#10 lore raw

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.

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

#11 lore raw

PATCH v4 4/4 ARM: iop13xx: use runtime ioremap hook

In reply to Rob Herring

From: 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
index dffb234..2a69fc0 100644
@@ -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
index 48642e6..6dd5b49 100644
@@ -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
index abaee88..5c96b73 100644
@@ -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
index 690916a..aa4dd75 100644
@@ -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
#12 lore raw

PATCH v4 1/4 ARM: provide runtime hook for ioremap/iounmap

In reply to Rob Herring
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. 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.

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 -0
 EXPORT_SYMBOL(__iounmap);
+
+void (*arch_iounmap)(volatile void __iomem *) = __iounmap;
+EXPORT_SYMBOL(arch_iounmap);
+
+void __arm_iounmap(volatile void __iomem *io_addr)
+{
+	arch_iounmap(io_addr);
+}
+EXPORT_SYMBOL(__arm_iounmap);

The EXPORT_SYMBOL() statements for arch_ioremap_caller and arch_iounmap seem to be leftover from a previous version of this patch and can be removed now. Other than that:

#13 lore raw

PATCH v4 1/4 ARM: provide runtime hook for ioremap/iounmap

In reply to Rob Herring
Quoted 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.

---

[...]

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 -0
 void __iomem *
 __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
 {
+	if (arch_ioremap_caller)
+		return arch_ioremap_caller(phys_addr, size, mtype,
+			__builtin_return_address(0));
+
 	return __arm_ioremap_caller(phys_addr, size, mtype,
 			__builtin_return_address(0));

Why not initializing arch_ioremap_caller with __arm_ioremap_caller like the iounmap case? That would remove the need for a runtime test.

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
#14 lore raw

PATCH v3 2/30 ARM: provide runtime hook for ioremap/iounmap

In reply to Nicolas Pitre
Quoted 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_HOOK and let those who need it select it? Or maybe this isn't performance critical and we just don't care? In any case I'd like to see such reasoning captured in the commit log.

It's certainly not performance critical, but there may be some space overhead in the .text section of the kernel that we could avoid by adding another indirection.

Of course the size issue can be mitigated significantly by replacing:

extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int); extern void (*arch_iounmap)(volatile void __iomem *);

#define __arch_ioremap arch_ioremap
#define __arch_iounmap arch_iounmap

by:

extern void __iomem * (*arch_ioremap)(unsigned long, size_t, unsigned int); extern void (*arch_iounmap)(volatile void __iomem *);

extern void __iomem * __arch_ioremap(unsigned long, size_t, unsigned int); extern void __arch_iounmap(volatile void __iomem *);

and out of line:

void __iomem *__arch_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)

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

#15 lore raw

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.h needs.

I think there is. Uniformity is highly valuable.

Nicolas

#16 lore raw

PATCH v5 1/7 ARM: provide runtime hook for ioremap/iounmap

In reply to Nicolas Pitre

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     |   17 ++++++++++++++---
 2 files changed, 20 insertions(+), 4 deletions(-)
arch/arm/include/asm/io.h +6 -1
index 9275828..6c363c1 100644
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
 extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
 extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
 extern void __iounmap(volatile void __iomem *addr);
+extern void __arm_iounmap(volatile void __iomem *addr);
+
+extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+	unsigned int, void *);
+extern void (*arch_iounmap)(volatile void __iomem *);
 
 /*
  * Bad read/write accesses...
@@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  */
 #ifndef __arch_ioremap
 #define __arch_ioremap			__arm_ioremap
-#define __arch_iounmap			__iounmap
+#define __arch_iounmap			__arm_iounmap
 #endif
 
 #define ioremap(cookie,size)		__arch_ioremap((cookie), (size), MT_DEVICE)
arch/arm/mm/ioremap.c +14 -3
index 80632e8..0246290 100644
@@ -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
#17 lore raw

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
index 8404ee7..04be18d 100644
@@ -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
index a599f01..ca06a68 100644
@@ -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
index 338300b..ea9d95e 100644
@@ -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
#18 lore raw

PATCH v5 3/7 ARM: msm: use runtime ioremap hook

In reply to Rob Herring

From: 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
index a60ab6d..3698a37 100644
@@ -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
index 6b9b227..5414f76 100644
@@ -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
index dc1b928..c6ff9bb 100644
@@ -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
index 8af4612..152b3b7 100644
@@ -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
index 578b04e..a1e7b11 100644
@@ -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
#19 lore raw

PATCH v5 4/7 ARM: iop13xx: use runtime ioremap hook

In reply to Rob Herring

From: 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
index dffb234..2a69fc0 100644
@@ -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
index 48642e6..6dd5b49 100644
@@ -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
index abaee88..5c96b73 100644
@@ -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
index 690916a..aa4dd75 100644
@@ -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
#20 lore raw

PATCH v5 5/7 ARM: ixp4xx: use runtime ioremap hook

In reply to Rob Herring

From: Rob Herring <[email protected]>

Convert ixp4xx platforms to use run-time ioremap hook instead of the compile time hook.

Cc Imre Kaloz <[email protected]>
Cc Krzysztof Halasa <[email protected]>
---
 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
index a7277ad..90e42e9 100644
@@ -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_END
 MACHINE_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
index a6329a0..c60e7b8 100644
@@ -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
index a74f86c..1b83110 100644
@@ -110,6 +110,7 @@ static void __init coyote_init(void)
 MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
@@ -129,6 +130,7 @@ MACHINE_END
 MACHINE_START(IXDPG425, "Intel IXDPG425")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
arch/arm/mach-ixp4xx/dsmg600-setup.c +1 -0
index 67be177..97a0af8 100644
@@ -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
index 6d58182..9175a25 100644
@@ -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
index 7ecf9b2..033c717 100644
@@ -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
index c0e3d69..0dda8f6 100644
@@ -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
index a23f893..18ebc6b 100644
@@ -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
index ffb9d6a..6a52076 100644
@@ -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
index df9250b..b66bedc 100644
@@ -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
index 8a38b39..3d742ae 100644
@@ -254,6 +254,7 @@ static void __init ixdp425_init(void)
 MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
@@ -269,6 +270,7 @@ MACHINE_END
 MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
@@ -283,6 +285,7 @@ MACHINE_END
 MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
@@ -297,6 +300,7 @@ MACHINE_END
 MACHINE_START(KIXRP435, "Intel KIXRP435 Reference Platform")
 	/* Maintainer: MontaVista Software, Inc. */
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer		= &ixp4xx_timer,
 	.atag_offset	= 0x100,
arch/arm/mach-ixp4xx/nas100d-setup.c +1 -0
index 1010eb7..33cb095 100644
@@ -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
index aa355c3..e2903fa 100644
@@ -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
index 0940869..158ddb7 100644
@@ -243,6 +243,7 @@ static void __init omixp_init(void)
 MACHINE_START(DEVIXP, "Omicron DEVIXP")
 	.atag_offset    = 0x100,
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer          = &ixp4xx_timer,
 	.init_machine	= omixp_init,
@@ -254,6 +255,7 @@ MACHINE_END
 MACHINE_START(MICCPT, "Omicron MICCPT")
 	.atag_offset    = 0x100,
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer          = &ixp4xx_timer,
 	.init_machine	= omixp_init,
@@ -268,6 +270,7 @@ MACHINE_END
 MACHINE_START(MIC256, "Omicron MIC256")
 	.atag_offset    = 0x100,
 	.map_io		= ixp4xx_map_io,
+	.init_early	= ixp4xx_init_early,
 	.init_irq	= ixp4xx_init_irq,
 	.timer          = &ixp4xx_timer,
 	.init_machine	= omixp_init,
arch/arm/mach-ixp4xx/vulcan-setup.c +1 -0
index 9dec206..2798f43 100644
@@ -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
index 5ac0f0a..a785175 100644
@@ -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
#21 lore raw

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
index a6329a0..c60e7b8 100644
@@ -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...

#22 lore raw

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
index a6329a0..c60e7b8 100644
@@ -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

#23 lore raw

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
index a6329a0..c60e7b8 100644
@@ -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

#24 lore raw

PATCH v5 6/7 ARM: ebsa110: use runtime ioremap hook

In reply to Rob Herring

From: 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
index 804c912..e0b831e 100644
@@ -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
index 44679db..11bb079 100644
@@ -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
#25 lore raw

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.

---
 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
index 804c912..e0b831e 100644
@@ -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

#26 lore raw

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
index 804c912..b049edb 100644
@@ -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
index 44679db..11bb079 100644
@@ -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
#27 lore raw

PATCH v5 7/7 ARM: remove compile time __arch_ioremap/__arch_iounmap

In reply to Rob Herring

From: 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
index 6c363c1..6f7555d 100644
@@ -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
#28 lore raw

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.

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
index 6c363c1..6f7555d 100644
@@ -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
#29 lore raw

PATCH v5 1/7 ARM: provide runtime hook for ioremap/iounmap

In reply to Rob Herring
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. 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.

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
index 9275828..6c363c1 100644
@@ -83,6 +83,11 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns
 extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int);
 extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached);
 extern void __iounmap(volatile void __iomem *addr);
+extern void __arm_iounmap(volatile void __iomem *addr);
+
+extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t,
+	unsigned int, void *);
+extern void (*arch_iounmap)(volatile void __iomem *);
 
 /*
  * Bad read/write accesses...
@@ -266,7 +271,7 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  */
 #ifndef __arch_ioremap
 #define __arch_ioremap			__arm_ioremap
-#define __arch_iounmap			__iounmap
+#define __arch_iounmap			__arm_iounmap
 #endif
 
 #define ioremap(cookie,size)		__arch_ioremap((cookie), (size), MT_DEVICE)
arch/arm/mm/ioremap.c +14 -3
index 80632e8..0246290 100644
@@ -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
#30 lore raw

PATCH v3 3/30 ARM: imx: convert to common runtime ioremap hook

In reply to Rob Herring

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               |    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
index 8404ee7..9db7c8d 100644
@@ -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
index a599f01..ca06a68 100644
@@ -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
index 338300b..ea9d95e 100644
@@ -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
#31 lore raw

PATCH v3 4/30 ARM: msm: use runtime ioremap hook

In reply to Rob Herring

From: 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
index a60ab6d..b6cff3a 100644
@@ -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
index 6b9b227..509d94c 100644
@@ -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
index dc1b928..c6ff9bb 100644
@@ -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
index 8af4612..c355886 100644
@@ -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
index 578b04e..283cdff 100644
@@ -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
#32 lore raw

PATCH v3 5/30 ARM: msm: clean-up mach/io.h

In reply to Rob Herring

From: Rob Herring <[email protected]>

Move msm specifics in mach/io.h to respective msm_iomap-*.h headers.

Cc David Brown <[email protected]>
Cc Daniel Walker <[email protected]>
Cc Bryan Huntsman <[email protected]>
---
 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
index c6ff9bb..1071f98 100644
@@ -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
index 198202c..f944fe6 100644
@@ -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
index 800b557..a1752c0 100644
@@ -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
index 0faa894..da77cc1 100644
@@ -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
index 54e12ca..5aed57d 100644
@@ -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
#33 lore raw

PATCH v3 6/30 ARM: iop13xx: use runtime ioremap hook

In reply to Rob Herring

From: 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
index dffb234..2a69fc0 100644
@@ -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
index 48642e6..d63585e 100644
@@ -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
index abaee88..5c96b73 100644
@@ -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
index 690916a..aa4dd75 100644
@@ -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
#34 lore raw

PATCH v3 7/30 ARM: iop13xx: move io.h externs to pci.h

In reply to Rob Herring

From: 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
index 2a69fc0..058dbfd 100644
@@ -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
index d63585e..70f716f 100644
@@ -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
new file mode 100644
index 0000000..c70cf5b
@@ -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
#35 lore raw

PATCH v3 8/30 ARM: OMAP: Remove remaining includes for mach/io.h

In reply to Rob Herring

From: Tony Lindgren <[email protected]>

These are no longer needed with the recent iomap.h changes.

Cc Tony Lindgren <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>
---
 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
index 68d2679..d0b18b5 100644
@@ -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
index 2ce0b9a..00e9d9e 100644
@@ -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
index 925b12b..9bb978e 100644
@@ -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
index fd22716..4e5b960 100644
@@ -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
#36 lore raw

PATCH v3 9/30 davinci: remove includes of mach/io.h

In reply to Rob Herring

From: Rob Herring <[email protected]>

Remove a few remaining includes of mach/io.h.

Cc Mauro Carvalho Chehab <[email protected]>
---
 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
index d6488b7..bba299d 100644
@@ -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
index 00e80f5..b21ecc8 100644
@@ -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
#37 lore raw

PATCH v3 10/30 ARM: davinci: remove unneeded mach/io.h include

In reply to Rob Herring

From: Rob Herring <[email protected]>

entry-macro.S doesn't actually need mach/io.h, so remove it.

Cc Sekhar Nori <[email protected]>
Cc Kevin Hilman <[email protected]>
---
 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
index e14c0dc..f6e1d33 100644
@@ -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
#38 lore raw

PATCH v3 11/30 ARM: orion5x: clean-up mach/io.h

In reply to Rob Herring

From: Rob Herring <[email protected]>

Move orion5x specific mach/io.h parts into common.h.

Cc Lennert Buytenhek <[email protected]>
Cc Nicolas Pitre <[email protected]>
---
 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
index d2513ac..2e6454c 100644
@@ -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
index e9d9afd..444136d 100644
@@ -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
index 09a045f..a9d2151 100644
@@ -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
index c9abb8f..7189827 100644
@@ -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
#39 lore raw

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.h parts into common.h.

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
index d2513ac..2e6454c 100644
@@ -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
index e9d9afd..444136d 100644
@@ -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
index 09a045f..a9d2151 100644
@@ -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
index c9abb8f..7189827 100644
@@ -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
#40 lore raw

PATCH v3 12/30 ARM: tegra: clean-up mach/io.h

In reply to Rob Herring

From: 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
index 619abc6..e28ce16 100644
@@ -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
index d23ee2d..58b4baf 100644
@@ -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
#41 lore raw

PATCH v3 13/30 ARM: ep93xx: clean-up mach/io.h

In reply to Rob Herring

From: 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
index c4a7b84..e711d0e 100644
@@ -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
index 594b77f..17e76ef 100644
@@ -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
#42 lore raw

PATCH v3 14/30 ARM: at91: add explicit include of hardware.h to uncompressor

In reply to Rob Herring

From: 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
index 0234fd9..4218647 100644
@@ -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
#43 lore raw

PATCH v3 15/30 ARM: dove: add explicit include of dove.h to addr-map.c

In reply to Rob Herring

From: 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
index 98b8c83..2a06c01 100644
@@ -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
#44 lore raw

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 of mach/dove.h

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
index 98b8c83..2a06c01 100644
@@ -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
#45 lore raw

PATCH v3 16/30 ARM: clps711x: remove unneeded include of mach/io.h

In reply to Rob Herring

From: 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
index 7164310..35ed731 100644
@@ -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
#46 lore raw

PATCH v3 17/30 ARM: make mach/io.h include optional

In reply to Rob Herring

From: 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
index 92c9c79..ae016cd 100644
@@ -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
index 9bf9d00..cd8c125 100644
@@ -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
#47 lore raw

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_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 +0 -0
index 92c9c79..ae016cd 100644

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
index 9bf9d00..cd8c125 100644
@@ -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
#48 lore raw

PATCH v3 18/30 ARM: remove bunch of now unused mach/io.h files

In reply to Rob Herring

From: 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
deleted file mode 100644
index 4003001..0000000
@@ -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
deleted file mode 100644
index dae5e9b..0000000
@@ -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
deleted file mode 100644
index 2e0b3ce..0000000
@@ -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
deleted file mode 100644
index 33b6fc1..0000000
@@ -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
deleted file mode 100644
index b2267d1..0000000
@@ -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
deleted file mode 100644
index 17e76ef..0000000
@@ -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
deleted file mode 100644
index d5478d2..0000000
@@ -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
deleted file mode 100644
index c548056..0000000
@@ -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
deleted file mode 100644
index 2c8659c..0000000
@@ -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
deleted file mode 100644
index 70cfa3b..0000000
@@ -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
deleted file mode 100644
index a7a63ac..0000000
@@ -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
deleted file mode 100644
index 9b59ab5..0000000
@@ -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
deleted file mode 100644
index e7adf3d..0000000
@@ -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
deleted file mode 100644
index 1071f98..0000000
@@ -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
deleted file mode 100644
index 289b722..0000000
@@ -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
deleted file mode 100644
index c3921cb..0000000
@@ -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
deleted file mode 100644
index 2e1eca1..0000000
@@ -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
deleted file mode 100644
index 444136d..0000000
@@ -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
deleted file mode 100644
index 7573ec7..0000000
@@ -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
deleted file mode 100644
index cbf0904..0000000
@@ -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
deleted file mode 100644
index 6c31e9e..0000000
@@ -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
deleted file mode 100644
index fdca3be..0000000
@@ -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
deleted file mode 100644
index f05bcdf..0000000
@@ -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
deleted file mode 100644
index de5716d..0000000
@@ -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
deleted file mode 100644
index a3e095c..0000000
@@ -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
deleted file mode 100644
index 819acf5..0000000
@@ -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
deleted file mode 100644
index 5ab9d56..0000000
@@ -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
deleted file mode 100644
index dfc27ff..0000000
@@ -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
deleted file mode 100644
index 7339fe4..0000000
@@ -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
deleted file mode 100644
index 30cff8a..0000000
@@ -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
deleted file mode 100644
index fb7c106..0000000
@@ -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
deleted file mode 100644
index 5d6b4c1..0000000
@@ -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
deleted file mode 100644
index 1cf3f44..0000000
@@ -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
deleted file mode 100644
index f067c14..0000000
@@ -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
deleted file mode 100644
index 13522d8..0000000
@@ -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
deleted file mode 100644
index 46181ee..0000000
@@ -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
deleted file mode 100644
index d96ab99..0000000
@@ -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
deleted file mode 100644
index 39d9885..0000000
@@ -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
deleted file mode 100644
index ea9d95e..0000000
@@ -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
deleted file mode 100644
index 4d4ba82..0000000
@@ -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
#49 lore raw

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
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.h
arch/arm/mach-at91/include/mach/io.h deleted +0 -31
deleted file mode 100644
index 4003001..0000000
@@ -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
deleted file mode 100644
index dae5e9b..0000000
@@ -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
deleted file mode 100644
index 2e0b3ce..0000000
@@ -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
deleted file mode 100644
index 33b6fc1..0000000
@@ -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
deleted file mode 100644
index b2267d1..0000000
@@ -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
deleted file mode 100644
index 17e76ef..0000000
@@ -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
deleted file mode 100644
index d5478d2..0000000
@@ -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
deleted file mode 100644
index c548056..0000000
@@ -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
deleted file mode 100644
index 2c8659c..0000000
@@ -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
deleted file mode 100644
index 70cfa3b..0000000
@@ -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
deleted file mode 100644
index a7a63ac..0000000
@@ -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
deleted file mode 100644
index 9b59ab5..0000000
@@ -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
deleted file mode 100644
index e7adf3d..0000000
@@ -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
deleted file mode 100644
index 1071f98..0000000
@@ -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
deleted file mode 100644
index 289b722..0000000
@@ -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
deleted file mode 100644
index c3921cb..0000000
@@ -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
deleted file mode 100644
index 2e1eca1..0000000
@@ -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
deleted file mode 100644
index 37b12e1..0000000
@@ -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
deleted file mode 100644
index b8758c8..0000000
@@ -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
deleted file mode 100644
index 444136d..0000000
@@ -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
deleted file mode 100644
index 7573ec7..0000000
@@ -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
deleted file mode 100644
index cbf0904..0000000
@@ -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
deleted file mode 100644
index 6c31e9e..0000000
@@ -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
deleted file mode 100644
index fdca3be..0000000
@@ -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
deleted file mode 100644
index f05bcdf..0000000
@@ -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
deleted file mode 100644
index de5716d..0000000
@@ -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
deleted file mode 100644
index a3e095c..0000000
@@ -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
deleted file mode 100644
index 819acf5..0000000
@@ -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
deleted file mode 100644
index 5ab9d56..0000000
@@ -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
deleted file mode 100644
index dfc27ff..0000000
@@ -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
deleted file mode 100644
index 7339fe4..0000000
@@ -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
deleted file mode 100644
index 30cff8a..0000000
@@ -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
deleted file mode 100644
index fb7c106..0000000
@@ -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
deleted file mode 100644
index 5d6b4c1..0000000
@@ -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
deleted file mode 100644
index 1cf3f44..0000000
@@ -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
deleted file mode 100644
index f067c14..0000000
@@ -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
deleted file mode 100644
index 13522d8..0000000
@@ -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
deleted file mode 100644
index 46181ee..0000000
@@ -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
deleted file mode 100644
index d96ab99..0000000
@@ -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
deleted file mode 100644
index 39d9885..0000000
@@ -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
deleted file mode 100644
index ea9d95e..0000000
@@ -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
deleted file mode 100644
index 4d4ba82..0000000
@@ -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
#50 lore raw

PATCH v3 19/30 ARM: kill off __mem_pci

In reply to Rob Herring

From: 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.

Cc Russell King <[email protected]>
Cc Lennert Buytenhek <[email protected]>
Cc Imre Kaloz <[email protected]>
Cc Krzysztof Halasa <[email protected]>
Cc Nicolas Pitre <[email protected]>
Cc Ben Dooks <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Colin Cross <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Stephen Warren <[email protected]>
---
 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
index cd8c125..d7861b9 100644
@@ -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
index eb4936f..29c8b85 100644
@@ -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
index 15a7039..aba531ee 100644
@@ -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
index 37beed3..8de70de 100644
@@ -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
index 058dbfd..f131885 100644
@@ -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
index 2d88264..e2ada26 100644
@@ -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
index a8a66fc..f7c1b65 100644
@@ -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
index 859e584..f6552d6 100644
@@ -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
index 4ce4353..a7aceb5 100644
@@ -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
index ffb9d6a..d76a9bb 100644
@@ -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
index 49dd0cb..5d0ab61 100644
@@ -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
index 450e0e1..c7d9d00 100644
@@ -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
index 695f4ed..707071a 100644
@@ -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
index 118749f..5dd1db4 100644
@@ -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
index 9ccbcec..1a45fc0 100644
@@ -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
index 47b4b61..fe700f9 100644
@@ -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
#51 lore raw

PATCH v3 20/30 iop13xx: use more regular PCI I/O space handling

In reply to Rob Herring

From: 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
index f131885..e197cb8 100644
@@ -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
index 07e9ff7..ee1dfd2 100644
@@ -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
index 70f716f..e0ecb38 100644
@@ -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
index b8f5a87..d72eddf 100644
@@ -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
#52 lore raw

PATCH v3 21/30 ARM: Add fixed PCI i/o mapping

In reply to 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).

---
 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
index d7861b9..5a01930 100644
@@ -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
index d943b7d..6d326d7 100644
@@ -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
index f58ba35..199f383 100644
@@ -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
#53 lore raw

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

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
index d7861b9..5a01930 100644
@@ -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
index d943b7d..6d326d7 100644
@@ -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
index f58ba35..199f383 100644
@@ -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
#54 lore raw

PATCH v3 22/30 ARM: tegra: use fixed PCI i/o mapping

In reply to Rob Herring

From: 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
index ae016cd..c98861f2 100644
@@ -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
index 082b4d1..e2b700a 100644
@@ -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
index 58b4baf..7a29e10 100644
@@ -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
#55 lore raw

PATCH v3 22/30 ARM: tegra: use fixed PCI i/o mapping

Quoted 6 lines · Rob Herring

From: Rob Herring <[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>

#56 lore raw

PATCH v3 23/30 ARM: integrator: use fixed PCI i/o mapping

In reply to Rob Herring

From: 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
index c98861f2..682c5d8 100644
@@ -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
deleted file mode 100644
index 8de70de..0000000
@@ -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
index ec467ba..4c03475 100644
@@ -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
index 21a1d6c..410e6b1 100644
@@ -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
#57 lore raw

PATCH v3 24/30 ARM: shark: use fixed PCI i/o mapping

In reply to Rob Herring

From: 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
index 682c5d8..b14bf3c 100644
@@ -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
index 6a2a7f2..da12ad0 100644
@@ -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
index 20eb2bf..b08ef9d 100644
@@ -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
index 0bb6cc6..3ff46fc 100644
@@ -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
deleted file mode 100644
index 1a45fc0..0000000
@@ -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
#58 lore raw

PATCH v3 25/30 ARM: footbridge: use fixed PCI i/o mapping

In reply to Rob Herring

From: 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
index b14bf3c..f2c6727 100644
@@ -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
index 41978ee..5c3c7a7 100644
@@ -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
index e5acde2..87c75c8 100644
@@ -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
index aba531ee..aba4638 100644
@@ -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
#59 lore raw

PATCH v3 26/30 ARM: dove: use fixed PCI i/o mapping

In reply to 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.

---
 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
index f2c6727..24fe29e 100644
@@ -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
index dd1429a..a062ba6 100644
@@ -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
index ad1165d..50b9046 100644
@@ -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
deleted file mode 100644
index 29c8b85..0000000
@@ -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
index 52e96d3..0a741bd 100644
@@ -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
#60 lore raw

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
deleted file mode 100644
index 29c8b85..0000000
@@ -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
index 52e96d3..0a741bd 100644
@@ -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
#61 lore raw

PATCH v3 27/30 ARM: kirkwood: use fixed PCI i/o mapping

In reply to Rob Herring

From: Rob Herring <[email protected]>

Cc Lennert Buytenhek <[email protected]>
Cc Nicolas Pitre <[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
index 24fe29e..50e68b6 100644
@@ -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
index cc15426..db4caa3 100644
@@ -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
deleted file mode 100644
index 5d0ab61..0000000
@@ -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
index fede3d5..63565fb 100644
@@ -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
index a066a6d..11f557e 100644
@@ -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
#62 lore raw

PATCH v3 27/30 ARM: kirkwood: use fixed PCI i/o mapping

Quoted 5 lines · Rob Herring

From: 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.h
arch/arm/Kconfig +0 -1
index 24fe29e..50e68b6 100644
@@ -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
index cc15426..db4caa3 100644
@@ -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
deleted file mode 100644
index 5d0ab61..0000000
@@ -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
index fede3d5..63565fb 100644
@@ -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
index a066a6d..11f557e 100644
@@ -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
#63 lore raw

PATCH v3 28/30 ARM: ixp23xx: use fixed PCI i/o mapping

In reply to Rob Herring

From: Rob Herring <[email protected]>

Cc Lennert Buytenhek <[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
index 50e68b6..73a86c7 100644
@@ -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
index 7c1495e..38cbb99 100644
@@ -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
deleted file mode 100644
index a7aceb5..0000000
@@ -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
index 6d02481..93309d7 100644
@@ -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
index 25b5c46..f6f9b89 100644
@@ -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
#64 lore raw

PATCH v3 29/30 ARM: iop13xx: use fixed PCI i/o mapping

In reply to Rob Herring

From: 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
index 73a86c7..10c99f9 100644
@@ -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
deleted file mode 100644
index e197cb8..0000000
@@ -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
index ee1dfd2..8153ed2 100644
@@ -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
index daabb1f..9038626 100644
@@ -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
#65 lore raw

PATCH v3 30/30 ARM: orion5x: use fixed PCI i/o mapping

In reply to 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.

Cc Lennert Buytenhek <[email protected]>
Cc Nicolas Pitre <[email protected]>
---
 arch/arm/mach-orion5x/common.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)
arch/arm/mach-orion5x/common.c +6 -10
index 0e28bae..9bab4cb 100644
@@ -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
#66 lore raw

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.

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
index 0e28bae..9bab4cb 100644
@@ -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