diff options
author | Dan Williams <dan.j.williams@intel.com> | 2007-05-02 12:59:44 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-03 09:02:48 -0400 |
commit | e90ddd813df7897af34226ed1cd442f7a182816e (patch) | |
tree | 1ecf08c0aa9d71d54019fc84876a07898352b641 /arch/arm/mach-iop32x | |
parent | fa543f005de175080640266ca536d45b4b0b1a61 (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-iop32x')
-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 | 3 |
3 files changed, 17 insertions, 5 deletions
diff --git a/arch/arm/mach-iop32x/Kconfig b/arch/arm/mach-iop32x/Kconfig index 9dd49cff21ff..9bb02b6d7ae1 100644 --- a/arch/arm/mach-iop32x/Kconfig +++ b/arch/arm/mach-iop32x/Kconfig | |||
@@ -34,6 +34,14 @@ 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 | |||
37 | endmenu | 45 | endmenu |
38 | 46 | ||
39 | endif | 47 | endif |
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 60e74309a458..7b21c6e13e59 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
@@ -178,9 +178,10 @@ 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 | pci_common_init(&ep80219_pci); | 182 | if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) |
183 | else if (machine_is_iq31244()) { | 183 | pci_common_init(&ep80219_pci); |
184 | } else if (machine_is_iq31244()) { | ||
184 | if (is_80219()) { | 185 | if (is_80219()) { |
185 | printk("note: iq31244 board type has been selected\n"); | 186 | printk("note: iq31244 board type has been selected\n"); |
186 | printk("note: to select ep80219 operation:\n"); | 187 | printk("note: to select ep80219 operation:\n"); |
@@ -189,7 +190,9 @@ static int __init iq31244_pci_init(void) | |||
189 | printk("\t2/ update boot loader to pass" | 190 | printk("\t2/ update boot loader to pass" |
190 | " the ep80219 id: %d\n", MACH_TYPE_EP80219); | 191 | " the ep80219 id: %d\n", MACH_TYPE_EP80219); |
191 | } | 192 | } |
192 | pci_common_init(&iq31244_pci); | 193 | |
194 | if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) | ||
195 | pci_common_init(&iq31244_pci); | ||
193 | } | 196 | } |
194 | 197 | ||
195 | return 0; | 198 | return 0; |
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index 361c70c0f64c..bc25fb91e7b9 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
@@ -113,7 +113,8 @@ static struct hw_pci iq80321_pci __initdata = { | |||
113 | 113 | ||
114 | static int __init iq80321_pci_init(void) | 114 | static int __init iq80321_pci_init(void) |
115 | { | 115 | { |
116 | if (machine_is_iq80321()) | 116 | if ((iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE) && |
117 | machine_is_iq80321()) | ||
117 | pci_common_init(&iq80321_pci); | 118 | pci_common_init(&iq80321_pci); |
118 | 119 | ||
119 | return 0; | 120 | return 0; |