aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop32x/iq31244.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2007-05-02 17:59:44 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-03 14:02:48 +0100
commite90ddd813df7897af34226ed1cd442f7a182816e (patch)
tree1ecf08c0aa9d71d54019fc84876a07898352b641 /arch/arm/mach-iop32x/iq31244.c
parentfa543f005de175080640266ca536d45b4b0b1a61 (diff)
downloadkernel_samsung_smdk4412-e90ddd813df7897af34226ed1cd442f7a182816e.zip
kernel_samsung_smdk4412-e90ddd813df7897af34226ed1cd442f7a182816e.tar.gz
kernel_samsung_smdk4412-e90ddd813df7897af34226ed1cd442f7a182816e.tar.bz2
[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/iq31244.c')
-rw-r--r--arch/arm/mach-iop32x/iq31244.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 60e7430..7b21c6e 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 = {
static int __init iq31244_pci_init(void)
{
- if (is_ep80219())
- pci_common_init(&ep80219_pci);
- else if (machine_is_iq31244()) {
+ if (is_ep80219()) {
+ if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE)
+ pci_common_init(&ep80219_pci);
+ } else if (machine_is_iq31244()) {
if (is_80219()) {
printk("note: iq31244 board type has been selected\n");
printk("note: to select ep80219 operation:\n");
@@ -189,7 +190,9 @@ static int __init iq31244_pci_init(void)
printk("\t2/ update boot loader to pass"
" the ep80219 id: %d\n", MACH_TYPE_EP80219);
}
- pci_common_init(&iq31244_pci);
+
+ if (iop3xx_get_init_atu() == IOP3XX_INIT_ATU_ENABLE)
+ pci_common_init(&iq31244_pci);
}
return 0;