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/plat-iop/pci.c | |
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/plat-iop/pci.c')
-rw-r--r-- | arch/arm/plat-iop/pci.c | 33 |
1 files changed, 27 insertions, 6 deletions
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 | { |