aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-cns3xxx
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-cns3xxx
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-cns3xxx')
-rw-r--r--arch/arm/mach-cns3xxx/pcie.c10
1 files changed, 2 insertions, 8 deletions
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
169static 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
175static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 169static 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 },