aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-iop13xx/io.c19
-rw-r--r--include/asm-arm/arch-iop13xx/io.h3
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index fbf9f88e46ea..e79a1b62600f 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -21,6 +21,25 @@
21#include <asm/hardware.h> 21#include <asm/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24void * __iomem __iop13xx_io(unsigned long io_addr)
25{
26 void __iomem * io_virt;
27
28 switch (io_addr) {
29 case IOP13XX_PCIE_LOWER_IO_PA ... IOP13XX_PCIE_UPPER_IO_PA:
30 io_virt = (void *) IOP13XX_PCIE_IO_PHYS_TO_VIRT(io_addr);
31 break;
32 case IOP13XX_PCIX_LOWER_IO_PA ... IOP13XX_PCIX_UPPER_IO_PA:
33 io_virt = (void *) IOP13XX_PCIX_IO_PHYS_TO_VIRT(io_addr);
34 break;
35 default:
36 BUG();
37 }
38
39 return io_virt;
40}
41EXPORT_SYMBOL(__iop13xx_io);
42
24void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size, 43void * __iomem __iop13xx_ioremap(unsigned long cookie, size_t size,
25 unsigned long flags) 44 unsigned long flags)
26{ 45{
diff --git a/include/asm-arm/arch-iop13xx/io.h b/include/asm-arm/arch-iop13xx/io.h
index db6de2480a24..5a7bdb526606 100644
--- a/include/asm-arm/arch-iop13xx/io.h
+++ b/include/asm-arm/arch-iop13xx/io.h
@@ -21,10 +21,11 @@
21 21
22#define IO_SPACE_LIMIT 0xffffffff 22#define IO_SPACE_LIMIT 0xffffffff
23 23
24#define __io(a) (a) 24#define __io(a) __iop13xx_io(a)
25#define __mem_pci(a) (a) 25#define __mem_pci(a) (a)
26#define __mem_isa(a) (a) 26#define __mem_isa(a) (a)
27 27
28extern void __iomem * __iop13xx_io(unsigned long io_addr);
28extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); 29extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
29extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size, 30extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
30 unsigned long flags); 31 unsigned long flags);