aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/kernel/pci.c')
-rw-r--r--arch/tile/kernel/pci.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index bc6656b5708b..bbf81579b1f8 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -67,16 +67,6 @@ static struct pci_ops tile_cfg_ops;
67 67
68 68
69/* 69/*
70 * We don't need to worry about the alignment of resources.
71 */
72resource_size_t pcibios_align_resource(void *data, const struct resource *res,
73 resource_size_t size, resource_size_t align)
74{
75 return res->start;
76}
77EXPORT_SYMBOL(pcibios_align_resource);
78
79/*
80 * Open a FD to the hypervisor PCI device. 70 * Open a FD to the hypervisor PCI device.
81 * 71 *
82 * controller_id is the controller number, config type is 0 or 1 for 72 * controller_id is the controller number, config type is 0 or 1 for
@@ -274,6 +264,7 @@ static void fixup_read_and_payload_sizes(void)
274 */ 264 */
275int __init pcibios_init(void) 265int __init pcibios_init(void)
276{ 266{
267 struct pci_host_bridge *bridge;
277 int i; 268 int i;
278 269
279 pr_info("PCI: Probing PCI hardware\n"); 270 pr_info("PCI: Probing PCI hardware\n");
@@ -306,16 +297,26 @@ int __init pcibios_init(void)
306 297
307 pci_add_resource(&resources, &ioport_resource); 298 pci_add_resource(&resources, &ioport_resource);
308 pci_add_resource(&resources, &iomem_resource); 299 pci_add_resource(&resources, &iomem_resource);
309 bus = pci_scan_root_bus(NULL, 0, controller->ops, 300
310 controller, &resources); 301 bridge = pci_alloc_host_bridge(0);
302 if (!bridge)
303 break;
304
305 list_splice_init(&resources, &bridge->windows);
306 bridge->dev.parent = NULL;
307 bridge->sysdata = controller;
308 bridge->busnr = 0;
309 bridge->ops = controller->ops;
310 bridge->swizzle_irq = pci_common_swizzle;
311 bridge->map_irq = tile_map_irq;
312
313 pci_scan_root_bus_bridge(bridge);
314 bus = bridge->bus;
311 controller->root_bus = bus; 315 controller->root_bus = bus;
312 controller->last_busno = bus->busn_res.end; 316 controller->last_busno = bus->busn_res.end;
313 } 317 }
314 } 318 }
315 319
316 /* Do machine dependent PCI interrupt routing */
317 pci_fixup_irqs(pci_common_swizzle, tile_map_irq);
318
319 /* 320 /*
320 * This comes from the generic Linux PCI driver. 321 * This comes from the generic Linux PCI driver.
321 * 322 *
@@ -369,14 +370,6 @@ int __init pcibios_init(void)
369} 370}
370subsys_initcall(pcibios_init); 371subsys_initcall(pcibios_init);
371 372
372/*
373 * No bus fixups needed.
374 */
375void pcibios_fixup_bus(struct pci_bus *bus)
376{
377 /* Nothing needs to be done. */
378}
379
380void pcibios_set_master(struct pci_dev *dev) 373void pcibios_set_master(struct pci_dev *dev)
381{ 374{
382 /* No special bus mastering setup handling. */ 375 /* No special bus mastering setup handling. */