summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp23xx/pci.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-04-01 18:33:35 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-04-01 18:33:35 +0100
commit532bda5d9cd2f94a9e374765c23858c7d8641f66 (patch)
treea87fc82de89a993867d11e328b6b82afb16fe83a /arch/arm/mach-ixp23xx/pci.c
parent50c37e216132d2185a15d5cf6b966adf6ecea535 (diff)
[ARM] 3438/1: ixp23xx: add pci slave support
Patch from Lennert Buytenhek On the Double Espresso board, the IXP2350s are PCI slave devices and we skip calling pci_common_init() as that enumerates the bus. But even though we are a PCI slave device, there is still some PCI-related setup that has to be done. Create ixp23xx_pci_common_init(), move the common initialisation bits there, and have this function called from both the PCI master and the PCI slave init path. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp23xx/pci.c')
-rw-r--r--arch/arm/mach-ixp23xx/pci.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c
index 5330ad78c1b..ba6b4367a1d 100644
--- a/arch/arm/mach-ixp23xx/pci.c
+++ b/arch/arm/mach-ixp23xx/pci.c
@@ -201,7 +201,7 @@ int clear_master_aborts(void)
return 0;
}
-void __init ixp23xx_pci_preinit(void)
+static void __init ixp23xx_pci_common_init(void)
{
#ifdef __ARMEB__
*IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */
@@ -220,6 +220,11 @@ void __init ixp23xx_pci_preinit(void)
} else {
*IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1);
}
+}
+
+void __init ixp23xx_pci_preinit(void)
+{
+ ixp23xx_pci_common_init();
hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS,
"PCI config cycle to non-existent device");
@@ -273,3 +278,8 @@ int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys)
return 1;
}
+
+void ixp23xx_pci_slave_init(void)
+{
+ ixp23xx_pci_common_init();
+}