diff options
Diffstat (limited to 'include/asm-mips/pci.h')
-rw-r--r-- | include/asm-mips/pci.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index c9a00ca1c012..6c9ad8171a77 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -40,6 +40,11 @@ struct pci_controller { | |||
40 | unsigned int need_domain_info; | 40 | unsigned int need_domain_info; |
41 | 41 | ||
42 | int iommu; | 42 | int iommu; |
43 | |||
44 | /* Optional access methods for reading/writing the bus number | ||
45 | of the PCI controller */ | ||
46 | int (*get_busno)(void); | ||
47 | void (*set_busno)(int busno); | ||
43 | }; | 48 | }; |
44 | 49 | ||
45 | /* | 50 | /* |
@@ -142,8 +147,22 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
142 | 147 | ||
143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 148 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
144 | struct pci_bus_region *region, struct resource *res); | 149 | struct pci_bus_region *region, struct resource *res); |
145 | extern void pcibios_bus_to_resource(struct pci_dev *dev, | 150 | |
146 | struct resource *res, struct pci_bus_region *region); | 151 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
152 | struct pci_bus_region *region); | ||
153 | |||
154 | static inline struct resource * | ||
155 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
156 | { | ||
157 | struct resource *root = NULL; | ||
158 | |||
159 | if (res->flags & IORESOURCE_IO) | ||
160 | root = &ioport_resource; | ||
161 | if (res->flags & IORESOURCE_MEM) | ||
162 | root = &iomem_resource; | ||
163 | |||
164 | return root; | ||
165 | } | ||
147 | 166 | ||
148 | #ifdef CONFIG_PCI_DOMAINS | 167 | #ifdef CONFIG_PCI_DOMAINS |
149 | 168 | ||
@@ -169,17 +188,4 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |||
169 | /* Do platform specific device initialization at pci_enable_device() time */ | 188 | /* Do platform specific device initialization at pci_enable_device() time */ |
170 | extern int pcibios_plat_dev_init(struct pci_dev *dev); | 189 | extern int pcibios_plat_dev_init(struct pci_dev *dev); |
171 | 190 | ||
172 | static inline struct resource * | ||
173 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
174 | { | ||
175 | struct resource *root = NULL; | ||
176 | |||
177 | if (res->flags & IORESOURCE_IO) | ||
178 | root = &ioport_resource; | ||
179 | if (res->flags & IORESOURCE_MEM) | ||
180 | root = &iomem_resource; | ||
181 | |||
182 | return root; | ||
183 | } | ||
184 | |||
185 | #endif /* _ASM_PCI_H */ | 191 | #endif /* _ASM_PCI_H */ |