aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop33x
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2007-05-02 12:59:44 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-03 09:02:48 -0400
commite90ddd813df7897af34226ed1cd442f7a182816e (patch)
tree1ecf08c0aa9d71d54019fc84876a07898352b641 /arch/arm/mach-iop33x
parentfa543f005de175080640266ca536d45b4b0b1a61 (diff)
[ARM] 4348/4: iop3xx: Give Linux control over PCI initialization
Currently the iop3xx platform support code assumes that RedBoot is the bootloader and has already initialized the ATU. Linux should handle this initialization for three reasons: 1/ The memory map that RedBoot sets up is not optimal (page_to_dma and virt_to_phys return different addresses). The effect of this is that using the dma mapping API for the internal bus dma units generates pci bus addresses that are incorrect for the internal bus. 2/ Not all iop platforms use RedBoot 3/ If the ATU is already initialized it indicates that the iop is an add-in card in another host, it does not own the PCI bus, and should not be re-initialized. Changelog: * rather than change nr_controllers to zero, simply do not call pci_common_init Cc: Lennert Buytenhek <kernel@wantstofly.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop33x')
-rw-r--r--arch/arm/mach-iop33x/Kconfig8
-rw-r--r--arch/arm/mach-iop33x/iq80331.c3
-rw-r--r--arch/arm/mach-iop33x/iq80332.c3
3 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-iop33x/Kconfig b/arch/arm/mach-iop33x/Kconfig
index 9aa016bb18f9..45598e096898 100644
--- a/arch/arm/mach-iop33x/Kconfig
+++ b/arch/arm/mach-iop33x/Kconfig
@@ -16,6 +16,14 @@ 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
19config 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
19endmenu 27endmenu
20 28
21endif 29endif
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index 1a9e36138d80..376c932830be 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -96,7 +96,8 @@ static struct hw_pci iq80331_pci __initdata = {
96 96
97static int __init iq80331_pci_init(void) 97static int __init iq80331_pci_init(void)
98{ 98{
99 if (machine_is_iq80331()) 99 if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) &&
100 machine_is_iq80331())
100 pci_common_init(&iq80331_pci); 101 pci_common_init(&iq80331_pci);
101 102
102 return 0; 103 return 0;
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 96d6f0f3cd21..58c81496c6f6 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -96,7 +96,8 @@ static struct hw_pci iq80332_pci __initdata = {
96 96
97static int __init iq80332_pci_init(void) 97static int __init iq80332_pci_init(void)
98{ 98{
99 if (machine_is_iq80332()) 99 if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) &&
100 machine_is_iq80332())
100 pci_common_init(&iq80332_pci); 101 pci_common_init(&iq80332_pci);
101 102
102 return 0; 103 return 0;