aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/pci/pci-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/pci/pci-common.c')
-rw-r--r--arch/microblaze/pci/pci-common.c24
1 files changed, 4 insertions, 20 deletions
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}
61EXPORT_SYMBOL(get_pci_dma_ops); 62EXPORT_SYMBOL(get_pci_dma_ops);
62 63
63int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
64{
65 return dma_set_mask(&dev->dev, mask);
66}
67
68int 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
78struct pci_controller *pcibios_alloc_controller(struct device_node *dev) 64struct 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);