diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-03-26 22:12:38 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-03-26 15:33:41 -0400 |
commit | c34002c102880bfac5b449b41e5313dcda186db8 (patch) | |
tree | b868da85842d52df7f0ceeef243b7dae7671f645 /arch/arm | |
parent | 97c46048ce73c27fd2734299f07a8c06c8156a2e (diff) |
iop: unconditionally initialize the ATU on platforms known to be 'hosts'
Platforms like iq80321 and iq80331 which may be host-bus-adapters
require 'iop3xx_init_atu=y' to be specified on the kernel command line.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-iop32x/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-iop32x/iq31244.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-iop32x/iq80321.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/iq80331.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/iq80332.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-iop/pci.c | 33 |
7 files changed, 34 insertions, 32 deletions
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig index dbe07c9472ed..5e8c6f7dfabb 100644 --- a/arch/arm/mach-iop32x/Kconfig +++ b/arch/arm/mach-iop32x/Kconfig | |||
@@ -34,14 +34,6 @@ config MACH_N2100 | |||
34 | Say Y here if you want to run your kernel on the Thecus n2100 | 34 | Say Y here if you want to run your kernel on the Thecus n2100 |
35 | NAS appliance. | 35 | NAS appliance. |
36 | 36 | ||
37 | config IOP3XX_ATU | ||
38 | bool "Enable the PCI Controller" | ||
39 | default y | ||
40 | help | ||
41 | Say Y here if you want the IOP to initialize its PCI Controller. | ||
42 | Say N if the IOP is an add in card, the host system owns the PCI | ||
43 | bus in this case. | ||
44 | |||
45 | config MACH_EM7210 | 37 | config MACH_EM7210 |
46 | bool "Enable support for the Lanner EM7210" | 38 | bool "Enable support for the Lanner EM7210" |
47 | help | 39 | help |
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 98cfa1cd6bdb..4a89823bcebb 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
@@ -178,10 +178,9 @@ static struct hw_pci iq31244_pci __initdata = { | |||
178 | 178 | ||
179 | static int __init iq31244_pci_init(void) | 179 | static int __init iq31244_pci_init(void) |
180 | { | 180 | { |
181 | if (is_ep80219()) { | 181 | if (is_ep80219()) |
182 | if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) | 182 | pci_common_init(&ep80219_pci); |
183 | pci_common_init(&ep80219_pci); | 183 | else if (machine_is_iq31244()) { |
184 | } else if (machine_is_iq31244()) { | ||
185 | if (is_80219()) { | 184 | if (is_80219()) { |
186 | printk("note: iq31244 board type has been selected\n"); | 185 | printk("note: iq31244 board type has been selected\n"); |
187 | printk("note: to select ep80219 operation:\n"); | 186 | printk("note: to select ep80219 operation:\n"); |
@@ -190,9 +189,7 @@ static int __init iq31244_pci_init(void) | |||
190 | printk("\t2/ update boot loader to pass" | 189 | printk("\t2/ update boot loader to pass" |
191 | " the ep80219 id: %d\n", MACH_TYPE_EP80219); | 190 | " the ep80219 id: %d\n", MACH_TYPE_EP80219); |
192 | } | 191 | } |
193 | 192 | pci_common_init(&iq31244_pci); | |
194 | if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) | ||
195 | pci_common_init(&iq31244_pci); | ||
196 | } | 193 | } |
197 | 194 | ||
198 | return 0; | 195 | return 0; |
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index 18ad29f213b2..1da3c911edd3 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
@@ -106,7 +106,7 @@ static struct hw_pci iq80321_pci __initdata = { | |||
106 | .swizzle = pci_std_swizzle, | 106 | .swizzle = pci_std_swizzle, |
107 | .nr_controllers = 1, | 107 | .nr_controllers = 1, |
108 | .setup = iop3xx_pci_setup, | 108 | .setup = iop3xx_pci_setup, |
109 | .preinit = iop3xx_pci_preinit, | 109 | .preinit = iop3xx_pci_preinit_cond, |
110 | .scan = iop3xx_pci_scan_bus, | 110 | .scan = iop3xx_pci_scan_bus, |
111 | .map_irq = iq80321_pci_map_irq, | 111 | .map_irq = iq80321_pci_map_irq, |
112 | }; | 112 | }; |
diff --git a/arch/arm/mach-iop33x/Kconfig b/arch/arm/mach-iop33x/Kconfig index 45598e096898..9aa016bb18f9 100644 --- a/arch/arm/mach-iop33x/Kconfig +++ b/arch/arm/mach-iop33x/Kconfig | |||
@@ -16,14 +16,6 @@ config MACH_IQ80332 | |||
16 | Say Y here if you want to run your kernel on the Intel IQ80332 | 16 | Say Y here if you want to run your kernel on the Intel IQ80332 |
17 | evaluation kit for the IOP332 chipset. | 17 | evaluation kit for the IOP332 chipset. |
18 | 18 | ||
19 | config IOP3XX_ATU | ||
20 | bool "Enable the PCI Controller" | ||
21 | default y | ||
22 | help | ||
23 | Say Y here if you want the IOP to initialize its PCI Controller. | ||
24 | Say N if the IOP is an add in card, the host system owns the PCI | ||
25 | bus in this case. | ||
26 | |||
27 | endmenu | 19 | endmenu |
28 | 20 | ||
29 | endif | 21 | endif |
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index 433188ebff2a..de39fd778579 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c | |||
@@ -89,7 +89,7 @@ static struct hw_pci iq80331_pci __initdata = { | |||
89 | .swizzle = pci_std_swizzle, | 89 | .swizzle = pci_std_swizzle, |
90 | .nr_controllers = 1, | 90 | .nr_controllers = 1, |
91 | .setup = iop3xx_pci_setup, | 91 | .setup = iop3xx_pci_setup, |
92 | .preinit = iop3xx_pci_preinit, | 92 | .preinit = iop3xx_pci_preinit_cond, |
93 | .scan = iop3xx_pci_scan_bus, | 93 | .scan = iop3xx_pci_scan_bus, |
94 | .map_irq = iq80331_pci_map_irq, | 94 | .map_irq = iq80331_pci_map_irq, |
95 | }; | 95 | }; |
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index 416c09564cc6..4904fd78445f 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c | |||
@@ -89,7 +89,7 @@ static struct hw_pci iq80332_pci __initdata = { | |||
89 | .swizzle = pci_std_swizzle, | 89 | .swizzle = pci_std_swizzle, |
90 | .nr_controllers = 1, | 90 | .nr_controllers = 1, |
91 | .setup = iop3xx_pci_setup, | 91 | .setup = iop3xx_pci_setup, |
92 | .preinit = iop3xx_pci_preinit, | 92 | .preinit = iop3xx_pci_preinit_cond, |
93 | .scan = iop3xx_pci_scan_bus, | 93 | .scan = iop3xx_pci_scan_bus, |
94 | .map_irq = iq80332_pci_map_irq, | 94 | .map_irq = iq80332_pci_map_irq, |
95 | }; | 95 | }; |
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 6ed374fa4087..d9bc15a69e5d 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
25 | #include <asm/mach/pci.h> | 25 | #include <asm/mach/pci.h> |
26 | #include <asm/hardware/iop3xx.h> | 26 | #include <asm/hardware/iop3xx.h> |
27 | #include <asm/mach-types.h> | ||
27 | 28 | ||
28 | // #define DEBUG | 29 | // #define DEBUG |
29 | 30 | ||
@@ -325,13 +326,16 @@ void __init iop3xx_atu_disable(void) | |||
325 | /* Flag to determine whether the ATU is initialized and the PCI bus scanned */ | 326 | /* Flag to determine whether the ATU is initialized and the PCI bus scanned */ |
326 | int init_atu; | 327 | int init_atu; |
327 | 328 | ||
328 | void __init iop3xx_pci_preinit(void) | 329 | int iop3xx_get_init_atu(void) { |
329 | { | 330 | /* check if default has been overridden */ |
330 | if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) { | 331 | if (init_atu != IOP3XX_INIT_ATU_DEFAULT) |
331 | iop3xx_atu_disable(); | 332 | return init_atu; |
332 | iop3xx_atu_setup(); | 333 | else |
333 | } | 334 | return IOP3XX_INIT_ATU_DISABLE; |
335 | } | ||
334 | 336 | ||
337 | static void __init iop3xx_atu_debug(void) | ||
338 | { | ||
335 | DBG("PCI: Intel IOP3xx PCI init.\n"); | 339 | DBG("PCI: Intel IOP3xx PCI init.\n"); |
336 | DBG("PCI: Outbound memory window 0: PCI 0x%08x%08x\n", | 340 | DBG("PCI: Outbound memory window 0: PCI 0x%08x%08x\n", |
337 | *IOP3XX_OUMWTVR0, *IOP3XX_OMWTVR0); | 341 | *IOP3XX_OUMWTVR0, *IOP3XX_OMWTVR0); |
@@ -358,6 +362,23 @@ void __init iop3xx_pci_preinit(void) | |||
358 | hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort"); | 362 | hook_fault_code(16+6, iop3xx_pci_abort, SIGBUS, "imprecise external abort"); |
359 | } | 363 | } |
360 | 364 | ||
365 | /* for platforms that might be host-bus-adapters */ | ||
366 | void __init iop3xx_pci_preinit_cond(void) | ||
367 | { | ||
368 | if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) { | ||
369 | iop3xx_atu_disable(); | ||
370 | iop3xx_atu_setup(); | ||
371 | iop3xx_atu_debug(); | ||
372 | } | ||
373 | } | ||
374 | |||
375 | void __init iop3xx_pci_preinit(void) | ||
376 | { | ||
377 | iop3xx_atu_disable(); | ||
378 | iop3xx_atu_setup(); | ||
379 | iop3xx_atu_debug(); | ||
380 | } | ||
381 | |||
361 | /* allow init_atu to be user overridden */ | 382 | /* allow init_atu to be user overridden */ |
362 | static int __init iop3xx_init_atu_setup(char *str) | 383 | static int __init iop3xx_init_atu_setup(char *str) |
363 | { | 384 | { |