of/pci: move of_irq_map_pci() into generic code
[deliverable/linux.git] / arch / microblaze / include / asm / pci-bridge.h
index 0c68764ab547ea938f2e5210d37f27fd597b4b23..10717669e0c2eca271a67ee032532d8ee0311e20 100644 (file)
@@ -104,11 +104,22 @@ struct pci_controller {
        int global_number;      /* PCI domain number */
 };
 
+#ifdef CONFIG_PCI
 static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus)
 {
        return bus->sysdata;
 }
 
+static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
+{
+       struct pci_controller *host;
+
+       if (bus->self)
+               return pci_device_to_OF_node(bus->self);
+       host = pci_bus_to_host(bus);
+       return host ? host->dn : NULL;
+}
+
 static inline int isa_vaddr_is_ioport(void __iomem *address)
 {
        /* No specific ISA handling on ppc32 at this stage, it
@@ -116,6 +127,7 @@ static inline int isa_vaddr_is_ioport(void __iomem *address)
         */
        return 0;
 }
+#endif /* CONFIG_PCI */
 
 /* These are used for config access before all the PCI probing
    has been done. */
This page took 0.023898 seconds and 5 git commands to generate.