aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-footbridge
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-03-10 07:49:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-05-13 12:12:17 -0400
commitc23bfc3835173f5229b2503e3b616001a28affad (patch)
tree109f74ea29224587bead91289f55f2d30032b615 /arch/arm/mach-footbridge
parentdaeb4c0c3bf2df72d0cd6e4330bad9e2e520552b (diff)
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-footbridge')
-rw-r--r--arch/arm/mach-footbridge/cats-pci.c2
-rw-r--r--arch/arm/mach-footbridge/dc21285.c7
-rw-r--r--arch/arm/mach-footbridge/ebsa285-pci.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-pci.c2
-rw-r--r--arch/arm/mach-footbridge/personal-pci.c2
5 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c
index dc13c873ff53..5cec2567c9c5 100644
--- a/arch/arm/mach-footbridge/cats-pci.c
+++ b/arch/arm/mach-footbridge/cats-pci.c
@@ -47,8 +47,8 @@ static struct hw_pci cats_pci __initdata = {
47 .swizzle = cats_no_swizzle, 47 .swizzle = cats_no_swizzle,
48 .map_irq = cats_map_irq, 48 .map_irq = cats_map_irq,
49 .nr_controllers = 1, 49 .nr_controllers = 1,
50 .ops = &dc21285_ops,
50 .setup = dc21285_setup, 51 .setup = dc21285_setup,
51 .scan = dc21285_scan_bus,
52 .preinit = dc21285_preinit, 52 .preinit = dc21285_preinit,
53 .postinit = dc21285_postinit, 53 .postinit = dc21285_postinit,
54}; 54};
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index e17e11de4f5e..9d62e3381024 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -129,7 +129,7 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where,
129 return PCIBIOS_SUCCESSFUL; 129 return PCIBIOS_SUCCESSFUL;
130} 130}
131 131
132static struct pci_ops dc21285_ops = { 132struct pci_ops dc21285_ops = {
133 .read = dc21285_read_config, 133 .read = dc21285_read_config,
134 .write = dc21285_write_config, 134 .write = dc21285_write_config,
135}; 135};
@@ -284,11 +284,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
284 return 1; 284 return 1;
285} 285}
286 286
287struct pci_bus * __init dc21285_scan_bus(int nr, struct pci_sys_data *sys)
288{
289 return pci_scan_root_bus(NULL, 0, &dc21285_ops, sys, &sys->resources);
290}
291
292#define dc21285_request_irq(_a, _b, _c, _d, _e) \ 287#define dc21285_request_irq(_a, _b, _c, _d, _e) \
293 WARN_ON(request_irq(_a, _b, _c, _d, _e) < 0) 288 WARN_ON(request_irq(_a, _b, _c, _d, _e) < 0)
294 289
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c
index a5bed6e017d7..fd12d8a36dc5 100644
--- a/arch/arm/mach-footbridge/ebsa285-pci.c
+++ b/arch/arm/mach-footbridge/ebsa285-pci.c
@@ -31,8 +31,8 @@ static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
31static struct hw_pci ebsa285_pci __initdata = { 31static struct hw_pci ebsa285_pci __initdata = {
32 .map_irq = ebsa285_map_irq, 32 .map_irq = ebsa285_map_irq,
33 .nr_controllers = 1, 33 .nr_controllers = 1,
34 .ops = &dc21285_ops,
34 .setup = dc21285_setup, 35 .setup = dc21285_setup,
35 .scan = dc21285_scan_bus,
36 .preinit = dc21285_preinit, 36 .preinit = dc21285_preinit,
37 .postinit = dc21285_postinit, 37 .postinit = dc21285_postinit,
38}; 38};
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c
index 3f66e894a31e..0fba5134e4fe 100644
--- a/arch/arm/mach-footbridge/netwinder-pci.c
+++ b/arch/arm/mach-footbridge/netwinder-pci.c
@@ -45,8 +45,8 @@ static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
45static struct hw_pci netwinder_pci __initdata = { 45static struct hw_pci netwinder_pci __initdata = {
46 .map_irq = netwinder_map_irq, 46 .map_irq = netwinder_map_irq,
47 .nr_controllers = 1, 47 .nr_controllers = 1,
48 .ops = &dc21285_ops,
48 .setup = dc21285_setup, 49 .setup = dc21285_setup,
49 .scan = dc21285_scan_bus,
50 .preinit = dc21285_preinit, 50 .preinit = dc21285_preinit,
51 .postinit = dc21285_postinit, 51 .postinit = dc21285_postinit,
52}; 52};
diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c
index aeb651d914a6..5c9ee54613b2 100644
--- a/arch/arm/mach-footbridge/personal-pci.c
+++ b/arch/arm/mach-footbridge/personal-pci.c
@@ -41,8 +41,8 @@ static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
41static struct hw_pci personal_server_pci __initdata = { 41static struct hw_pci personal_server_pci __initdata = {
42 .map_irq = personal_server_map_irq, 42 .map_irq = personal_server_map_irq,
43 .nr_controllers = 1, 43 .nr_controllers = 1,
44 .ops = &dc21285_ops,
44 .setup = dc21285_setup, 45 .setup = dc21285_setup,
45 .scan = dc21285_scan_bus,
46 .preinit = dc21285_preinit, 46 .preinit = dc21285_preinit,
47 .postinit = dc21285_postinit, 47 .postinit = dc21285_postinit,
48}; 48};