diff options
Diffstat (limited to 'include/asm-mips/pci.h')
-rw-r--r-- | include/asm-mips/pci.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index d70dc355c1f3..c9a00ca1c012 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -94,7 +94,7 @@ struct pci_dev; | |||
94 | */ | 94 | */ |
95 | extern unsigned int PCI_DMA_BUS_IS_PHYS; | 95 | extern unsigned int PCI_DMA_BUS_IS_PHYS; |
96 | 96 | ||
97 | #ifdef CONFIG_MAPPED_DMA_IO | 97 | #ifdef CONFIG_DMA_NEED_PCI_MAP_STATE |
98 | 98 | ||
99 | /* pci_unmap_{single,page} is not a nop, thus... */ | 99 | /* pci_unmap_{single,page} is not a nop, thus... */ |
100 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; | 100 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; |
@@ -104,7 +104,7 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
104 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | 104 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) |
105 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | 105 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) |
106 | 106 | ||
107 | #else /* CONFIG_MAPPED_DMA_IO */ | 107 | #else /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
108 | 108 | ||
109 | /* pci_unmap_{page,single} is a nop so... */ | 109 | /* pci_unmap_{page,single} is a nop so... */ |
110 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | 110 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) |
@@ -114,7 +114,7 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
114 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 114 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
115 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 115 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
116 | 116 | ||
117 | #endif /* CONFIG_MAPPED_DMA_IO */ | 117 | #endif /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
118 | 118 | ||
119 | /* This is always fine. */ | 119 | /* This is always fine. */ |
120 | #define pci_dac_dma_supported(pci_dev, mask) (1) | 120 | #define pci_dac_dma_supported(pci_dev, mask) (1) |
@@ -142,6 +142,8 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
142 | 142 | ||
143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
144 | struct pci_bus_region *region, struct resource *res); | 144 | struct pci_bus_region *region, struct resource *res); |
145 | extern void pcibios_bus_to_resource(struct pci_dev *dev, | ||
146 | struct resource *res, struct pci_bus_region *region); | ||
145 | 147 | ||
146 | #ifdef CONFIG_PCI_DOMAINS | 148 | #ifdef CONFIG_PCI_DOMAINS |
147 | 149 | ||
@@ -167,4 +169,17 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |||
167 | /* Do platform specific device initialization at pci_enable_device() time */ | 169 | /* Do platform specific device initialization at pci_enable_device() time */ |
168 | extern int pcibios_plat_dev_init(struct pci_dev *dev); | 170 | extern int pcibios_plat_dev_init(struct pci_dev *dev); |
169 | 171 | ||
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 | |||
170 | #endif /* _ASM_PCI_H */ | 185 | #endif /* _ASM_PCI_H */ |