diff options
-rw-r--r-- | include/asm-arm/arch-orion/io.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/asm-arm/arch-orion/io.h b/include/asm-arm/arch-orion/io.h index 42abd297ae5f..486dc04d7643 100644 --- a/include/asm-arm/arch-orion/io.h +++ b/include/asm-arm/arch-orion/io.h | |||
@@ -16,11 +16,37 @@ | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | #define IO_SPACE_REMAP ORION_PCI_SYS_IO_BASE | 17 | #define IO_SPACE_REMAP ORION_PCI_SYS_IO_BASE |
18 | 18 | ||
19 | static inline void __iomem * | ||
20 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | ||
21 | { | ||
22 | void __iomem *retval; | ||
23 | |||
24 | if (mtype == MT_DEVICE && size && paddr >= ORION_REGS_PHYS_BASE && | ||
25 | paddr + size <= ORION_REGS_PHYS_BASE + ORION_REGS_SIZE) { | ||
26 | retval = (void __iomem *)ORION_REGS_VIRT_BASE + | ||
27 | (paddr - ORION_REGS_PHYS_BASE); | ||
28 | } else { | ||
29 | retval = __arm_ioremap(paddr, size, mtype); | ||
30 | } | ||
31 | |||
32 | return retval; | ||
33 | } | ||
34 | |||
35 | static inline void | ||
36 | __arch_iounmap(void __iomem *addr) | ||
37 | { | ||
38 | if (addr < (void __iomem *)ORION_REGS_VIRT_BASE || | ||
39 | addr >= (void __iomem *)(ORION_REGS_VIRT_BASE + ORION_REGS_SIZE)) | ||
40 | __iounmap(addr); | ||
41 | } | ||
42 | |||
19 | static inline void __iomem *__io(unsigned long addr) | 43 | static inline void __iomem *__io(unsigned long addr) |
20 | { | 44 | { |
21 | return (void __iomem *)addr; | 45 | return (void __iomem *)addr; |
22 | } | 46 | } |
23 | 47 | ||
48 | #define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) | ||
49 | #define __arch_iounmap(a) __arch_iounmap(a) | ||
24 | #define __io(a) __io(a) | 50 | #define __io(a) __io(a) |
25 | #define __mem_pci(a) (a) | 51 | #define __mem_pci(a) (a) |
26 | 52 | ||