aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r--arch/powerpc/kernel/pci-common.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 9021c4ad4bbd..893af2a9cd03 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -22,6 +22,7 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24#include <linux/of_address.h> 24#include <linux/of_address.h>
25#include <linux/of_pci.h>
25#include <linux/mm.h> 26#include <linux/mm.h>
26#include <linux/list.h> 27#include <linux/list.h>
27#include <linux/syscalls.h> 28#include <linux/syscalls.h>
@@ -260,7 +261,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
260 261
261 virq = irq_create_mapping(NULL, line); 262 virq = irq_create_mapping(NULL, line);
262 if (virq != NO_IRQ) 263 if (virq != NO_IRQ)
263 set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); 264 irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
264 } else { 265 } else {
265 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", 266 pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n",
266 oirq.size, oirq.specifier[0], oirq.specifier[1], 267 oirq.size, oirq.specifier[0], oirq.specifier[1],
@@ -1090,8 +1091,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1090 bus->number, bus->self ? pci_name(bus->self) : "PHB"); 1091 bus->number, bus->self ? pci_name(bus->self) : "PHB");
1091 1092
1092 list_for_each_entry(dev, &bus->devices, bus_list) { 1093 list_for_each_entry(dev, &bus->devices, bus_list) {
1093 struct dev_archdata *sd = &dev->dev.archdata;
1094
1095 /* Cardbus can call us to add new devices to a bus, so ignore 1094 /* Cardbus can call us to add new devices to a bus, so ignore
1096 * those who are already fully discovered 1095 * those who are already fully discovered
1097 */ 1096 */
@@ -1107,7 +1106,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1107 set_dev_node(&dev->dev, pcibus_to_node(dev->bus)); 1106 set_dev_node(&dev->dev, pcibus_to_node(dev->bus));
1108 1107
1109 /* Hook up default DMA ops */ 1108 /* Hook up default DMA ops */
1110 sd->dma_ops = pci_dma_ops; 1109 set_dma_ops(&dev->dev, pci_dma_ops);
1111 set_dma_offset(&dev->dev, PCI_DRAM_OFFSET); 1110 set_dma_offset(&dev->dev, PCI_DRAM_OFFSET);
1112 1111
1113 /* Additional platform DMA/iommu setup */ 1112 /* Additional platform DMA/iommu setup */
@@ -1689,13 +1688,8 @@ int early_find_capability(struct pci_controller *hose, int bus, int devfn,
1689/** 1688/**
1690 * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus 1689 * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus
1691 * @hose: Pointer to the PCI host controller instance structure 1690 * @hose: Pointer to the PCI host controller instance structure
1692 * @sysdata: value to use for sysdata pointer. ppc32 and ppc64 differ here
1693 *
1694 * Note: the 'data' pointer is a temporary measure. As 32 and 64 bit
1695 * pci code gets merged, this parameter should become unnecessary because
1696 * both will use the same value.
1697 */ 1691 */
1698void __devinit pcibios_scan_phb(struct pci_controller *hose, void *sysdata) 1692void __devinit pcibios_scan_phb(struct pci_controller *hose)
1699{ 1693{
1700 struct pci_bus *bus; 1694 struct pci_bus *bus;
1701 struct device_node *node = hose->dn; 1695 struct device_node *node = hose->dn;
@@ -1705,13 +1699,13 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose, void *sysdata)
1705 node ? node->full_name : "<NO NAME>"); 1699 node ? node->full_name : "<NO NAME>");
1706 1700
1707 /* Create an empty bus for the toplevel */ 1701 /* Create an empty bus for the toplevel */
1708 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, 1702 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, hose);
1709 sysdata);
1710 if (bus == NULL) { 1703 if (bus == NULL) {
1711 pr_err("Failed to create bus for PCI domain %04x\n", 1704 pr_err("Failed to create bus for PCI domain %04x\n",
1712 hose->global_number); 1705 hose->global_number);
1713 return; 1706 return;
1714 } 1707 }
1708 bus->dev.of_node = of_node_get(node);
1715 bus->secondary = hose->first_busno; 1709 bus->secondary = hose->first_busno;
1716 hose->bus = bus; 1710 hose->bus = bus;
1717 1711