diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/dma-coherent.h | 32 | ||||
-rw-r--r-- | include/asm-generic/gpio.h | 1 | ||||
-rw-r--r-- | include/asm-generic/pgtable-nopmd.h | 6 |
3 files changed, 38 insertions, 1 deletions
diff --git a/include/asm-generic/dma-coherent.h b/include/asm-generic/dma-coherent.h new file mode 100644 index 000000000000..85a3ffaa0242 --- /dev/null +++ b/include/asm-generic/dma-coherent.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef DMA_COHERENT_H | ||
2 | #define DMA_COHERENT_H | ||
3 | |||
4 | #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT | ||
5 | /* | ||
6 | * These two functions are only for dma allocator. | ||
7 | * Don't use them in device drivers. | ||
8 | */ | ||
9 | int dma_alloc_from_coherent(struct device *dev, ssize_t size, | ||
10 | dma_addr_t *dma_handle, void **ret); | ||
11 | int dma_release_from_coherent(struct device *dev, int order, void *vaddr); | ||
12 | |||
13 | /* | ||
14 | * Standard interface | ||
15 | */ | ||
16 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
17 | extern int | ||
18 | dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
19 | dma_addr_t device_addr, size_t size, int flags); | ||
20 | |||
21 | extern void | ||
22 | dma_release_declared_memory(struct device *dev); | ||
23 | |||
24 | extern void * | ||
25 | dma_mark_declared_memory_occupied(struct device *dev, | ||
26 | dma_addr_t device_addr, size_t size); | ||
27 | #else | ||
28 | #define dma_alloc_from_coherent(dev, size, handle, ret) (0) | ||
29 | #define dma_release_from_coherent(dev, order, vaddr) (0) | ||
30 | #endif | ||
31 | |||
32 | #endif | ||
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index c764a8fcb058..0f99ad38b012 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_GENERIC_GPIO_H | 2 | #define _ASM_GENERIC_GPIO_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/errno.h> | ||
5 | 6 | ||
6 | #ifdef CONFIG_GPIOLIB | 7 | #ifdef CONFIG_GPIOLIB |
7 | 8 | ||
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index 087325ede76c..a7cdc48e8b78 100644 --- a/include/asm-generic/pgtable-nopmd.h +++ b/include/asm-generic/pgtable-nopmd.h | |||
@@ -5,6 +5,8 @@ | |||
5 | 5 | ||
6 | #include <asm-generic/pgtable-nopud.h> | 6 | #include <asm-generic/pgtable-nopud.h> |
7 | 7 | ||
8 | struct mm_struct; | ||
9 | |||
8 | #define __PAGETABLE_PMD_FOLDED | 10 | #define __PAGETABLE_PMD_FOLDED |
9 | 11 | ||
10 | /* | 12 | /* |
@@ -54,7 +56,9 @@ static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address) | |||
54 | * inside the pud, so has no extra memory associated with it. | 56 | * inside the pud, so has no extra memory associated with it. |
55 | */ | 57 | */ |
56 | #define pmd_alloc_one(mm, address) NULL | 58 | #define pmd_alloc_one(mm, address) NULL |
57 | #define pmd_free(mm, x) do { } while (0) | 59 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
60 | { | ||
61 | } | ||
58 | #define __pmd_free_tlb(tlb, x) do { } while (0) | 62 | #define __pmd_free_tlb(tlb, x) do { } while (0) |
59 | 63 | ||
60 | #undef pmd_addr_end | 64 | #undef pmd_addr_end |