diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/io.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/kirkwood.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/pcie.c | 44 |
5 files changed, 16 insertions, 71 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ed930adf58a1..8a742445972e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -547,7 +547,6 @@ config ARCH_KIRKWOOD | |||
547 | select PCI | 547 | select PCI |
548 | select ARCH_REQUIRE_GPIOLIB | 548 | select ARCH_REQUIRE_GPIOLIB |
549 | select GENERIC_CLOCKEVENTS | 549 | select GENERIC_CLOCKEVENTS |
550 | select NEED_MACH_IO_H | ||
551 | select PLAT_ORION | 550 | select PLAT_ORION |
552 | help | 551 | help |
553 | Support for the following Marvell Kirkwood series SoCs: | 552 | Support for the following Marvell Kirkwood series SoCs: |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index f261cd242643..55e4d7937964 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -41,16 +41,6 @@ | |||
41 | ****************************************************************************/ | 41 | ****************************************************************************/ |
42 | static struct map_desc kirkwood_io_desc[] __initdata = { | 42 | static struct map_desc kirkwood_io_desc[] __initdata = { |
43 | { | 43 | { |
44 | .virtual = KIRKWOOD_PCIE_IO_VIRT_BASE, | ||
45 | .pfn = __phys_to_pfn(KIRKWOOD_PCIE_IO_PHYS_BASE), | ||
46 | .length = KIRKWOOD_PCIE_IO_SIZE, | ||
47 | .type = MT_DEVICE, | ||
48 | }, { | ||
49 | .virtual = KIRKWOOD_PCIE1_IO_VIRT_BASE, | ||
50 | .pfn = __phys_to_pfn(KIRKWOOD_PCIE1_IO_PHYS_BASE), | ||
51 | .length = KIRKWOOD_PCIE1_IO_SIZE, | ||
52 | .type = MT_DEVICE, | ||
53 | }, { | ||
54 | .virtual = KIRKWOOD_REGS_VIRT_BASE, | 44 | .virtual = KIRKWOOD_REGS_VIRT_BASE, |
55 | .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE), | 45 | .pfn = __phys_to_pfn(KIRKWOOD_REGS_PHYS_BASE), |
56 | .length = KIRKWOOD_REGS_SIZE, | 46 | .length = KIRKWOOD_REGS_SIZE, |
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h deleted file mode 100644 index 5d0ab61700d2..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/io.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-kirkwood/include/mach/io.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IO_H | ||
10 | #define __ASM_ARCH_IO_H | ||
11 | |||
12 | #include "kirkwood.h" | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | |||
16 | static inline void __iomem *__io(unsigned long addr) | ||
17 | { | ||
18 | return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_BUS_BASE) | ||
19 | + KIRKWOOD_PCIE_IO_VIRT_BASE); | ||
20 | } | ||
21 | |||
22 | #define __io(a) __io(a) | ||
23 | |||
24 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h index c5b68510776b..af4f0000dcef 100644 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h | |||
@@ -37,14 +37,12 @@ | |||
37 | #define KIRKWOOD_NAND_MEM_SIZE SZ_1K | 37 | #define KIRKWOOD_NAND_MEM_SIZE SZ_1K |
38 | 38 | ||
39 | #define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000 | 39 | #define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000 |
40 | #define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000 | 40 | #define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00010000 |
41 | #define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00100000 | 41 | #define KIRKWOOD_PCIE1_IO_SIZE SZ_64K |
42 | #define KIRKWOOD_PCIE1_IO_SIZE SZ_1M | ||
43 | 42 | ||
44 | #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 | 43 | #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 |
45 | #define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfee00000 | ||
46 | #define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000 | 44 | #define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000 |
47 | #define KIRKWOOD_PCIE_IO_SIZE SZ_1M | 45 | #define KIRKWOOD_PCIE_IO_SIZE SZ_64K |
48 | 46 | ||
49 | #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000 | 47 | #define KIRKWOOD_REGS_PHYS_BASE 0xf1000000 |
50 | #define KIRKWOOD_REGS_VIRT_BASE 0xfed00000 | 48 | #define KIRKWOOD_REGS_VIRT_BASE 0xfed00000 |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index 6e8b2efa3c35..532d8acb38f9 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -56,7 +56,7 @@ struct pcie_port { | |||
56 | void __iomem *base; | 56 | void __iomem *base; |
57 | spinlock_t conf_lock; | 57 | spinlock_t conf_lock; |
58 | int irq; | 58 | int irq; |
59 | struct resource res[2]; | 59 | struct resource res; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static int pcie_port_map[2]; | 62 | static int pcie_port_map[2]; |
@@ -137,20 +137,12 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp) | |||
137 | pp->irq = IRQ_KIRKWOOD_PCIE; | 137 | pp->irq = IRQ_KIRKWOOD_PCIE; |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * IORESOURCE_IO | ||
141 | */ | ||
142 | pp->res[0].name = "PCIe 0 I/O Space"; | ||
143 | pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE; | ||
144 | pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1; | ||
145 | pp->res[0].flags = IORESOURCE_IO; | ||
146 | |||
147 | /* | ||
148 | * IORESOURCE_MEM | 140 | * IORESOURCE_MEM |
149 | */ | 141 | */ |
150 | pp->res[1].name = "PCIe 0 MEM"; | 142 | pp->res.name = "PCIe 0 MEM"; |
151 | pp->res[1].start = KIRKWOOD_PCIE_MEM_PHYS_BASE; | 143 | pp->res.start = KIRKWOOD_PCIE_MEM_PHYS_BASE; |
152 | pp->res[1].end = pp->res[1].start + KIRKWOOD_PCIE_MEM_SIZE - 1; | 144 | pp->res.end = pp->res.start + KIRKWOOD_PCIE_MEM_SIZE - 1; |
153 | pp->res[1].flags = IORESOURCE_MEM; | 145 | pp->res.flags = IORESOURCE_MEM; |
154 | } | 146 | } |
155 | 147 | ||
156 | static void __init pcie1_ioresources_init(struct pcie_port *pp) | 148 | static void __init pcie1_ioresources_init(struct pcie_port *pp) |
@@ -159,20 +151,12 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp) | |||
159 | pp->irq = IRQ_KIRKWOOD_PCIE1; | 151 | pp->irq = IRQ_KIRKWOOD_PCIE1; |
160 | 152 | ||
161 | /* | 153 | /* |
162 | * IORESOURCE_IO | ||
163 | */ | ||
164 | pp->res[0].name = "PCIe 1 I/O Space"; | ||
165 | pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE; | ||
166 | pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1; | ||
167 | pp->res[0].flags = IORESOURCE_IO; | ||
168 | |||
169 | /* | ||
170 | * IORESOURCE_MEM | 154 | * IORESOURCE_MEM |
171 | */ | 155 | */ |
172 | pp->res[1].name = "PCIe 1 MEM"; | 156 | pp->res.name = "PCIe 1 MEM"; |
173 | pp->res[1].start = KIRKWOOD_PCIE1_MEM_PHYS_BASE; | 157 | pp->res.start = KIRKWOOD_PCIE1_MEM_PHYS_BASE; |
174 | pp->res[1].end = pp->res[1].start + KIRKWOOD_PCIE1_MEM_SIZE - 1; | 158 | pp->res.end = pp->res.start + KIRKWOOD_PCIE1_MEM_SIZE - 1; |
175 | pp->res[1].flags = IORESOURCE_MEM; | 159 | pp->res.flags = IORESOURCE_MEM; |
176 | } | 160 | } |
177 | 161 | ||
178 | static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | 162 | static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) |
@@ -197,23 +181,21 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys) | |||
197 | case 0: | 181 | case 0: |
198 | kirkwood_enable_pcie_clk("0"); | 182 | kirkwood_enable_pcie_clk("0"); |
199 | pcie0_ioresources_init(pp); | 183 | pcie0_ioresources_init(pp); |
184 | pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE_IO_PHYS_BASE); | ||
200 | break; | 185 | break; |
201 | case 1: | 186 | case 1: |
202 | kirkwood_enable_pcie_clk("1"); | 187 | kirkwood_enable_pcie_clk("1"); |
203 | pcie1_ioresources_init(pp); | 188 | pcie1_ioresources_init(pp); |
189 | pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE1_IO_PHYS_BASE); | ||
204 | break; | 190 | break; |
205 | default: | 191 | default: |
206 | panic("PCIe setup: invalid controller %d", index); | 192 | panic("PCIe setup: invalid controller %d", index); |
207 | } | 193 | } |
208 | 194 | ||
209 | if (request_resource(&ioport_resource, &pp->res[0])) | 195 | if (request_resource(&iomem_resource, &pp->res)) |
210 | panic("Request PCIe%d IO resource failed\n", index); | ||
211 | if (request_resource(&iomem_resource, &pp->res[1])) | ||
212 | panic("Request PCIe%d Memory resource failed\n", index); | 196 | panic("Request PCIe%d Memory resource failed\n", index); |
213 | 197 | ||
214 | sys->io_offset = 0; | 198 | pci_add_resource_offset(&sys->resources, &pp->res, sys->mem_offset); |
215 | pci_add_resource_offset(&sys->resources, &pp->res[0], sys->io_offset); | ||
216 | pci_add_resource_offset(&sys->resources, &pp->res[1], sys->mem_offset); | ||
217 | 199 | ||
218 | /* | 200 | /* |
219 | * Generic PCIe unit setup. | 201 | * Generic PCIe unit setup. |