diff options
Diffstat (limited to 'arch/microblaze/pci')
-rw-r--r-- | arch/microblaze/pci/indirect_pci.c | 2 | ||||
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 24 | ||||
-rw-r--r-- | arch/microblaze/pci/pci_32.c | 1 |
3 files changed, 6 insertions, 21 deletions
diff --git a/arch/microblaze/pci/indirect_pci.c b/arch/microblaze/pci/indirect_pci.c index 25f18f017f21..4196eb6bd764 100644 --- a/arch/microblaze/pci/indirect_pci.c +++ b/arch/microblaze/pci/indirect_pci.c | |||
@@ -108,7 +108,7 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
108 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | | 108 | out_le32(hose->cfg_addr, (0x80000000 | (bus_no << 16) | |
109 | (devfn << 8) | reg | cfg_type)); | 109 | (devfn << 8) | reg | cfg_type)); |
110 | 110 | ||
111 | /* surpress setting of PCI_PRIMARY_BUS */ | 111 | /* suppress setting of PCI_PRIMARY_BUS */ |
112 | if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) | 112 | if (hose->indirect_type & INDIRECT_TYPE_SURPRESS_PRIMARY_BUS) |
113 | if ((offset == PCI_PRIMARY_BUS) && | 113 | if ((offset == PCI_PRIMARY_BUS) && |
114 | (bus->number == hose->first_busno)) | 114 | (bus->number == hose->first_busno)) |
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 55ef532f32be..53599067d2f9 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/of.h> | 30 | #include <linux/of.h> |
31 | #include <linux/of_address.h> | 31 | #include <linux/of_address.h> |
32 | #include <linux/of_pci.h> | ||
32 | 33 | ||
33 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
@@ -60,21 +61,6 @@ struct dma_map_ops *get_pci_dma_ops(void) | |||
60 | } | 61 | } |
61 | EXPORT_SYMBOL(get_pci_dma_ops); | 62 | EXPORT_SYMBOL(get_pci_dma_ops); |
62 | 63 | ||
63 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
64 | { | ||
65 | return dma_set_mask(&dev->dev, mask); | ||
66 | } | ||
67 | |||
68 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
69 | { | ||
70 | int rc; | ||
71 | |||
72 | rc = dma_set_mask(&dev->dev, mask); | ||
73 | dev->dev.coherent_dma_mask = dev->dma_mask; | ||
74 | |||
75 | return rc; | ||
76 | } | ||
77 | |||
78 | struct pci_controller *pcibios_alloc_controller(struct device_node *dev) | 64 | struct pci_controller *pcibios_alloc_controller(struct device_node *dev) |
79 | { | 65 | { |
80 | struct pci_controller *phb; | 66 | struct pci_controller *phb; |
@@ -251,7 +237,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
251 | 237 | ||
252 | virq = irq_create_mapping(NULL, line); | 238 | virq = irq_create_mapping(NULL, line); |
253 | if (virq != NO_IRQ) | 239 | if (virq != NO_IRQ) |
254 | set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 240 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
255 | } else { | 241 | } else { |
256 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 242 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
257 | oirq.size, oirq.specifier[0], oirq.specifier[1], | 243 | oirq.size, oirq.specifier[0], oirq.specifier[1], |
@@ -1075,8 +1061,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) | |||
1075 | bus->number, bus->self ? pci_name(bus->self) : "PHB"); | 1061 | bus->number, bus->self ? pci_name(bus->self) : "PHB"); |
1076 | 1062 | ||
1077 | list_for_each_entry(dev, &bus->devices, bus_list) { | 1063 | list_for_each_entry(dev, &bus->devices, bus_list) { |
1078 | struct dev_archdata *sd = &dev->dev.archdata; | ||
1079 | |||
1080 | /* Setup OF node pointer in archdata */ | 1064 | /* Setup OF node pointer in archdata */ |
1081 | dev->dev.of_node = pci_device_to_OF_node(dev); | 1065 | dev->dev.of_node = pci_device_to_OF_node(dev); |
1082 | 1066 | ||
@@ -1086,8 +1070,8 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) | |||
1086 | set_dev_node(&dev->dev, pcibus_to_node(dev->bus)); | 1070 | set_dev_node(&dev->dev, pcibus_to_node(dev->bus)); |
1087 | 1071 | ||
1088 | /* Hook up default DMA ops */ | 1072 | /* Hook up default DMA ops */ |
1089 | sd->dma_ops = pci_dma_ops; | 1073 | set_dma_ops(&dev->dev, pci_dma_ops); |
1090 | sd->dma_data = (void *)PCI_DRAM_OFFSET; | 1074 | dev->dev.archdata.dma_data = (void *)PCI_DRAM_OFFSET; |
1091 | 1075 | ||
1092 | /* Read default IRQs and fixup if necessary */ | 1076 | /* Read default IRQs and fixup if necessary */ |
1093 | pci_read_irq_line(dev); | 1077 | pci_read_irq_line(dev); |
diff --git a/arch/microblaze/pci/pci_32.c b/arch/microblaze/pci/pci_32.c index 3c3d808d7ce0..92728a6cfd80 100644 --- a/arch/microblaze/pci/pci_32.c +++ b/arch/microblaze/pci/pci_32.c | |||
@@ -332,6 +332,7 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
332 | hose->global_number); | 332 | hose->global_number); |
333 | return; | 333 | return; |
334 | } | 334 | } |
335 | bus.dev->of_node = of_node_get(node); | ||
335 | bus->secondary = hose->first_busno; | 336 | bus->secondary = hose->first_busno; |
336 | hose->bus = bus; | 337 | hose->bus = bus; |
337 | 338 | ||