diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-10 07:49:16 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-13 12:12:17 -0400 |
commit | c23bfc3835173f5229b2503e3b616001a28affad (patch) | |
tree | 109f74ea29224587bead91289f55f2d30032b615 | |
parent | daeb4c0c3bf2df72d0cd6e4330bad9e2e520552b (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>
52 files changed, 61 insertions, 135 deletions
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index dcb13494ca0d..c4110d1b1f2d 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -222,7 +222,7 @@ static int it8152_pci_write_config(struct pci_bus *bus, | |||
222 | return PCIBIOS_SUCCESSFUL; | 222 | return PCIBIOS_SUCCESSFUL; |
223 | } | 223 | } |
224 | 224 | ||
225 | static struct pci_ops it8152_ops = { | 225 | struct pci_ops it8152_ops = { |
226 | .read = it8152_pci_read_config, | 226 | .read = it8152_pci_read_config, |
227 | .write = it8152_pci_write_config, | 227 | .write = it8152_pci_write_config, |
228 | }; | 228 | }; |
@@ -346,9 +346,4 @@ void pcibios_set_master(struct pci_dev *dev) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | 348 | ||
349 | struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
350 | { | ||
351 | return pci_scan_root_bus(NULL, nr, &it8152_ops, sys, &sys->resources); | ||
352 | } | ||
353 | |||
354 | EXPORT_SYMBOL(dma_set_coherent_mask); | 349 | EXPORT_SYMBOL(dma_set_coherent_mask); |
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c index 1171a5010aea..6cb362e56d29 100644 --- a/arch/arm/common/via82c505.c +++ b/arch/arm/common/via82c505.c | |||
@@ -51,7 +51,7 @@ via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
51 | return PCIBIOS_SUCCESSFUL; | 51 | return PCIBIOS_SUCCESSFUL; |
52 | } | 52 | } |
53 | 53 | ||
54 | static struct pci_ops via82c505_ops = { | 54 | struct pci_ops via82c505_ops = { |
55 | .read = via82c505_read_config, | 55 | .read = via82c505_read_config, |
56 | .write = via82c505_write_config, | 56 | .write = via82c505_write_config, |
57 | }; | 57 | }; |
@@ -81,12 +81,3 @@ int __init via82c505_setup(int nr, struct pci_sys_data *sys) | |||
81 | { | 81 | { |
82 | return (nr == 0); | 82 | return (nr == 0); |
83 | } | 83 | } |
84 | |||
85 | struct pci_bus * __init via82c505_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
86 | { | ||
87 | if (nr == 0) | ||
88 | return pci_scan_root_bus(NULL, 0, &via82c505_ops, sysdata, | ||
89 | &sysdata->resources); | ||
90 | |||
91 | return NULL; | ||
92 | } | ||
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index 73f84fa4f366..d36a73d7c0e8 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
@@ -110,6 +110,6 @@ extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); | |||
110 | extern void it8152_init_irq(void); | 110 | extern void it8152_init_irq(void); |
111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | 111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); | 112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); |
113 | extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); | 113 | extern struct pci_ops it8152_ops; |
114 | 114 | ||
115 | #endif /* __ASM_HARDWARE_IT8152_H */ | 115 | #endif /* __ASM_HARDWARE_IT8152_H */ |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index ff8146a69683..b4b94b4341f6 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
13 | 13 | ||
14 | struct pci_sys_data; | 14 | struct pci_sys_data; |
15 | struct pci_ops; | ||
15 | struct pci_bus; | 16 | struct pci_bus; |
16 | 17 | ||
17 | struct hw_pci { | 18 | struct hw_pci { |
@@ -19,6 +20,7 @@ struct hw_pci { | |||
19 | int domain; | 20 | int domain; |
20 | #endif | 21 | #endif |
21 | struct list_head buses; | 22 | struct list_head buses; |
23 | struct pci_ops *ops; | ||
22 | int nr_controllers; | 24 | int nr_controllers; |
23 | int (*setup)(int nr, struct pci_sys_data *); | 25 | int (*setup)(int nr, struct pci_sys_data *); |
24 | struct pci_bus *(*scan)(int nr, struct pci_sys_data *); | 26 | struct pci_bus *(*scan)(int nr, struct pci_sys_data *); |
@@ -56,22 +58,22 @@ void pci_common_init(struct hw_pci *); | |||
56 | /* | 58 | /* |
57 | * PCI controllers | 59 | * PCI controllers |
58 | */ | 60 | */ |
61 | extern struct pci_ops iop3xx_ops; | ||
59 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); | 62 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); |
60 | extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); | ||
61 | extern void iop3xx_pci_preinit(void); | 63 | extern void iop3xx_pci_preinit(void); |
62 | extern void iop3xx_pci_preinit_cond(void); | 64 | extern void iop3xx_pci_preinit_cond(void); |
63 | 65 | ||
66 | extern struct pci_ops dc21285_ops; | ||
64 | extern int dc21285_setup(int nr, struct pci_sys_data *); | 67 | extern int dc21285_setup(int nr, struct pci_sys_data *); |
65 | extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); | ||
66 | extern void dc21285_preinit(void); | 68 | extern void dc21285_preinit(void); |
67 | extern void dc21285_postinit(void); | 69 | extern void dc21285_postinit(void); |
68 | 70 | ||
71 | extern struct pci_ops via82c505_ops; | ||
69 | extern int via82c505_setup(int nr, struct pci_sys_data *); | 72 | extern int via82c505_setup(int nr, struct pci_sys_data *); |
70 | extern struct pci_bus *via82c505_scan_bus(int nr, struct pci_sys_data *); | ||
71 | extern void via82c505_init(void *sysdata); | 73 | extern void via82c505_init(void *sysdata); |
72 | 74 | ||
75 | extern struct pci_ops pci_v3_ops; | ||
73 | extern int pci_v3_setup(int nr, struct pci_sys_data *); | 76 | extern int pci_v3_setup(int nr, struct pci_sys_data *); |
74 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); | ||
75 | extern void pci_v3_preinit(void); | 77 | extern void pci_v3_preinit(void); |
76 | extern void pci_v3_postinit(void); | 78 | extern void pci_v3_postinit(void); |
77 | 79 | ||
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index d22e35168e88..00a506f13f70 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -452,7 +452,11 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
452 | &iomem_resource, sys->mem_offset); | 452 | &iomem_resource, sys->mem_offset); |
453 | } | 453 | } |
454 | 454 | ||
455 | sys->bus = hw->scan(nr, sys); | 455 | if (hw->scan) |
456 | sys->bus = hw->scan(nr, sys); | ||
457 | else | ||
458 | sys->bus = pci_scan_root_bus(NULL, sys->busnr, | ||
459 | hw->ops, sys, &sys->resources); | ||
456 | 460 | ||
457 | if (!sys->bus) | 461 | if (!sys->bus) |
458 | panic("PCI: unable to scan bus!"); | 462 | panic("PCI: unable to scan bus!"); |
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index 62f861bef243..311328314163 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -166,12 +166,6 @@ static struct pci_ops cns3xxx_pcie_ops = { | |||
166 | .write = cns3xxx_pci_write_config, | 166 | .write = cns3xxx_pci_write_config, |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
170 | { | ||
171 | return pci_scan_root_bus(NULL, sys->busnr, &cns3xxx_pcie_ops, sys, | ||
172 | &sys->resources); | ||
173 | } | ||
174 | |||
175 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 169 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
176 | { | 170 | { |
177 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); | 171 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); |
@@ -222,8 +216,8 @@ static struct cns3xxx_pcie cns3xxx_pcie[] = { | |||
222 | .hw_pci = { | 216 | .hw_pci = { |
223 | .domain = 0, | 217 | .domain = 0, |
224 | .nr_controllers = 1, | 218 | .nr_controllers = 1, |
219 | .ops = &cns3xxx_pcie_ops, | ||
225 | .setup = cns3xxx_pci_setup, | 220 | .setup = cns3xxx_pci_setup, |
226 | .scan = cns3xxx_pci_scan_bus, | ||
227 | .map_irq = cns3xxx_pcie_map_irq, | 221 | .map_irq = cns3xxx_pcie_map_irq, |
228 | }, | 222 | }, |
229 | }, | 223 | }, |
@@ -264,8 +258,8 @@ static struct cns3xxx_pcie cns3xxx_pcie[] = { | |||
264 | .hw_pci = { | 258 | .hw_pci = { |
265 | .domain = 1, | 259 | .domain = 1, |
266 | .nr_controllers = 1, | 260 | .nr_controllers = 1, |
261 | .ops = &cns3xxx_pcie_ops, | ||
267 | .setup = cns3xxx_pci_setup, | 262 | .setup = cns3xxx_pci_setup, |
268 | .scan = cns3xxx_pci_scan_bus, | ||
269 | .map_irq = cns3xxx_pcie_map_irq, | 263 | .map_irq = cns3xxx_pcie_map_irq, |
270 | }, | 264 | }, |
271 | }, | 265 | }, |
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 | ||
132 | static struct pci_ops dc21285_ops = { | 132 | struct 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 | ||
287 | struct 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) | |||
31 | static struct hw_pci ebsa285_pci __initdata = { | 31 | static 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) | |||
45 | static struct hw_pci netwinder_pci __initdata = { | 45 | static 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, | |||
41 | static struct hw_pci personal_server_pci __initdata = { | 41 | static 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 | }; |
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index f304deac8d05..6c1667e728f5 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 = { | |||
98 | .map_irq = integrator_map_irq, | 98 | .map_irq = integrator_map_irq, |
99 | .setup = pci_v3_setup, | 99 | .setup = pci_v3_setup, |
100 | .nr_controllers = 1, | 100 | .nr_controllers = 1, |
101 | .scan = pci_v3_scan_bus, | 101 | .ops = &pci_v3_ops, |
102 | .preinit = pci_v3_preinit, | 102 | .preinit = pci_v3_preinit, |
103 | .postinit = pci_v3_postinit, | 103 | .postinit = pci_v3_postinit, |
104 | }; | 104 | }; |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 67e6f9a9d1a0..b866880e82ac 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, | |||
340 | return PCIBIOS_SUCCESSFUL; | 340 | return PCIBIOS_SUCCESSFUL; |
341 | } | 341 | } |
342 | 342 | ||
343 | static struct pci_ops pci_v3_ops = { | 343 | struct pci_ops pci_v3_ops = { |
344 | .read = v3_read_config, | 344 | .read = v3_read_config, |
345 | .write = v3_write_config, | 345 | .write = v3_write_config, |
346 | }; | 346 | }; |
@@ -488,12 +488,6 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) | |||
488 | return ret; | 488 | return ret; |
489 | } | 489 | } |
490 | 490 | ||
491 | struct pci_bus * __init pci_v3_scan_bus(int nr, struct pci_sys_data *sys) | ||
492 | { | ||
493 | return pci_scan_root_bus(NULL, sys->busnr, &pci_v3_ops, sys, | ||
494 | &sys->resources); | ||
495 | } | ||
496 | |||
497 | /* | 491 | /* |
498 | * V3_LB_BASE? - local bus address | 492 | * V3_LB_BASE? - local bus address |
499 | * V3_LB_MAP? - pci bus address | 493 | * V3_LB_MAP? - pci bus address |
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index 4915013b3e4f..9f369f09c29d 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c | |||
@@ -104,9 +104,9 @@ em7210_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
104 | 104 | ||
105 | static struct hw_pci em7210_pci __initdata = { | 105 | static struct hw_pci em7210_pci __initdata = { |
106 | .nr_controllers = 1, | 106 | .nr_controllers = 1, |
107 | .ops = &iop3xx_ops, | ||
107 | .setup = iop3xx_pci_setup, | 108 | .setup = iop3xx_pci_setup, |
108 | .preinit = iop3xx_pci_preinit, | 109 | .preinit = iop3xx_pci_preinit, |
109 | .scan = iop3xx_pci_scan_bus, | ||
110 | .map_irq = em7210_pci_map_irq, | 110 | .map_irq = em7210_pci_map_irq, |
111 | }; | 111 | }; |
112 | 112 | ||
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 456a414c892a..c15a100ba779 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c | |||
@@ -97,9 +97,9 @@ glantank_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
97 | 97 | ||
98 | static struct hw_pci glantank_pci __initdata = { | 98 | static struct hw_pci glantank_pci __initdata = { |
99 | .nr_controllers = 1, | 99 | .nr_controllers = 1, |
100 | .ops = &iop3xx_ops, | ||
100 | .setup = iop3xx_pci_setup, | 101 | .setup = iop3xx_pci_setup, |
101 | .preinit = iop3xx_pci_preinit, | 102 | .preinit = iop3xx_pci_preinit, |
102 | .scan = iop3xx_pci_scan_bus, | ||
103 | .map_irq = glantank_pci_map_irq, | 103 | .map_irq = glantank_pci_map_irq, |
104 | }; | 104 | }; |
105 | 105 | ||
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index b795e6b24fb8..ddd1c7ecfe57 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
@@ -131,9 +131,9 @@ ep80219_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
131 | 131 | ||
132 | static struct hw_pci ep80219_pci __initdata = { | 132 | static struct hw_pci ep80219_pci __initdata = { |
133 | .nr_controllers = 1, | 133 | .nr_controllers = 1, |
134 | .ops = &iop3xx_ops, | ||
134 | .setup = iop3xx_pci_setup, | 135 | .setup = iop3xx_pci_setup, |
135 | .preinit = iop3xx_pci_preinit, | 136 | .preinit = iop3xx_pci_preinit, |
136 | .scan = iop3xx_pci_scan_bus, | ||
137 | .map_irq = ep80219_pci_map_irq, | 137 | .map_irq = ep80219_pci_map_irq, |
138 | }; | 138 | }; |
139 | 139 | ||
@@ -166,9 +166,9 @@ iq31244_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
166 | 166 | ||
167 | static struct hw_pci iq31244_pci __initdata = { | 167 | static struct hw_pci iq31244_pci __initdata = { |
168 | .nr_controllers = 1, | 168 | .nr_controllers = 1, |
169 | .ops = &iop3xx_ops, | ||
169 | .setup = iop3xx_pci_setup, | 170 | .setup = iop3xx_pci_setup, |
170 | .preinit = iop3xx_pci_preinit, | 171 | .preinit = iop3xx_pci_preinit, |
171 | .scan = iop3xx_pci_scan_bus, | ||
172 | .map_irq = iq31244_pci_map_irq, | 172 | .map_irq = iq31244_pci_map_irq, |
173 | }; | 173 | }; |
174 | 174 | ||
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index ac6d9625b216..bf155e6a3b45 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
@@ -102,9 +102,9 @@ iq80321_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
102 | 102 | ||
103 | static struct hw_pci iq80321_pci __initdata = { | 103 | static struct hw_pci iq80321_pci __initdata = { |
104 | .nr_controllers = 1, | 104 | .nr_controllers = 1, |
105 | .ops = &iop3xx_ops, | ||
105 | .setup = iop3xx_pci_setup, | 106 | .setup = iop3xx_pci_setup, |
106 | .preinit = iop3xx_pci_preinit_cond, | 107 | .preinit = iop3xx_pci_preinit_cond, |
107 | .scan = iop3xx_pci_scan_bus, | ||
108 | .map_irq = iq80321_pci_map_irq, | 108 | .map_irq = iq80321_pci_map_irq, |
109 | }; | 109 | }; |
110 | 110 | ||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index adf257a18f19..5a7ae91e8849 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -115,9 +115,9 @@ n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
115 | 115 | ||
116 | static struct hw_pci n2100_pci __initdata = { | 116 | static struct hw_pci n2100_pci __initdata = { |
117 | .nr_controllers = 1, | 117 | .nr_controllers = 1, |
118 | .ops = &iop3xx_ops, | ||
118 | .setup = iop3xx_pci_setup, | 119 | .setup = iop3xx_pci_setup, |
119 | .preinit = iop3xx_pci_preinit, | 120 | .preinit = iop3xx_pci_preinit, |
120 | .scan = iop3xx_pci_scan_bus, | ||
121 | .map_irq = n2100_pci_map_irq, | 121 | .map_irq = n2100_pci_map_irq, |
122 | }; | 122 | }; |
123 | 123 | ||
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index 3298a8af9126..e74a7debe793 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c | |||
@@ -85,9 +85,9 @@ iq80331_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
85 | 85 | ||
86 | static struct hw_pci iq80331_pci __initdata = { | 86 | static struct hw_pci iq80331_pci __initdata = { |
87 | .nr_controllers = 1, | 87 | .nr_controllers = 1, |
88 | .ops = &iop3xx_ops, | ||
88 | .setup = iop3xx_pci_setup, | 89 | .setup = iop3xx_pci_setup, |
89 | .preinit = iop3xx_pci_preinit_cond, | 90 | .preinit = iop3xx_pci_preinit_cond, |
90 | .scan = iop3xx_pci_scan_bus, | ||
91 | .map_irq = iq80331_pci_map_irq, | 91 | .map_irq = iq80331_pci_map_irq, |
92 | }; | 92 | }; |
93 | 93 | ||
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index 87b0e9dd74ad..e2f5beece6e8 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c | |||
@@ -85,9 +85,9 @@ iq80332_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
85 | 85 | ||
86 | static struct hw_pci iq80332_pci __initdata = { | 86 | static struct hw_pci iq80332_pci __initdata = { |
87 | .nr_controllers = 1, | 87 | .nr_controllers = 1, |
88 | .ops = &iop3xx_ops, | ||
88 | .setup = iop3xx_pci_setup, | 89 | .setup = iop3xx_pci_setup, |
89 | .preinit = iop3xx_pci_preinit_cond, | 90 | .preinit = iop3xx_pci_preinit_cond, |
90 | .scan = iop3xx_pci_scan_bus, | ||
91 | .map_irq = iq80332_pci_map_irq, | 91 | .map_irq = iq80332_pci_map_irq, |
92 | }; | 92 | }; |
93 | 93 | ||
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index 4867f408617c..73df2f688813 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
@@ -141,13 +141,6 @@ static struct pci_ops enp2611_pci_ops = { | |||
141 | .write = enp2611_pci_write_config | 141 | .write = enp2611_pci_write_config |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct pci_bus * __init enp2611_pci_scan_bus(int nr, | ||
145 | struct pci_sys_data *sys) | ||
146 | { | ||
147 | return pci_scan_root_bus(NULL, sys->busnr, &enp2611_pci_ops, sys, | ||
148 | &sys->resources); | ||
149 | } | ||
150 | |||
151 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, | 144 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, |
152 | u8 pin) | 145 | u8 pin) |
153 | { | 146 | { |
@@ -180,9 +173,9 @@ static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
180 | 173 | ||
181 | struct hw_pci enp2611_pci __initdata = { | 174 | struct hw_pci enp2611_pci __initdata = { |
182 | .nr_controllers = 1, | 175 | .nr_controllers = 1, |
176 | .ops = &enp2611_pci_ops, | ||
183 | .setup = enp2611_pci_setup, | 177 | .setup = enp2611_pci_setup, |
184 | .preinit = enp2611_pci_preinit, | 178 | .preinit = enp2611_pci_preinit, |
185 | .scan = enp2611_pci_scan_bus, | ||
186 | .map_irq = enp2611_pci_map_irq, | 179 | .map_irq = enp2611_pci_map_irq, |
187 | }; | 180 | }; |
188 | 181 | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h index bb0f8dcf9ee1..6b500c0858be 100644 --- a/arch/arm/mach-ixp2000/include/mach/platform.h +++ b/arch/arm/mach-ixp2000/include/mach/platform.h | |||
@@ -127,10 +127,10 @@ unsigned long ixp2000_gettimeoffset(void); | |||
127 | 127 | ||
128 | struct pci_sys_data; | 128 | struct pci_sys_data; |
129 | 129 | ||
130 | extern struct pci_ops ixp2000_pci_ops; | ||
130 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); | 131 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); |
131 | void ixp2000_pci_preinit(void); | 132 | void ixp2000_pci_preinit(void); |
132 | int ixp2000_pci_setup(int, struct pci_sys_data*); | 133 | int ixp2000_pci_setup(int, struct pci_sys_data*); |
133 | struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); | ||
134 | int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); | 134 | int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); |
135 | int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); | 135 | int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); |
136 | 136 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index 915ad49e3b8f..4ec44801d303 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
@@ -146,10 +146,10 @@ static void ixdp2400_pci_postinit(void) | |||
146 | 146 | ||
147 | static struct hw_pci ixdp2400_pci __initdata = { | 147 | static struct hw_pci ixdp2400_pci __initdata = { |
148 | .nr_controllers = 1, | 148 | .nr_controllers = 1, |
149 | .ops = &ixp2000_pci_ops, | ||
149 | .setup = ixdp2400_pci_setup, | 150 | .setup = ixdp2400_pci_setup, |
150 | .preinit = ixdp2400_pci_preinit, | 151 | .preinit = ixdp2400_pci_preinit, |
151 | .postinit = ixdp2400_pci_postinit, | 152 | .postinit = ixdp2400_pci_postinit, |
152 | .scan = ixp2000_pci_scan_bus, | ||
153 | .map_irq = ixdp2400_pci_map_irq, | 153 | .map_irq = ixdp2400_pci_map_irq, |
154 | }; | 154 | }; |
155 | 155 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index a9f1819ea049..44378c31d177 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c | |||
@@ -246,10 +246,10 @@ static void __init ixdp2800_pci_postinit(void) | |||
246 | 246 | ||
247 | struct __initdata hw_pci ixdp2800_pci __initdata = { | 247 | struct __initdata hw_pci ixdp2800_pci __initdata = { |
248 | .nr_controllers = 1, | 248 | .nr_controllers = 1, |
249 | .ops = &ixp2000_pci_ops, | ||
249 | .setup = ixdp2800_pci_setup, | 250 | .setup = ixdp2800_pci_setup, |
250 | .preinit = ixdp2800_pci_preinit, | 251 | .preinit = ixdp2800_pci_preinit, |
251 | .postinit = ixdp2800_pci_postinit, | 252 | .postinit = ixdp2800_pci_postinit, |
252 | .scan = ixp2000_pci_scan_bus, | ||
253 | .map_irq = ixdp2800_pci_map_irq, | 253 | .map_irq = ixdp2800_pci_map_irq, |
254 | }; | 254 | }; |
255 | 255 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 5196c39cdba4..af8b801d7d59 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -327,9 +327,9 @@ static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys) | |||
327 | 327 | ||
328 | struct hw_pci ixdp2x01_pci __initdata = { | 328 | struct hw_pci ixdp2x01_pci __initdata = { |
329 | .nr_controllers = 1, | 329 | .nr_controllers = 1, |
330 | .ops = &ixp2000_pci_ops, | ||
330 | .setup = ixdp2x01_pci_setup, | 331 | .setup = ixdp2x01_pci_setup, |
331 | .preinit = ixdp2x01_pci_preinit, | 332 | .preinit = ixdp2x01_pci_preinit, |
332 | .scan = ixp2000_pci_scan_bus, | ||
333 | .map_irq = ixdp2x01_pci_map_irq, | 333 | .map_irq = ixdp2x01_pci_map_irq, |
334 | }; | 334 | }; |
335 | 335 | ||
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c index 9c02de932fac..d706838db023 100644 --- a/arch/arm/mach-ixp2000/pci.c +++ b/arch/arm/mach-ixp2000/pci.c | |||
@@ -124,17 +124,11 @@ int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||
127 | static struct pci_ops ixp2000_pci_ops = { | 127 | struct pci_ops ixp2000_pci_ops = { |
128 | .read = ixp2000_pci_read_config, | 128 | .read = ixp2000_pci_read_config, |
129 | .write = ixp2000_pci_write_config | 129 | .write = ixp2000_pci_write_config |
130 | }; | 130 | }; |
131 | 131 | ||
132 | struct pci_bus *ixp2000_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
133 | { | ||
134 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp2000_pci_ops, | ||
135 | sysdata, &sysdata->resources); | ||
136 | } | ||
137 | |||
138 | 132 | ||
139 | int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 133 | int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
140 | { | 134 | { |
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h index 50de558e722e..798d8b42ab4a 100644 --- a/arch/arm/mach-ixp23xx/include/mach/platform.h +++ b/arch/arm/mach-ixp23xx/include/mach/platform.h | |||
@@ -37,7 +37,7 @@ void ixp23xx_sys_init(void); | |||
37 | void ixp23xx_restart(char, const char *); | 37 | void ixp23xx_restart(char, const char *); |
38 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | 38 | int ixp23xx_pci_setup(int, struct pci_sys_data *); |
39 | void ixp23xx_pci_preinit(void); | 39 | void ixp23xx_pci_preinit(void); |
40 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | 40 | extern struct pci_ops ixp23xx_pci_ops; |
41 | void ixp23xx_pci_slave_init(void); | 41 | void ixp23xx_pci_slave_init(void); |
42 | 42 | ||
43 | extern struct sys_timer ixp23xx_timer; | 43 | extern struct sys_timer ixp23xx_timer; |
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index b0e07db5ceaf..8b48e32a8a62 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c | |||
@@ -251,9 +251,9 @@ static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
251 | 251 | ||
252 | struct hw_pci ixdp2351_pci __initdata = { | 252 | struct hw_pci ixdp2351_pci __initdata = { |
253 | .nr_controllers = 1, | 253 | .nr_controllers = 1, |
254 | .ops = &ixp23xx_pci_ops, | ||
254 | .preinit = ixp23xx_pci_preinit, | 255 | .preinit = ixp23xx_pci_preinit, |
255 | .setup = ixp23xx_pci_setup, | 256 | .setup = ixp23xx_pci_setup, |
256 | .scan = ixp23xx_pci_scan_bus, | ||
257 | .map_irq = ixdp2351_map_irq, | 257 | .map_irq = ixdp2351_map_irq, |
258 | }; | 258 | }; |
259 | 259 | ||
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c index 911f5a58e006..9211506ef556 100644 --- a/arch/arm/mach-ixp23xx/pci.c +++ b/arch/arm/mach-ixp23xx/pci.c | |||
@@ -140,12 +140,6 @@ struct pci_ops ixp23xx_pci_ops = { | |||
140 | .write = ixp23xx_pci_write_config, | 140 | .write = ixp23xx_pci_write_config, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | struct pci_bus *ixp23xx_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
144 | { | ||
145 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp23xx_pci_ops, | ||
146 | sysdata, &sysdata->resources); | ||
147 | } | ||
148 | |||
149 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 143 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
150 | { | 144 | { |
151 | volatile unsigned long temp; | 145 | volatile unsigned long temp; |
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c index eaaa3fa9fd05..8c0e5de3c609 100644 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ b/arch/arm/mach-ixp23xx/roadrunner.c | |||
@@ -118,9 +118,9 @@ static void __init roadrunner_pci_preinit(void) | |||
118 | 118 | ||
119 | static struct hw_pci roadrunner_pci __initdata = { | 119 | static struct hw_pci roadrunner_pci __initdata = { |
120 | .nr_controllers = 1, | 120 | .nr_controllers = 1, |
121 | .ops = &ixp23xx_pci_ops, | ||
121 | .preinit = roadrunner_pci_preinit, | 122 | .preinit = roadrunner_pci_preinit, |
122 | .setup = ixp23xx_pci_setup, | 123 | .setup = ixp23xx_pci_setup, |
123 | .scan = ixp23xx_pci_scan_bus, | ||
124 | .map_irq = roadrunner_map_irq, | 124 | .map_irq = roadrunner_map_irq, |
125 | }; | 125 | }; |
126 | 126 | ||
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c index 89d1f35fff09..548c7d43ade6 100644 --- a/arch/arm/mach-ixp4xx/avila-pci.c +++ b/arch/arm/mach-ixp4xx/avila-pci.c | |||
@@ -65,9 +65,9 @@ static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
65 | 65 | ||
66 | struct hw_pci avila_pci __initdata = { | 66 | struct hw_pci avila_pci __initdata = { |
67 | .nr_controllers = 1, | 67 | .nr_controllers = 1, |
68 | .ops = &ixp4xx_ops, | ||
68 | .preinit = avila_pci_preinit, | 69 | .preinit = avila_pci_preinit, |
69 | .setup = ixp4xx_setup, | 70 | .setup = ixp4xx_setup, |
70 | .scan = ixp4xx_scan_bus, | ||
71 | .map_irq = avila_map_irq, | 71 | .map_irq = avila_map_irq, |
72 | }; | 72 | }; |
73 | 73 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index d5719eb42591..1694f01ce2b6 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -480,12 +480,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
480 | return 1; | 480 | return 1; |
481 | } | 481 | } |
482 | 482 | ||
483 | struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys) | ||
484 | { | ||
485 | return pci_scan_root_bus(NULL, sys->busnr, &ixp4xx_ops, sys, | ||
486 | &sys->resources); | ||
487 | } | ||
488 | |||
489 | int dma_set_coherent_mask(struct device *dev, u64 mask) | 483 | int dma_set_coherent_mask(struct device *dev, u64 mask) |
490 | { | 484 | { |
491 | if (mask >= SZ_64M - 1) | 485 | if (mask >= SZ_64M - 1) |
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index d876a4f13eae..5d14ce2aee6d 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c | |||
@@ -48,9 +48,9 @@ static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
48 | 48 | ||
49 | struct hw_pci coyote_pci __initdata = { | 49 | struct hw_pci coyote_pci __initdata = { |
50 | .nr_controllers = 1, | 50 | .nr_controllers = 1, |
51 | .ops = &ixp4xx_ops, | ||
51 | .preinit = coyote_pci_preinit, | 52 | .preinit = coyote_pci_preinit, |
52 | .setup = ixp4xx_setup, | 53 | .setup = ixp4xx_setup, |
53 | .scan = ixp4xx_scan_bus, | ||
54 | .map_irq = coyote_map_irq, | 54 | .map_irq = coyote_map_irq, |
55 | }; | 55 | }; |
56 | 56 | ||
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c index 66485979337d..8dca76937723 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-pci.c +++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c | |||
@@ -62,9 +62,9 @@ static int __init dsmg600_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
62 | 62 | ||
63 | struct hw_pci __initdata dsmg600_pci = { | 63 | struct hw_pci __initdata dsmg600_pci = { |
64 | .nr_controllers = 1, | 64 | .nr_controllers = 1, |
65 | .ops = &ixp4xx_ops, | ||
65 | .preinit = dsmg600_pci_preinit, | 66 | .preinit = dsmg600_pci_preinit, |
66 | .setup = ixp4xx_setup, | 67 | .setup = ixp4xx_setup, |
67 | .scan = ixp4xx_scan_bus, | ||
68 | .map_irq = dsmg600_map_irq, | 68 | .map_irq = dsmg600_map_irq, |
69 | }; | 69 | }; |
70 | 70 | ||
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c index 528e4af678c7..fd4a8625b4ae 100644 --- a/arch/arm/mach-ixp4xx/fsg-pci.c +++ b/arch/arm/mach-ixp4xx/fsg-pci.c | |||
@@ -59,9 +59,9 @@ static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
59 | 59 | ||
60 | struct hw_pci fsg_pci __initdata = { | 60 | struct hw_pci fsg_pci __initdata = { |
61 | .nr_controllers = 1, | 61 | .nr_controllers = 1, |
62 | .ops = &ixp4xx_ops, | ||
62 | .preinit = fsg_pci_preinit, | 63 | .preinit = fsg_pci_preinit, |
63 | .setup = ixp4xx_setup, | 64 | .setup = ixp4xx_setup, |
64 | .scan = ixp4xx_scan_bus, | ||
65 | .map_irq = fsg_map_irq, | 65 | .map_irq = fsg_map_irq, |
66 | }; | 66 | }; |
67 | 67 | ||
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c index 1d1134b34758..d9d6cc089707 100644 --- a/arch/arm/mach-ixp4xx/gateway7001-pci.c +++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c | |||
@@ -47,9 +47,9 @@ static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot, | |||
47 | 47 | ||
48 | struct hw_pci gateway7001_pci __initdata = { | 48 | struct hw_pci gateway7001_pci __initdata = { |
49 | .nr_controllers = 1, | 49 | .nr_controllers = 1, |
50 | .ops = &ixp4xx_ops, | ||
50 | .preinit = gateway7001_pci_preinit, | 51 | .preinit = gateway7001_pci_preinit, |
51 | .setup = ixp4xx_setup, | 52 | .setup = ixp4xx_setup, |
52 | .scan = ixp4xx_scan_bus, | ||
53 | .map_irq = gateway7001_map_irq, | 53 | .map_irq = gateway7001_map_irq, |
54 | }; | 54 | }; |
55 | 55 | ||
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index c97a1a82e0f6..b800a031207c 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -473,10 +473,10 @@ static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
473 | 473 | ||
474 | static struct hw_pci gmlr_hw_pci __initdata = { | 474 | static struct hw_pci gmlr_hw_pci __initdata = { |
475 | .nr_controllers = 1, | 475 | .nr_controllers = 1, |
476 | .ops = &ixp4xx_ops, | ||
476 | .preinit = gmlr_pci_preinit, | 477 | .preinit = gmlr_pci_preinit, |
477 | .postinit = gmlr_pci_postinit, | 478 | .postinit = gmlr_pci_postinit, |
478 | .setup = ixp4xx_setup, | 479 | .setup = ixp4xx_setup, |
479 | .scan = ixp4xx_scan_bus, | ||
480 | .map_irq = gmlr_map_irq, | 480 | .map_irq = gmlr_map_irq, |
481 | }; | 481 | }; |
482 | 482 | ||
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c index 4bd8770fee84..551d114c9e14 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c | |||
@@ -67,9 +67,9 @@ static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
67 | 67 | ||
68 | struct hw_pci gtwx5715_pci __initdata = { | 68 | struct hw_pci gtwx5715_pci __initdata = { |
69 | .nr_controllers = 1, | 69 | .nr_controllers = 1, |
70 | .ops = &ixp4xx_ops, | ||
70 | .preinit = gtwx5715_pci_preinit, | 71 | .preinit = gtwx5715_pci_preinit, |
71 | .setup = ixp4xx_setup, | 72 | .setup = ixp4xx_setup, |
72 | .scan = ixp4xx_scan_bus, | ||
73 | .map_irq = gtwx5715_map_irq, | 73 | .map_irq = gtwx5715_map_irq, |
74 | }; | 74 | }; |
75 | 75 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h index b66bedc64de1..5bce94aacca9 100644 --- a/arch/arm/mach-ixp4xx/include/mach/platform.h +++ b/arch/arm/mach-ixp4xx/include/mach/platform.h | |||
@@ -130,7 +130,7 @@ extern void ixp4xx_restart(char, const char *); | |||
130 | extern void ixp4xx_pci_preinit(void); | 130 | extern void ixp4xx_pci_preinit(void); |
131 | struct pci_sys_data; | 131 | struct pci_sys_data; |
132 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); | 132 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); |
133 | extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); | 133 | extern struct pci_ops ixp4xx_ops; |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * GPIO-functions | 136 | * GPIO-functions |
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c index 3e1a229aee0a..318424dd3c50 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c | |||
@@ -60,9 +60,9 @@ static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
60 | 60 | ||
61 | struct hw_pci ixdp425_pci __initdata = { | 61 | struct hw_pci ixdp425_pci __initdata = { |
62 | .nr_controllers = 1, | 62 | .nr_controllers = 1, |
63 | .ops = &ixp4xx_ops, | ||
63 | .preinit = ixdp425_pci_preinit, | 64 | .preinit = ixdp425_pci_preinit, |
64 | .setup = ixp4xx_setup, | 65 | .setup = ixp4xx_setup, |
65 | .scan = ixp4xx_scan_bus, | ||
66 | .map_irq = ixdp425_map_irq, | 66 | .map_irq = ixdp425_map_irq, |
67 | }; | 67 | }; |
68 | 68 | ||
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index 5c70e9235ced..1f8717ba13dc 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c | |||
@@ -42,9 +42,9 @@ static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
42 | 42 | ||
43 | struct hw_pci ixdpg425_pci __initdata = { | 43 | struct hw_pci ixdpg425_pci __initdata = { |
44 | .nr_controllers = 1, | 44 | .nr_controllers = 1, |
45 | .ops = &ixp4xx_ops, | ||
45 | .preinit = ixdpg425_pci_preinit, | 46 | .preinit = ixdpg425_pci_preinit, |
46 | .setup = ixp4xx_setup, | 47 | .setup = ixp4xx_setup, |
47 | .scan = ixp4xx_scan_bus, | ||
48 | .map_irq = ixdpg425_map_irq, | 48 | .map_irq = ixdpg425_map_irq, |
49 | }; | 49 | }; |
50 | 50 | ||
diff --git a/arch/arm/mach-ixp4xx/miccpt-pci.c b/arch/arm/mach-ixp4xx/miccpt-pci.c index 8d4ba71518d4..d114ccd2017c 100644 --- a/arch/arm/mach-ixp4xx/miccpt-pci.c +++ b/arch/arm/mach-ixp4xx/miccpt-pci.c | |||
@@ -61,9 +61,9 @@ static int __init miccpt_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
61 | 61 | ||
62 | struct hw_pci miccpt_pci __initdata = { | 62 | struct hw_pci miccpt_pci __initdata = { |
63 | .nr_controllers = 1, | 63 | .nr_controllers = 1, |
64 | .ops = &ixp4xx_ops, | ||
64 | .preinit = miccpt_pci_preinit, | 65 | .preinit = miccpt_pci_preinit, |
65 | .setup = ixp4xx_setup, | 66 | .setup = ixp4xx_setup, |
66 | .scan = ixp4xx_scan_bus, | ||
67 | .map_irq = miccpt_map_irq, | 67 | .map_irq = miccpt_map_irq, |
68 | }; | 68 | }; |
69 | 69 | ||
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c index ba1ad203f30f..8f0eba0a6800 100644 --- a/arch/arm/mach-ixp4xx/nas100d-pci.c +++ b/arch/arm/mach-ixp4xx/nas100d-pci.c | |||
@@ -58,9 +58,9 @@ static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
58 | 58 | ||
59 | struct hw_pci __initdata nas100d_pci = { | 59 | struct hw_pci __initdata nas100d_pci = { |
60 | .nr_controllers = 1, | 60 | .nr_controllers = 1, |
61 | .ops = &ixp4xx_ops, | ||
61 | .preinit = nas100d_pci_preinit, | 62 | .preinit = nas100d_pci_preinit, |
62 | .setup = ixp4xx_setup, | 63 | .setup = ixp4xx_setup, |
63 | .scan = ixp4xx_scan_bus, | ||
64 | .map_irq = nas100d_map_irq, | 64 | .map_irq = nas100d_map_irq, |
65 | }; | 65 | }; |
66 | 66 | ||
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index ffc060f2fae8..032defe111aa 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
@@ -54,9 +54,9 @@ static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
54 | 54 | ||
55 | struct hw_pci __initdata nslu2_pci = { | 55 | struct hw_pci __initdata nslu2_pci = { |
56 | .nr_controllers = 1, | 56 | .nr_controllers = 1, |
57 | .ops = &ixp4xx_ops, | ||
57 | .preinit = nslu2_pci_preinit, | 58 | .preinit = nslu2_pci_preinit, |
58 | .setup = ixp4xx_setup, | 59 | .setup = ixp4xx_setup, |
59 | .scan = ixp4xx_scan_bus, | ||
60 | .map_irq = nslu2_map_irq, | 60 | .map_irq = nslu2_map_irq, |
61 | }; | 61 | }; |
62 | 62 | ||
diff --git a/arch/arm/mach-ixp4xx/vulcan-pci.c b/arch/arm/mach-ixp4xx/vulcan-pci.c index b9b1c42b7ef3..a4220fa5e0c3 100644 --- a/arch/arm/mach-ixp4xx/vulcan-pci.c +++ b/arch/arm/mach-ixp4xx/vulcan-pci.c | |||
@@ -56,9 +56,9 @@ static int __init vulcan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
56 | 56 | ||
57 | struct hw_pci vulcan_pci __initdata = { | 57 | struct hw_pci vulcan_pci __initdata = { |
58 | .nr_controllers = 1, | 58 | .nr_controllers = 1, |
59 | .ops = &ixp4xx_ops, | ||
59 | .preinit = vulcan_pci_preinit, | 60 | .preinit = vulcan_pci_preinit, |
60 | .setup = ixp4xx_setup, | 61 | .setup = ixp4xx_setup, |
61 | .scan = ixp4xx_scan_bus, | ||
62 | .map_irq = vulcan_map_irq, | 62 | .map_irq = vulcan_map_irq, |
63 | }; | 63 | }; |
64 | 64 | ||
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c index f39a242746b0..c92e5b82af36 100644 --- a/arch/arm/mach-ixp4xx/wg302v2-pci.c +++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c | |||
@@ -46,9 +46,9 @@ static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
46 | 46 | ||
47 | struct hw_pci wg302v2_pci __initdata = { | 47 | struct hw_pci wg302v2_pci __initdata = { |
48 | .nr_controllers = 1, | 48 | .nr_controllers = 1, |
49 | .ops = &ixp4xx_ops, | ||
49 | .preinit = wg302v2_pci_preinit, | 50 | .preinit = wg302v2_pci_preinit, |
50 | .setup = ixp4xx_setup, | 51 | .setup = ixp4xx_setup, |
51 | .scan = ixp4xx_scan_bus, | ||
52 | .map_irq = wg302v2_map_irq, | 52 | .map_irq = wg302v2_map_irq, |
53 | }; | 53 | }; |
54 | 54 | ||
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c index f2235e80171e..bb18193b4bac 100644 --- a/arch/arm/mach-ks8695/pci.c +++ b/arch/arm/mach-ks8695/pci.c | |||
@@ -141,12 +141,6 @@ static struct pci_ops ks8695_pci_ops = { | |||
141 | .write = ks8695_pci_writeconfig, | 141 | .write = ks8695_pci_writeconfig, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
145 | { | ||
146 | return pci_scan_root_bus(NULL, sys->busnr, &ks8695_pci_ops, sys, | ||
147 | &sys->resources); | ||
148 | } | ||
149 | |||
150 | static struct resource pci_mem = { | 144 | static struct resource pci_mem = { |
151 | .name = "PCI Memory space", | 145 | .name = "PCI Memory space", |
152 | .start = KS8695_PCIMEM_PA, | 146 | .start = KS8695_PCIMEM_PA, |
@@ -302,9 +296,9 @@ static void ks8695_show_pciregs(void) | |||
302 | 296 | ||
303 | static struct hw_pci ks8695_pci __initdata = { | 297 | static struct hw_pci ks8695_pci __initdata = { |
304 | .nr_controllers = 1, | 298 | .nr_controllers = 1, |
299 | .ops = &ks8695_pci_ops, | ||
305 | .preinit = ks8695_pci_preinit, | 300 | .preinit = ks8695_pci_preinit, |
306 | .setup = ks8695_pci_setup, | 301 | .setup = ks8695_pci_setup, |
307 | .scan = ks8695_pci_scan_bus, | ||
308 | .postinit = NULL, | 302 | .postinit = NULL, |
309 | .map_irq = NULL, | 303 | .map_irq = NULL, |
310 | }; | 304 | }; |
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index f83f04a1a46b..d8f816c24a2f 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
@@ -183,8 +183,8 @@ static void cmx2xx_pci_preinit(void) | |||
183 | static struct hw_pci cmx2xx_pci __initdata = { | 183 | static struct hw_pci cmx2xx_pci __initdata = { |
184 | .map_irq = cmx2xx_pci_map_irq, | 184 | .map_irq = cmx2xx_pci_map_irq, |
185 | .nr_controllers = 1, | 185 | .nr_controllers = 1, |
186 | .ops = &it8152_ops, | ||
186 | .setup = it8152_pci_setup, | 187 | .setup = it8152_pci_setup, |
187 | .scan = it8152_pci_scan_bus, | ||
188 | .preinit = cmx2xx_pci_preinit, | 188 | .preinit = cmx2xx_pci_preinit, |
189 | }; | 189 | }; |
190 | 190 | ||
diff --git a/arch/arm/mach-sa1100/pci-nanoengine.c b/arch/arm/mach-sa1100/pci-nanoengine.c index b49108b890a8..ff02e2da99f2 100644 --- a/arch/arm/mach-sa1100/pci-nanoengine.c +++ b/arch/arm/mach-sa1100/pci-nanoengine.c | |||
@@ -129,12 +129,6 @@ static int __init pci_nanoengine_map_irq(const struct pci_dev *dev, u8 slot, | |||
129 | return NANOENGINE_IRQ_GPIO_PCI; | 129 | return NANOENGINE_IRQ_GPIO_PCI; |
130 | } | 130 | } |
131 | 131 | ||
132 | struct pci_bus * __init pci_nanoengine_scan_bus(int nr, struct pci_sys_data *sys) | ||
133 | { | ||
134 | return pci_scan_root_bus(NULL, sys->busnr, &pci_nano_ops, sys, | ||
135 | &sys->resources); | ||
136 | } | ||
137 | |||
138 | static struct resource pci_io_ports = | 132 | static struct resource pci_io_ports = |
139 | DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); | 133 | DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); |
140 | 134 | ||
@@ -274,7 +268,7 @@ int __init pci_nanoengine_setup(int nr, struct pci_sys_data *sys) | |||
274 | static struct hw_pci nanoengine_pci __initdata = { | 268 | static struct hw_pci nanoengine_pci __initdata = { |
275 | .map_irq = pci_nanoengine_map_irq, | 269 | .map_irq = pci_nanoengine_map_irq, |
276 | .nr_controllers = 1, | 270 | .nr_controllers = 1, |
277 | .scan = pci_nanoengine_scan_bus, | 271 | .ops = &pci_nano_ops, |
278 | .setup = pci_nanoengine_setup, | 272 | .setup = pci_nanoengine_setup, |
279 | }; | 273 | }; |
280 | 274 | ||
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c index f7fa9374e005..9089407d5326 100644 --- a/arch/arm/mach-shark/pci.c +++ b/arch/arm/mach-shark/pci.c | |||
@@ -31,7 +31,7 @@ static struct hw_pci shark_pci __initdata = { | |||
31 | .setup = via82c505_setup, | 31 | .setup = via82c505_setup, |
32 | .map_irq = shark_map_irq, | 32 | .map_irq = shark_map_irq, |
33 | .nr_controllers = 1, | 33 | .nr_controllers = 1, |
34 | .scan = via82c505_scan_bus, | 34 | .ops = &via82c505_ops, |
35 | .preinit = via82c505_preinit, | 35 | .preinit = via82c505_preinit, |
36 | }; | 36 | }; |
37 | 37 | ||
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 80a93ff0d128..15c6a00000ec 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -303,12 +303,6 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
303 | } | 303 | } |
304 | 304 | ||
305 | 305 | ||
306 | struct pci_bus * __init pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) | ||
307 | { | ||
308 | return pci_scan_root_bus(NULL, sys->busnr, &pci_versatile_ops, sys, | ||
309 | &sys->resources); | ||
310 | } | ||
311 | |||
312 | void __init pci_versatile_preinit(void) | 306 | void __init pci_versatile_preinit(void) |
313 | { | 307 | { |
314 | pcibios_min_io = 0x44000000; | 308 | pcibios_min_io = 0x44000000; |
@@ -347,8 +341,8 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
347 | static struct hw_pci versatile_pci __initdata = { | 341 | static struct hw_pci versatile_pci __initdata = { |
348 | .map_irq = versatile_map_irq, | 342 | .map_irq = versatile_map_irq, |
349 | .nr_controllers = 1, | 343 | .nr_controllers = 1, |
344 | .ops = &pci_versatile_ops, | ||
350 | .setup = pci_versatile_setup, | 345 | .setup = pci_versatile_setup, |
351 | .scan = pci_versatile_scan_bus, | ||
352 | .preinit = pci_versatile_preinit, | 346 | .preinit = pci_versatile_preinit, |
353 | }; | 347 | }; |
354 | 348 | ||
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 0da42058a20f..8daae9b230ea 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c | |||
@@ -160,7 +160,7 @@ iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
160 | return PCIBIOS_SUCCESSFUL; | 160 | return PCIBIOS_SUCCESSFUL; |
161 | } | 161 | } |
162 | 162 | ||
163 | static struct pci_ops iop3xx_ops = { | 163 | struct pci_ops iop3xx_ops = { |
164 | .read = iop3xx_read_config, | 164 | .read = iop3xx_read_config, |
165 | .write = iop3xx_write_config, | 165 | .write = iop3xx_write_config, |
166 | }; | 166 | }; |
@@ -220,12 +220,6 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
220 | return 1; | 220 | return 1; |
221 | } | 221 | } |
222 | 222 | ||
223 | struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
224 | { | ||
225 | return pci_scan_root_bus(NULL, sys->busnr, &iop3xx_ops, sys, | ||
226 | &sys->resources); | ||
227 | } | ||
228 | |||
229 | void __init iop3xx_atu_setup(void) | 223 | void __init iop3xx_atu_setup(void) |
230 | { | 224 | { |
231 | /* BAR 0 ( Disabled ) */ | 225 | /* BAR 0 ( Disabled ) */ |