diff options
Diffstat (limited to 'arch/microblaze/include/asm/pci-bridge.h')
-rw-r--r-- | arch/microblaze/include/asm/pci-bridge.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/microblaze/include/asm/pci-bridge.h b/arch/microblaze/include/asm/pci-bridge.h index 0c68764ab547..10717669e0c2 100644 --- a/arch/microblaze/include/asm/pci-bridge.h +++ b/arch/microblaze/include/asm/pci-bridge.h | |||
@@ -104,11 +104,22 @@ struct pci_controller { | |||
104 | int global_number; /* PCI domain number */ | 104 | int global_number; /* PCI domain number */ |
105 | }; | 105 | }; |
106 | 106 | ||
107 | #ifdef CONFIG_PCI | ||
107 | static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) | 108 | static inline struct pci_controller *pci_bus_to_host(const struct pci_bus *bus) |
108 | { | 109 | { |
109 | return bus->sysdata; | 110 | return bus->sysdata; |
110 | } | 111 | } |
111 | 112 | ||
113 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | ||
114 | { | ||
115 | struct pci_controller *host; | ||
116 | |||
117 | if (bus->self) | ||
118 | return pci_device_to_OF_node(bus->self); | ||
119 | host = pci_bus_to_host(bus); | ||
120 | return host ? host->dn : NULL; | ||
121 | } | ||
122 | |||
112 | static inline int isa_vaddr_is_ioport(void __iomem *address) | 123 | static inline int isa_vaddr_is_ioport(void __iomem *address) |
113 | { | 124 | { |
114 | /* No specific ISA handling on ppc32 at this stage, it | 125 | /* No specific ISA handling on ppc32 at this stage, it |
@@ -116,6 +127,7 @@ static inline int isa_vaddr_is_ioport(void __iomem *address) | |||
116 | */ | 127 | */ |
117 | return 0; | 128 | return 0; |
118 | } | 129 | } |
130 | #endif /* CONFIG_PCI */ | ||
119 | 131 | ||
120 | /* These are used for config access before all the PCI probing | 132 | /* These are used for config access before all the PCI probing |
121 | has been done. */ | 133 | has been done. */ |