diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-02-29 22:36:27 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-07-26 10:10:02 -0400 |
commit | 5b334eb2a9422f4658f353a550db10b8a6b691f9 (patch) | |
tree | aa22fb56eb8475dbf58bf593ae704663ca343f5d /arch/arm/mach-iop13xx/include/mach | |
parent | 0a4b8c654615be5dd12d67e951446095bef8b565 (diff) |
iop13xx: use more regular PCI I/O space handling
iop13xx confuses I/O port numbers with physical addresses, which breaks
legacy ISA I/O access behind PCI bridges and makes it unnecessarily hard
to unify the inb/outb accessors with other platforms. This removes the
special-casing and just puts all I/O ports into a single 128KB virtually
mapped I/O port range starting at port zero.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-iop13xx/include/mach')
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/io.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/iop13xx.h | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h index f13188518025..e197cb8994ac 100644 --- a/arch/arm/mach-iop13xx/include/mach/io.h +++ b/arch/arm/mach-iop13xx/include/mach/io.h | |||
@@ -19,10 +19,10 @@ | |||
19 | #ifndef __ASM_ARM_ARCH_IO_H | 19 | #ifndef __ASM_ARM_ARCH_IO_H |
20 | #define __ASM_ARM_ARCH_IO_H | 20 | #define __ASM_ARM_ARCH_IO_H |
21 | 21 | ||
22 | #define IO_SPACE_LIMIT 0xffffffff | 22 | #include <mach/iop13xx.h> |
23 | 23 | ||
24 | #define __io(a) __iop13xx_io(a) | 24 | #define IO_SPACE_LIMIT (IOP13XX_PCIE_IO_WINDOW_SIZE + IOP13XX_PCIX_IO_WINDOW_SIZE - 1) |
25 | 25 | ||
26 | extern void __iomem * __iop13xx_io(unsigned long io_addr); | 26 | #define __io(a) (IOP13XX_PCIX_LOWER_IO_VA + ((a) & IO_SPACE_LIMIT)) |
27 | 27 | ||
28 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-iop13xx/include/mach/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h index e190dcd7d72d..d3777dbc2e8b 100644 --- a/arch/arm/mach-iop13xx/include/mach/iop13xx.h +++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h | |||
@@ -69,17 +69,15 @@ extern unsigned long get_iop_tick_rate(void); | |||
69 | * 0x8000.0000 + 928M 0x2.8000.0000 (ioremap) PCIE outbound memory window | 69 | * 0x8000.0000 + 928M 0x2.8000.0000 (ioremap) PCIE outbound memory window |
70 | * | 70 | * |
71 | * IO MAP | 71 | * IO MAP |
72 | * 0x1000 + 64K 0x0.fffb.1000 0xfec6.1000 PCIX outbound i/o window | 72 | * 0x1000 + 64K 0x0.fffb.1000 0xfed6.1000 PCIX outbound i/o window |
73 | * 0x1000 + 64K 0x0.fffd.1000 0xfed7.1000 PCIE outbound i/o window | 73 | * 0x1000 + 64K 0x0.fffd.1000 0xfed7.1000 PCIE outbound i/o window |
74 | */ | 74 | */ |
75 | #define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL | 75 | #define IOP13XX_PCIX_IO_WINDOW_SIZE 0x10000UL |
76 | #define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL | 76 | #define IOP13XX_PCIX_LOWER_IO_PA 0xfffb0000UL |
77 | #define IOP13XX_PCIX_LOWER_IO_VA 0xfec60000UL | 77 | #define IOP13XX_PCIX_LOWER_IO_VA 0xfed60000UL |
78 | #define IOP13XX_PCIX_LOWER_IO_BA 0x0UL /* OIOTVR */ | 78 | #define IOP13XX_PCIX_LOWER_IO_BA 0x0UL /* OIOTVR */ |
79 | #define IOP13XX_PCIX_IO_BUS_OFFSET 0x1000UL | 79 | #define IOP13XX_PCIX_IO_BUS_OFFSET 0x1000UL |
80 | #define IOP13XX_PCIX_UPPER_IO_PA (IOP13XX_PCIX_LOWER_IO_PA +\ | 80 | #define IOP13XX_PCIX_UPPER_IO_BA (IOP13XX_PCIX_LOWER_IO_BA +\ |
81 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) | ||
82 | #define IOP13XX_PCIX_UPPER_IO_VA (IOP13XX_PCIX_LOWER_IO_VA +\ | ||
83 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) | 81 | IOP13XX_PCIX_IO_WINDOW_SIZE - 1) |
84 | #define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | 82 | #define IOP13XX_PCIX_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ |
85 | (IOP13XX_PCIX_LOWER_IO_PA\ | 83 | (IOP13XX_PCIX_LOWER_IO_PA\ |
@@ -108,10 +106,6 @@ extern unsigned long get_iop_tick_rate(void); | |||
108 | #define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL | 106 | #define IOP13XX_PCIE_LOWER_IO_VA 0xfed70000UL |
109 | #define IOP13XX_PCIE_LOWER_IO_BA 0x0UL /* OIOTVR */ | 107 | #define IOP13XX_PCIE_LOWER_IO_BA 0x0UL /* OIOTVR */ |
110 | #define IOP13XX_PCIE_IO_BUS_OFFSET 0x1000UL | 108 | #define IOP13XX_PCIE_IO_BUS_OFFSET 0x1000UL |
111 | #define IOP13XX_PCIE_UPPER_IO_PA (IOP13XX_PCIE_LOWER_IO_PA +\ | ||
112 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | ||
113 | #define IOP13XX_PCIE_UPPER_IO_VA (IOP13XX_PCIE_LOWER_IO_VA +\ | ||
114 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | ||
115 | #define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\ | 109 | #define IOP13XX_PCIE_UPPER_IO_BA (IOP13XX_PCIE_LOWER_IO_BA +\ |
116 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) | 110 | IOP13XX_PCIE_IO_WINDOW_SIZE - 1) |
117 | #define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | 111 | #define IOP13XX_PCIE_IO_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ |