diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-10 12:49:16 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-13 17:12:17 +0100 |
commit | c23bfc3835173f5229b2503e3b616001a28affad (patch) | |
tree | 109f74ea29224587bead91289f55f2d30032b615 /arch/arm/mach-integrator | |
parent | daeb4c0c3bf2df72d0cd6e4330bad9e2e520552b (diff) | |
download | linux-3.10-c23bfc3835173f5229b2503e3b616001a28affad.tar.gz linux-3.10-c23bfc3835173f5229b2503e3b616001a28affad.tar.bz2 linux-3.10-c23bfc3835173f5229b2503e3b616001a28affad.zip |
ARM: PCI: provide a default bus scan implementation
Most PCI implementations perform simple root bus scanning. Rather than
having each group of platforms provide a duplicated bus scan function,
provide the PCI configuration ops structure via the hw_pci structure,
and call the root bus scanning function from core ARM PCI code.
Acked-by: Krzysztof HaĆasa <khc@pm.waw.pl>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r-- | arch/arm/mach-integrator/pci.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-integrator/pci_v3.c | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index f304deac8d0..6c1667e728f 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c @@ -98,7 +98,7 @@ static struct hw_pci integrator_pci __initdata = { .map_irq = integrator_map_irq, .setup = pci_v3_setup, .nr_controllers = 1, - .scan = pci_v3_scan_bus, + .ops = &pci_v3_ops, .preinit = pci_v3_preinit, .postinit = pci_v3_postinit, }; diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 67e6f9a9d1a..b866880e82a 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -340,7 +340,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, return PCIBIOS_SUCCESSFUL; } -static struct pci_ops pci_v3_ops = { +struct pci_ops pci_v3_ops = { .read = v3_read_config, .write = v3_write_config, }; @@ -488,12 +488,6 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) return ret; } -struct pci_bus * __init pci_v3_scan_bus(int nr, struct pci_sys_data *sys) -{ - return pci_scan_root_bus(NULL, sys->busnr, &pci_v3_ops, sys, - &sys->resources); -} - /* * V3_LB_BASE? - local bus address * V3_LB_MAP? - pci bus address |