diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-mapping.h | 13 | ||||
| -rw-r--r-- | include/linux/pci.h | 6 | ||||
| -rw-r--r-- | include/linux/types.h | 1 |
3 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index fd4aee29ad10..0c3eab1e39ac 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -8,6 +8,12 @@ | |||
| 8 | #include <linux/dma-direction.h> | 8 | #include <linux/dma-direction.h> |
| 9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
| 10 | 10 | ||
| 11 | /* | ||
| 12 | * A dma_addr_t can hold any valid DMA or bus address for the platform. | ||
| 13 | * It can be given to a device to use as a DMA source or target. A CPU cannot | ||
| 14 | * reference a dma_addr_t directly because there may be translation between | ||
| 15 | * its physical address space and the bus address space. | ||
| 16 | */ | ||
| 11 | struct dma_map_ops { | 17 | struct dma_map_ops { |
| 12 | void* (*alloc)(struct device *dev, size_t size, | 18 | void* (*alloc)(struct device *dev, size_t size, |
| 13 | dma_addr_t *dma_handle, gfp_t gfp, | 19 | dma_addr_t *dma_handle, gfp_t gfp, |
| @@ -186,7 +192,7 @@ static inline int dma_get_cache_alignment(void) | |||
| 186 | 192 | ||
| 187 | #ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | 193 | #ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY |
| 188 | static inline int | 194 | static inline int |
| 189 | dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 195 | dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, |
| 190 | dma_addr_t device_addr, size_t size, int flags) | 196 | dma_addr_t device_addr, size_t size, int flags) |
| 191 | { | 197 | { |
| 192 | return 0; | 198 | return 0; |
| @@ -217,13 +223,14 @@ extern void *dmam_alloc_noncoherent(struct device *dev, size_t size, | |||
| 217 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, | 223 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, |
| 218 | dma_addr_t dma_handle); | 224 | dma_addr_t dma_handle); |
| 219 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | 225 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY |
| 220 | extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 226 | extern int dmam_declare_coherent_memory(struct device *dev, |
| 227 | phys_addr_t phys_addr, | ||
| 221 | dma_addr_t device_addr, size_t size, | 228 | dma_addr_t device_addr, size_t size, |
| 222 | int flags); | 229 | int flags); |
| 223 | extern void dmam_release_declared_memory(struct device *dev); | 230 | extern void dmam_release_declared_memory(struct device *dev); |
| 224 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | 231 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ |
| 225 | static inline int dmam_declare_coherent_memory(struct device *dev, | 232 | static inline int dmam_declare_coherent_memory(struct device *dev, |
| 226 | dma_addr_t bus_addr, dma_addr_t device_addr, | 233 | phys_addr_t phys_addr, dma_addr_t device_addr, |
| 227 | size_t size, gfp_t gfp) | 234 | size_t size, gfp_t gfp) |
| 228 | { | 235 | { |
| 229 | return 0; | 236 | return 0; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index a95aac7ad37f..5dbd15422b55 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1158,7 +1158,6 @@ struct msix_entry { | |||
| 1158 | 1158 | ||
| 1159 | #ifdef CONFIG_PCI_MSI | 1159 | #ifdef CONFIG_PCI_MSI |
| 1160 | int pci_msi_vec_count(struct pci_dev *dev); | 1160 | int pci_msi_vec_count(struct pci_dev *dev); |
| 1161 | int pci_enable_msi_block(struct pci_dev *dev, int nvec); | ||
| 1162 | void pci_msi_shutdown(struct pci_dev *dev); | 1161 | void pci_msi_shutdown(struct pci_dev *dev); |
| 1163 | void pci_disable_msi(struct pci_dev *dev); | 1162 | void pci_disable_msi(struct pci_dev *dev); |
| 1164 | int pci_msix_vec_count(struct pci_dev *dev); | 1163 | int pci_msix_vec_count(struct pci_dev *dev); |
| @@ -1188,8 +1187,6 @@ static inline int pci_enable_msix_exact(struct pci_dev *dev, | |||
| 1188 | } | 1187 | } |
| 1189 | #else | 1188 | #else |
| 1190 | static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; } | 1189 | static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; } |
| 1191 | static inline int pci_enable_msi_block(struct pci_dev *dev, int nvec) | ||
| 1192 | { return -ENOSYS; } | ||
| 1193 | static inline void pci_msi_shutdown(struct pci_dev *dev) { } | 1190 | static inline void pci_msi_shutdown(struct pci_dev *dev) { } |
| 1194 | static inline void pci_disable_msi(struct pci_dev *dev) { } | 1191 | static inline void pci_disable_msi(struct pci_dev *dev) { } |
| 1195 | static inline int pci_msix_vec_count(struct pci_dev *dev) { return -ENOSYS; } | 1192 | static inline int pci_msix_vec_count(struct pci_dev *dev) { return -ENOSYS; } |
| @@ -1244,7 +1241,7 @@ static inline void pcie_set_ecrc_checking(struct pci_dev *dev) { } | |||
| 1244 | static inline void pcie_ecrc_get_policy(char *str) { } | 1241 | static inline void pcie_ecrc_get_policy(char *str) { } |
| 1245 | #endif | 1242 | #endif |
| 1246 | 1243 | ||
| 1247 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 1244 | #define pci_enable_msi(pdev) pci_enable_msi_exact(pdev, 1) |
| 1248 | 1245 | ||
| 1249 | #ifdef CONFIG_HT_IRQ | 1246 | #ifdef CONFIG_HT_IRQ |
| 1250 | /* The functions a driver should call */ | 1247 | /* The functions a driver should call */ |
| @@ -1572,7 +1569,6 @@ extern unsigned long pci_hotplug_io_size; | |||
| 1572 | extern unsigned long pci_hotplug_mem_size; | 1569 | extern unsigned long pci_hotplug_mem_size; |
| 1573 | 1570 | ||
| 1574 | /* Architecture-specific versions may override these (weak) */ | 1571 | /* Architecture-specific versions may override these (weak) */ |
| 1575 | int pcibios_add_platform_entries(struct pci_dev *dev); | ||
| 1576 | void pcibios_disable_device(struct pci_dev *dev); | 1572 | void pcibios_disable_device(struct pci_dev *dev); |
| 1577 | void pcibios_set_master(struct pci_dev *dev); | 1573 | void pcibios_set_master(struct pci_dev *dev); |
| 1578 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, | 1574 | int pcibios_set_pcie_reset_state(struct pci_dev *dev, |
diff --git a/include/linux/types.h b/include/linux/types.h index 4d118ba11349..a0bb7048687f 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
| @@ -142,6 +142,7 @@ typedef unsigned long blkcnt_t; | |||
| 142 | #define pgoff_t unsigned long | 142 | #define pgoff_t unsigned long |
| 143 | #endif | 143 | #endif |
| 144 | 144 | ||
| 145 | /* A dma_addr_t can hold any valid DMA or bus address for the platform */ | ||
| 145 | #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT | 146 | #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT |
| 146 | typedef u64 dma_addr_t; | 147 | typedef u64 dma_addr_t; |
| 147 | #else | 148 | #else |
