diff options
Diffstat (limited to 'arch/arm/mach-orion')
-rw-r--r-- | arch/arm/mach-orion/addr-map.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-orion/common.c | 84 | ||||
-rw-r--r-- | arch/arm/mach-orion/common.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-orion/db88f5281-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-orion/dns323-setup.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-orion/kurobox_pro-setup.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-orion/pci.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-orion/rd88f5182-setup.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-orion/ts209-setup.c | 20 |
9 files changed, 126 insertions, 56 deletions
diff --git a/arch/arm/mach-orion/addr-map.c b/arch/arm/mach-orion/addr-map.c index 488da3811a68..2e2fd63643c3 100644 --- a/arch/arm/mach-orion/addr-map.c +++ b/arch/arm/mach-orion/addr-map.c | |||
@@ -265,15 +265,15 @@ void __init orion_setup_cpu_wins(void) | |||
265 | } | 265 | } |
266 | 266 | ||
267 | /* | 267 | /* |
268 | * Setup windows for PCI+PCIE IO+MAM space | 268 | * Setup windows for PCI+PCIe IO+MEM space. |
269 | */ | 269 | */ |
270 | orion_setup_cpu_win(ORION_PCIE_IO, ORION_PCIE_IO_BASE, | 270 | orion_setup_cpu_win(ORION_PCIE_IO, ORION_PCIE_IO_PHYS_BASE, |
271 | ORION_PCIE_IO_SIZE, ORION_PCIE_IO_REMAP); | 271 | ORION_PCIE_IO_SIZE, ORION_PCIE_IO_BUS_BASE); |
272 | orion_setup_cpu_win(ORION_PCI_IO, ORION_PCI_IO_BASE, | 272 | orion_setup_cpu_win(ORION_PCI_IO, ORION_PCI_IO_PHYS_BASE, |
273 | ORION_PCI_IO_SIZE, ORION_PCI_IO_REMAP); | 273 | ORION_PCI_IO_SIZE, ORION_PCI_IO_BUS_BASE); |
274 | orion_setup_cpu_win(ORION_PCIE_MEM, ORION_PCIE_MEM_BASE, | 274 | orion_setup_cpu_win(ORION_PCIE_MEM, ORION_PCIE_MEM_PHYS_BASE, |
275 | ORION_PCIE_MEM_SIZE, -1); | 275 | ORION_PCIE_MEM_SIZE, -1); |
276 | orion_setup_cpu_win(ORION_PCI_MEM, ORION_PCI_MEM_BASE, | 276 | orion_setup_cpu_win(ORION_PCI_MEM, ORION_PCI_MEM_PHYS_BASE, |
277 | ORION_PCI_MEM_SIZE, -1); | 277 | ORION_PCI_MEM_SIZE, -1); |
278 | } | 278 | } |
279 | 279 | ||
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c index 5e20b6b32508..5f0ee4b8a9b7 100644 --- a/arch/arm/mach-orion/common.c +++ b/arch/arm/mach-orion/common.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/timex.h> | 20 | #include <asm/timex.h> |
21 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
22 | #include <asm/arch/orion.h> | 22 | #include <asm/arch/hardware.h> |
23 | #include "common.h" | 23 | #include "common.h" |
24 | 24 | ||
25 | /***************************************************************************** | 25 | /***************************************************************************** |
@@ -27,26 +27,26 @@ | |||
27 | ****************************************************************************/ | 27 | ****************************************************************************/ |
28 | static struct map_desc orion_io_desc[] __initdata = { | 28 | static struct map_desc orion_io_desc[] __initdata = { |
29 | { | 29 | { |
30 | .virtual = ORION_REGS_BASE, | 30 | .virtual = ORION_REGS_VIRT_BASE, |
31 | .pfn = __phys_to_pfn(ORION_REGS_BASE), | 31 | .pfn = __phys_to_pfn(ORION_REGS_PHYS_BASE), |
32 | .length = ORION_REGS_SIZE, | 32 | .length = ORION_REGS_SIZE, |
33 | .type = MT_DEVICE | 33 | .type = MT_DEVICE |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | .virtual = ORION_PCIE_IO_BASE, | 36 | .virtual = ORION_PCIE_IO_VIRT_BASE, |
37 | .pfn = __phys_to_pfn(ORION_PCIE_IO_BASE), | 37 | .pfn = __phys_to_pfn(ORION_PCIE_IO_PHYS_BASE), |
38 | .length = ORION_PCIE_IO_SIZE, | 38 | .length = ORION_PCIE_IO_SIZE, |
39 | .type = MT_DEVICE | 39 | .type = MT_DEVICE |
40 | }, | 40 | }, |
41 | { | 41 | { |
42 | .virtual = ORION_PCI_IO_BASE, | 42 | .virtual = ORION_PCI_IO_VIRT_BASE, |
43 | .pfn = __phys_to_pfn(ORION_PCI_IO_BASE), | 43 | .pfn = __phys_to_pfn(ORION_PCI_IO_PHYS_BASE), |
44 | .length = ORION_PCI_IO_SIZE, | 44 | .length = ORION_PCI_IO_SIZE, |
45 | .type = MT_DEVICE | 45 | .type = MT_DEVICE |
46 | }, | 46 | }, |
47 | { | 47 | { |
48 | .virtual = ORION_PCIE_WA_BASE, | 48 | .virtual = ORION_PCIE_WA_VIRT_BASE, |
49 | .pfn = __phys_to_pfn(ORION_PCIE_WA_BASE), | 49 | .pfn = __phys_to_pfn(ORION_PCIE_WA_PHYS_BASE), |
50 | .length = ORION_PCIE_WA_SIZE, | 50 | .length = ORION_PCIE_WA_SIZE, |
51 | .type = MT_DEVICE | 51 | .type = MT_DEVICE |
52 | }, | 52 | }, |
@@ -63,8 +63,8 @@ void __init orion_map_io(void) | |||
63 | 63 | ||
64 | static struct resource orion_uart_resources[] = { | 64 | static struct resource orion_uart_resources[] = { |
65 | { | 65 | { |
66 | .start = UART0_BASE, | 66 | .start = UART0_PHYS_BASE, |
67 | .end = UART0_BASE + 0xff, | 67 | .end = UART0_PHYS_BASE + 0xff, |
68 | .flags = IORESOURCE_MEM, | 68 | .flags = IORESOURCE_MEM, |
69 | }, | 69 | }, |
70 | { | 70 | { |
@@ -73,8 +73,8 @@ static struct resource orion_uart_resources[] = { | |||
73 | .flags = IORESOURCE_IRQ, | 73 | .flags = IORESOURCE_IRQ, |
74 | }, | 74 | }, |
75 | { | 75 | { |
76 | .start = UART1_BASE, | 76 | .start = UART1_PHYS_BASE, |
77 | .end = UART1_BASE + 0xff, | 77 | .end = UART1_PHYS_BASE + 0xff, |
78 | .flags = IORESOURCE_MEM, | 78 | .flags = IORESOURCE_MEM, |
79 | }, | 79 | }, |
80 | { | 80 | { |
@@ -86,8 +86,8 @@ static struct resource orion_uart_resources[] = { | |||
86 | 86 | ||
87 | static struct plat_serial8250_port orion_uart_data[] = { | 87 | static struct plat_serial8250_port orion_uart_data[] = { |
88 | { | 88 | { |
89 | .mapbase = UART0_BASE, | 89 | .mapbase = UART0_PHYS_BASE, |
90 | .membase = (char *)UART0_BASE, | 90 | .membase = (char *)UART0_VIRT_BASE, |
91 | .irq = IRQ_ORION_UART0, | 91 | .irq = IRQ_ORION_UART0, |
92 | .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, | 92 | .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, |
93 | .iotype = UPIO_MEM, | 93 | .iotype = UPIO_MEM, |
@@ -95,8 +95,8 @@ static struct plat_serial8250_port orion_uart_data[] = { | |||
95 | .uartclk = ORION_TCLK, | 95 | .uartclk = ORION_TCLK, |
96 | }, | 96 | }, |
97 | { | 97 | { |
98 | .mapbase = UART1_BASE, | 98 | .mapbase = UART1_PHYS_BASE, |
99 | .membase = (char *)UART1_BASE, | 99 | .membase = (char *)UART1_VIRT_BASE, |
100 | .irq = IRQ_ORION_UART1, | 100 | .irq = IRQ_ORION_UART1, |
101 | .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, | 101 | .flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF, |
102 | .iotype = UPIO_MEM, | 102 | .iotype = UPIO_MEM, |
@@ -122,8 +122,8 @@ static struct platform_device orion_uart = { | |||
122 | 122 | ||
123 | static struct resource orion_ehci0_resources[] = { | 123 | static struct resource orion_ehci0_resources[] = { |
124 | { | 124 | { |
125 | .start = ORION_USB0_REG_BASE, | 125 | .start = ORION_USB0_PHYS_BASE, |
126 | .end = ORION_USB0_REG_BASE + SZ_4K, | 126 | .end = ORION_USB0_PHYS_BASE + SZ_4K, |
127 | .flags = IORESOURCE_MEM, | 127 | .flags = IORESOURCE_MEM, |
128 | }, | 128 | }, |
129 | { | 129 | { |
@@ -135,8 +135,8 @@ static struct resource orion_ehci0_resources[] = { | |||
135 | 135 | ||
136 | static struct resource orion_ehci1_resources[] = { | 136 | static struct resource orion_ehci1_resources[] = { |
137 | { | 137 | { |
138 | .start = ORION_USB1_REG_BASE, | 138 | .start = ORION_USB1_PHYS_BASE, |
139 | .end = ORION_USB1_REG_BASE + SZ_4K, | 139 | .end = ORION_USB1_PHYS_BASE + SZ_4K, |
140 | .flags = IORESOURCE_MEM, | 140 | .flags = IORESOURCE_MEM, |
141 | }, | 141 | }, |
142 | { | 142 | { |
@@ -177,8 +177,8 @@ static struct platform_device orion_ehci1 = { | |||
177 | 177 | ||
178 | static struct resource orion_eth_shared_resources[] = { | 178 | static struct resource orion_eth_shared_resources[] = { |
179 | { | 179 | { |
180 | .start = ORION_ETH_REG_BASE, | 180 | .start = ORION_ETH_PHYS_BASE, |
181 | .end = ORION_ETH_REG_BASE + 0xffff, | 181 | .end = ORION_ETH_PHYS_BASE + 0xffff, |
182 | .flags = IORESOURCE_MEM, | 182 | .flags = IORESOURCE_MEM, |
183 | }, | 183 | }, |
184 | }; | 184 | }; |
@@ -227,8 +227,8 @@ static struct mv64xxx_i2c_pdata orion_i2c_pdata = { | |||
227 | static struct resource orion_i2c_resources[] = { | 227 | static struct resource orion_i2c_resources[] = { |
228 | { | 228 | { |
229 | .name = "i2c base", | 229 | .name = "i2c base", |
230 | .start = I2C_BASE, | 230 | .start = I2C_PHYS_BASE, |
231 | .end = I2C_BASE + 0x20 -1, | 231 | .end = I2C_PHYS_BASE + 0x20 -1, |
232 | .flags = IORESOURCE_MEM, | 232 | .flags = IORESOURCE_MEM, |
233 | }, | 233 | }, |
234 | { | 234 | { |
@@ -250,6 +250,40 @@ static struct platform_device orion_i2c = { | |||
250 | }; | 250 | }; |
251 | 251 | ||
252 | /***************************************************************************** | 252 | /***************************************************************************** |
253 | * Sata port | ||
254 | ****************************************************************************/ | ||
255 | static struct resource orion_sata_resources[] = { | ||
256 | { | ||
257 | .name = "sata base", | ||
258 | .start = ORION_SATA_PHYS_BASE, | ||
259 | .end = ORION_SATA_PHYS_BASE + 0x5000 - 1, | ||
260 | .flags = IORESOURCE_MEM, | ||
261 | }, | ||
262 | { | ||
263 | .name = "sata irq", | ||
264 | .start = IRQ_ORION_SATA, | ||
265 | .end = IRQ_ORION_SATA, | ||
266 | .flags = IORESOURCE_IRQ, | ||
267 | }, | ||
268 | }; | ||
269 | |||
270 | static struct platform_device orion_sata = { | ||
271 | .name = "sata_mv", | ||
272 | .id = 0, | ||
273 | .dev = { | ||
274 | .coherent_dma_mask = 0xffffffff, | ||
275 | }, | ||
276 | .num_resources = ARRAY_SIZE(orion_sata_resources), | ||
277 | .resource = orion_sata_resources, | ||
278 | }; | ||
279 | |||
280 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data) | ||
281 | { | ||
282 | orion_sata.dev.platform_data = sata_data; | ||
283 | platform_device_register(&orion_sata); | ||
284 | } | ||
285 | |||
286 | /***************************************************************************** | ||
253 | * General | 287 | * General |
254 | ****************************************************************************/ | 288 | ****************************************************************************/ |
255 | 289 | ||
diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h index 06c10c06f03e..10154ec885df 100644 --- a/arch/arm/mach-orion/common.h +++ b/arch/arm/mach-orion/common.h | |||
@@ -75,4 +75,12 @@ struct mv643xx_eth_platform_data; | |||
75 | 75 | ||
76 | void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data); | 76 | void __init orion_eth_init(struct mv643xx_eth_platform_data *eth_data); |
77 | 77 | ||
78 | /* | ||
79 | * Orion Sata platform_data, used by machine-setup | ||
80 | */ | ||
81 | |||
82 | struct mv_sata_platform_data; | ||
83 | |||
84 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data); | ||
85 | |||
78 | #endif /* __ARCH_ORION_COMMON_H__ */ | 86 | #endif /* __ARCH_ORION_COMMON_H__ */ |
diff --git a/arch/arm/mach-orion/db88f5281-setup.c b/arch/arm/mach-orion/db88f5281-setup.c index cb2a95ce5b57..5ef44e1a2d36 100644 --- a/arch/arm/mach-orion/db88f5281-setup.c +++ b/arch/arm/mach-orion/db88f5281-setup.c | |||
@@ -354,8 +354,8 @@ static void __init db88f5281_init(void) | |||
354 | 354 | ||
355 | MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") | 355 | MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") |
356 | /* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */ | 356 | /* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */ |
357 | .phys_io = ORION_REGS_BASE, | 357 | .phys_io = ORION_REGS_PHYS_BASE, |
358 | .io_pg_offst = ((ORION_REGS_BASE) >> 18) & 0xfffc, | 358 | .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xfffc, |
359 | .boot_params = 0x00000100, | 359 | .boot_params = 0x00000100, |
360 | .init_machine = db88f5281_init, | 360 | .init_machine = db88f5281_init, |
361 | .map_io = orion_map_io, | 361 | .map_io = orion_map_io, |
diff --git a/arch/arm/mach-orion/dns323-setup.c b/arch/arm/mach-orion/dns323-setup.c index c8a806f249c6..02b280c24820 100644 --- a/arch/arm/mach-orion/dns323-setup.c +++ b/arch/arm/mach-orion/dns323-setup.c | |||
@@ -259,8 +259,8 @@ static void __init dns323_init(void) | |||
259 | * | 259 | * |
260 | * Open a special address decode windows for the PCIE WA. | 260 | * Open a special address decode windows for the PCIE WA. |
261 | */ | 261 | */ |
262 | orion_write(ORION_REGS_BASE | 0x20074, ORION_PCIE_WA_BASE); | 262 | orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); |
263 | orion_write(ORION_REGS_BASE | 0x20070, | 263 | orion_write(ORION_REGS_VIRT_BASE | 0x20070, |
264 | (0x7941 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); | 264 | (0x7941 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); |
265 | 265 | ||
266 | /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */ | 266 | /* set MPP to 0 as D-Link's 2.6.12.6 kernel did */ |
@@ -312,8 +312,8 @@ static void __init dns323_init(void) | |||
312 | /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */ | 312 | /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */ |
313 | MACHINE_START(DNS323, "D-Link DNS-323") | 313 | MACHINE_START(DNS323, "D-Link DNS-323") |
314 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ | 314 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ |
315 | .phys_io = ORION_REGS_BASE, | 315 | .phys_io = ORION_REGS_PHYS_BASE, |
316 | .io_pg_offst = ((ORION_REGS_BASE) >> 18) & 0xFFFC, | 316 | .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, |
317 | .boot_params = 0x00000100, | 317 | .boot_params = 0x00000100, |
318 | .init_machine = dns323_init, | 318 | .init_machine = dns323_init, |
319 | .map_io = orion_map_io, | 319 | .map_io = orion_map_io, |
diff --git a/arch/arm/mach-orion/kurobox_pro-setup.c b/arch/arm/mach-orion/kurobox_pro-setup.c index 2d812ed6b5c7..6817aca4aa26 100644 --- a/arch/arm/mach-orion/kurobox_pro-setup.c +++ b/arch/arm/mach-orion/kurobox_pro-setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mtd/nand.h> | 17 | #include <linux/mtd/nand.h> |
18 | #include <linux/mv643xx_eth.h> | 18 | #include <linux/mv643xx_eth.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/ata_platform.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/gpio.h> | 22 | #include <asm/gpio.h> |
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
@@ -167,6 +168,13 @@ static struct i2c_board_info __initdata kurobox_pro_i2c_rtc = { | |||
167 | }; | 168 | }; |
168 | 169 | ||
169 | /***************************************************************************** | 170 | /***************************************************************************** |
171 | * SATA | ||
172 | ****************************************************************************/ | ||
173 | static struct mv_sata_platform_data kurobox_pro_sata_data = { | ||
174 | .n_ports = 2, | ||
175 | }; | ||
176 | |||
177 | /***************************************************************************** | ||
170 | * General Setup | 178 | * General Setup |
171 | ****************************************************************************/ | 179 | ****************************************************************************/ |
172 | 180 | ||
@@ -192,8 +200,8 @@ static void __init kurobox_pro_init(void) | |||
192 | /* | 200 | /* |
193 | * Open a special address decode windows for the PCIE WA. | 201 | * Open a special address decode windows for the PCIE WA. |
194 | */ | 202 | */ |
195 | orion_write(ORION_REGS_BASE | 0x20074, ORION_PCIE_WA_BASE); | 203 | orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); |
196 | orion_write(ORION_REGS_BASE | 0x20070, (0x7941 | | 204 | orion_write(ORION_REGS_VIRT_BASE | 0x20070, (0x7941 | |
197 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); | 205 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); |
198 | 206 | ||
199 | /* | 207 | /* |
@@ -220,12 +228,13 @@ static void __init kurobox_pro_init(void) | |||
220 | platform_add_devices(kurobox_pro_devices, ARRAY_SIZE(kurobox_pro_devices)); | 228 | platform_add_devices(kurobox_pro_devices, ARRAY_SIZE(kurobox_pro_devices)); |
221 | i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); | 229 | i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); |
222 | orion_eth_init(&kurobox_pro_eth_data); | 230 | orion_eth_init(&kurobox_pro_eth_data); |
231 | orion_sata_init(&kurobox_pro_sata_data); | ||
223 | } | 232 | } |
224 | 233 | ||
225 | MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") | 234 | MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") |
226 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ | 235 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ |
227 | .phys_io = ORION_REGS_BASE, | 236 | .phys_io = ORION_REGS_PHYS_BASE, |
228 | .io_pg_offst = ((ORION_REGS_BASE) >> 18) & 0xFFFC, | 237 | .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, |
229 | .boot_params = 0x00000100, | 238 | .boot_params = 0x00000100, |
230 | .init_machine = kurobox_pro_init, | 239 | .init_machine = kurobox_pro_init, |
231 | .map_io = orion_map_io, | 240 | .map_io = orion_map_io, |
diff --git a/arch/arm/mach-orion/pci.c b/arch/arm/mach-orion/pci.c index 0498d7c69b30..b109bb46681e 100644 --- a/arch/arm/mach-orion/pci.c +++ b/arch/arm/mach-orion/pci.c | |||
@@ -156,7 +156,7 @@ static int orion_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
156 | orion_pcie_id(&dev, &rev); | 156 | orion_pcie_id(&dev, &rev); |
157 | if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) { | 157 | if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) { |
158 | /* extended register space */ | 158 | /* extended register space */ |
159 | pcie_addr = ORION_PCIE_WA_BASE; | 159 | pcie_addr = ORION_PCIE_WA_VIRT_BASE; |
160 | pcie_addr |= PCIE_CONF_BUS(bus->number) | | 160 | pcie_addr |= PCIE_CONF_BUS(bus->number) | |
161 | PCIE_CONF_DEV(PCI_SLOT(devfn)) | | 161 | PCIE_CONF_DEV(PCI_SLOT(devfn)) | |
162 | PCIE_CONF_FUNC(PCI_FUNC(devfn)) | | 162 | PCIE_CONF_FUNC(PCI_FUNC(devfn)) | |
@@ -241,7 +241,7 @@ static int orion_pcie_setup(struct pci_sys_data *sys) | |||
241 | */ | 241 | */ |
242 | res[0].name = "PCI-EX I/O Space"; | 242 | res[0].name = "PCI-EX I/O Space"; |
243 | res[0].flags = IORESOURCE_IO; | 243 | res[0].flags = IORESOURCE_IO; |
244 | res[0].start = ORION_PCIE_IO_REMAP; | 244 | res[0].start = ORION_PCIE_IO_BUS_BASE; |
245 | res[0].end = res[0].start + ORION_PCIE_IO_SIZE - 1; | 245 | res[0].end = res[0].start + ORION_PCIE_IO_SIZE - 1; |
246 | if (request_resource(&ioport_resource, &res[0])) | 246 | if (request_resource(&ioport_resource, &res[0])) |
247 | panic("Request PCIE IO resource failed\n"); | 247 | panic("Request PCIE IO resource failed\n"); |
@@ -252,7 +252,7 @@ static int orion_pcie_setup(struct pci_sys_data *sys) | |||
252 | */ | 252 | */ |
253 | res[1].name = "PCI-EX Memory Space"; | 253 | res[1].name = "PCI-EX Memory Space"; |
254 | res[1].flags = IORESOURCE_MEM; | 254 | res[1].flags = IORESOURCE_MEM; |
255 | res[1].start = ORION_PCIE_MEM_BASE; | 255 | res[1].start = ORION_PCIE_MEM_PHYS_BASE; |
256 | res[1].end = res[1].start + ORION_PCIE_MEM_SIZE - 1; | 256 | res[1].end = res[1].start + ORION_PCIE_MEM_SIZE - 1; |
257 | if (request_resource(&iomem_resource, &res[1])) | 257 | if (request_resource(&iomem_resource, &res[1])) |
258 | panic("Request PCIE Memory resource failed\n"); | 258 | panic("Request PCIE Memory resource failed\n"); |
@@ -477,7 +477,7 @@ static int orion_pci_setup(struct pci_sys_data *sys) | |||
477 | */ | 477 | */ |
478 | res[0].name = "PCI I/O Space"; | 478 | res[0].name = "PCI I/O Space"; |
479 | res[0].flags = IORESOURCE_IO; | 479 | res[0].flags = IORESOURCE_IO; |
480 | res[0].start = ORION_PCI_IO_REMAP; | 480 | res[0].start = ORION_PCI_IO_BUS_BASE; |
481 | res[0].end = res[0].start + ORION_PCI_IO_SIZE - 1; | 481 | res[0].end = res[0].start + ORION_PCI_IO_SIZE - 1; |
482 | if (request_resource(&ioport_resource, &res[0])) | 482 | if (request_resource(&ioport_resource, &res[0])) |
483 | panic("Request PCI IO resource failed\n"); | 483 | panic("Request PCI IO resource failed\n"); |
@@ -488,7 +488,7 @@ static int orion_pci_setup(struct pci_sys_data *sys) | |||
488 | */ | 488 | */ |
489 | res[1].name = "PCI Memory Space"; | 489 | res[1].name = "PCI Memory Space"; |
490 | res[1].flags = IORESOURCE_MEM; | 490 | res[1].flags = IORESOURCE_MEM; |
491 | res[1].start = ORION_PCI_MEM_BASE; | 491 | res[1].start = ORION_PCI_MEM_PHYS_BASE; |
492 | res[1].end = res[1].start + ORION_PCI_MEM_SIZE - 1; | 492 | res[1].end = res[1].start + ORION_PCI_MEM_SIZE - 1; |
493 | if (request_resource(&iomem_resource, &res[1])) | 493 | if (request_resource(&iomem_resource, &res[1])) |
494 | panic("Request PCI Memory resource failed\n"); | 494 | panic("Request PCI Memory resource failed\n"); |
diff --git a/arch/arm/mach-orion/rd88f5182-setup.c b/arch/arm/mach-orion/rd88f5182-setup.c index 026d74325d01..e851b8ca5ac6 100644 --- a/arch/arm/mach-orion/rd88f5182-setup.c +++ b/arch/arm/mach-orion/rd88f5182-setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/mtd/physmap.h> | 18 | #include <linux/mtd/physmap.h> |
19 | #include <linux/mv643xx_eth.h> | 19 | #include <linux/mv643xx_eth.h> |
20 | #include <linux/ata_platform.h> | ||
20 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/gpio.h> | 23 | #include <asm/gpio.h> |
@@ -230,6 +231,13 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = { | |||
230 | }; | 231 | }; |
231 | 232 | ||
232 | /***************************************************************************** | 233 | /***************************************************************************** |
234 | * Sata | ||
235 | ****************************************************************************/ | ||
236 | static struct mv_sata_platform_data rd88f5182_sata_data = { | ||
237 | .n_ports = 2, | ||
238 | }; | ||
239 | |||
240 | /***************************************************************************** | ||
233 | * General Setup | 241 | * General Setup |
234 | ****************************************************************************/ | 242 | ****************************************************************************/ |
235 | 243 | ||
@@ -255,8 +263,8 @@ static void __init rd88f5182_init(void) | |||
255 | /* | 263 | /* |
256 | * Open a special address decode windows for the PCIE WA. | 264 | * Open a special address decode windows for the PCIE WA. |
257 | */ | 265 | */ |
258 | orion_write(ORION_REGS_BASE | 0x20074, ORION_PCIE_WA_BASE); | 266 | orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); |
259 | orion_write(ORION_REGS_BASE | 0x20070, (0x7941 | | 267 | orion_write(ORION_REGS_VIRT_BASE | 0x20070, (0x7941 | |
260 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); | 268 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); |
261 | 269 | ||
262 | /* | 270 | /* |
@@ -292,12 +300,13 @@ static void __init rd88f5182_init(void) | |||
292 | platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); | 300 | platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); |
293 | i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); | 301 | i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); |
294 | orion_eth_init(&rd88f5182_eth_data); | 302 | orion_eth_init(&rd88f5182_eth_data); |
303 | orion_sata_init(&rd88f5182_sata_data); | ||
295 | } | 304 | } |
296 | 305 | ||
297 | MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") | 306 | MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") |
298 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ | 307 | /* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */ |
299 | .phys_io = ORION_REGS_BASE, | 308 | .phys_io = ORION_REGS_PHYS_BASE, |
300 | .io_pg_offst = ((ORION_REGS_BASE) >> 18) & 0xFFFC, | 309 | .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, |
301 | .boot_params = 0x00000100, | 310 | .boot_params = 0x00000100, |
302 | .init_machine = rd88f5182_init, | 311 | .init_machine = rd88f5182_init, |
303 | .map_io = orion_map_io, | 312 | .map_io = orion_map_io, |
diff --git a/arch/arm/mach-orion/ts209-setup.c b/arch/arm/mach-orion/ts209-setup.c index e3e930efd155..306dbcd1e37b 100644 --- a/arch/arm/mach-orion/ts209-setup.c +++ b/arch/arm/mach-orion/ts209-setup.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/serial_reg.h> | 23 | #include <linux/serial_reg.h> |
24 | #include <linux/ata_platform.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/gpio.h> | 26 | #include <asm/gpio.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -232,6 +233,14 @@ static struct platform_device qnap_ts209_button_device = { | |||
232 | }; | 233 | }; |
233 | 234 | ||
234 | /***************************************************************************** | 235 | /***************************************************************************** |
236 | * SATA | ||
237 | ****************************************************************************/ | ||
238 | static struct mv_sata_platform_data qnap_ts209_sata_data = { | ||
239 | .n_ports = 2, | ||
240 | }; | ||
241 | |||
242 | /***************************************************************************** | ||
243 | |||
235 | * General Setup | 244 | * General Setup |
236 | ****************************************************************************/ | 245 | ****************************************************************************/ |
237 | 246 | ||
@@ -244,7 +253,7 @@ static struct platform_device *qnap_ts209_devices[] __initdata = { | |||
244 | * QNAP TS-[12]09 specific power off method via UART1-attached PIC | 253 | * QNAP TS-[12]09 specific power off method via UART1-attached PIC |
245 | */ | 254 | */ |
246 | 255 | ||
247 | #define UART1_REG(x) (UART1_BASE + ((UART_##x) << 2)) | 256 | #define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2)) |
248 | 257 | ||
249 | static void qnap_ts209_power_off(void) | 258 | static void qnap_ts209_power_off(void) |
250 | { | 259 | { |
@@ -282,8 +291,8 @@ static void __init qnap_ts209_init(void) | |||
282 | /* | 291 | /* |
283 | * Open a special address decode windows for the PCIE WA. | 292 | * Open a special address decode windows for the PCIE WA. |
284 | */ | 293 | */ |
285 | orion_write(ORION_REGS_BASE | 0x20074, ORION_PCIE_WA_BASE); | 294 | orion_write(ORION_REGS_VIRT_BASE | 0x20074, ORION_PCIE_WA_PHYS_BASE); |
286 | orion_write(ORION_REGS_BASE | 0x20070, (0x7941 | | 295 | orion_write(ORION_REGS_VIRT_BASE | 0x20070, (0x7941 | |
287 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); | 296 | (((ORION_PCIE_WA_SIZE >> 16) - 1)) << 16)); |
288 | 297 | ||
289 | /* | 298 | /* |
@@ -321,12 +330,13 @@ static void __init qnap_ts209_init(void) | |||
321 | ARRAY_SIZE(qnap_ts209_devices)); | 330 | ARRAY_SIZE(qnap_ts209_devices)); |
322 | i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); | 331 | i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); |
323 | orion_eth_init(&qnap_ts209_eth_data); | 332 | orion_eth_init(&qnap_ts209_eth_data); |
333 | orion_sata_init(&qnap_ts209_sata_data); | ||
324 | } | 334 | } |
325 | 335 | ||
326 | MACHINE_START(TS209, "QNAP TS-109/TS-209") | 336 | MACHINE_START(TS209, "QNAP TS-109/TS-209") |
327 | /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ | 337 | /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ |
328 | .phys_io = ORION_REGS_BASE, | 338 | .phys_io = ORION_REGS_PHYS_BASE, |
329 | .io_pg_offst = ((ORION_REGS_BASE) >> 18) & 0xFFFC, | 339 | .io_pg_offst = ((ORION_REGS_VIRT_BASE) >> 18) & 0xFFFC, |
330 | .boot_params = 0x00000100, | 340 | .boot_params = 0x00000100, |
331 | .init_machine = qnap_ts209_init, | 341 | .init_machine = qnap_ts209_init, |
332 | .map_io = orion_map_io, | 342 | .map_io = orion_map_io, |