diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/x86/include/asm/dma.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/x86/include/asm/dma.h')
-rw-r--r-- | arch/x86/include/asm/dma.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h index ca1098a7e580..0bdb0c54d9a1 100644 --- a/arch/x86/include/asm/dma.h +++ b/arch/x86/include/asm/dma.h | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/spinlock.h> /* And spinlocks */ | 11 | #include <linux/spinlock.h> /* And spinlocks */ |
12 | #include <asm/io.h> /* need byte IO */ | 12 | #include <asm/io.h> /* need byte IO */ |
13 | #include <linux/delay.h> | ||
14 | 13 | ||
15 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER | 14 | #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER |
16 | #define dma_outb outb_p | 15 | #define dma_outb outb_p |
@@ -70,22 +69,18 @@ | |||
70 | 69 | ||
71 | #define MAX_DMA_CHANNELS 8 | 70 | #define MAX_DMA_CHANNELS 8 |
72 | 71 | ||
73 | #ifdef CONFIG_X86_32 | ||
74 | |||
75 | /* The maximum address that we can perform a DMA transfer to on this platform */ | ||
76 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x1000000) | ||
77 | |||
78 | #else | ||
79 | |||
80 | /* 16MB ISA DMA zone */ | 72 | /* 16MB ISA DMA zone */ |
81 | #define MAX_DMA_PFN ((16 * 1024 * 1024) >> PAGE_SHIFT) | 73 | #define MAX_DMA_PFN ((16 * 1024 * 1024) >> PAGE_SHIFT) |
82 | 74 | ||
83 | /* 4GB broken PCI/AGP hardware bus master zone */ | 75 | /* 4GB broken PCI/AGP hardware bus master zone */ |
84 | #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) | 76 | #define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) |
85 | 77 | ||
78 | #ifdef CONFIG_X86_32 | ||
79 | /* The maximum address that we can perform a DMA transfer to on this platform */ | ||
80 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x1000000) | ||
81 | #else | ||
86 | /* Compat define for old dma zone */ | 82 | /* Compat define for old dma zone */ |
87 | #define MAX_DMA_ADDRESS ((unsigned long)__va(MAX_DMA_PFN << PAGE_SHIFT)) | 83 | #define MAX_DMA_ADDRESS ((unsigned long)__va(MAX_DMA_PFN << PAGE_SHIFT)) |
88 | |||
89 | #endif | 84 | #endif |
90 | 85 | ||
91 | /* 8237 DMA controllers */ | 86 | /* 8237 DMA controllers */ |
@@ -151,6 +146,7 @@ | |||
151 | #define DMA_AUTOINIT 0x10 | 146 | #define DMA_AUTOINIT 0x10 |
152 | 147 | ||
153 | 148 | ||
149 | #ifdef CONFIG_ISA_DMA_API | ||
154 | extern spinlock_t dma_spin_lock; | 150 | extern spinlock_t dma_spin_lock; |
155 | 151 | ||
156 | static inline unsigned long claim_dma_lock(void) | 152 | static inline unsigned long claim_dma_lock(void) |
@@ -164,6 +160,7 @@ static inline void release_dma_lock(unsigned long flags) | |||
164 | { | 160 | { |
165 | spin_unlock_irqrestore(&dma_spin_lock, flags); | 161 | spin_unlock_irqrestore(&dma_spin_lock, flags); |
166 | } | 162 | } |
163 | #endif /* CONFIG_ISA_DMA_API */ | ||
167 | 164 | ||
168 | /* enable/disable a specific DMA channel */ | 165 | /* enable/disable a specific DMA channel */ |
169 | static inline void enable_dma(unsigned int dmanr) | 166 | static inline void enable_dma(unsigned int dmanr) |
@@ -303,9 +300,11 @@ static inline int get_dma_residue(unsigned int dmanr) | |||
303 | } | 300 | } |
304 | 301 | ||
305 | 302 | ||
306 | /* These are in kernel/dma.c: */ | 303 | /* These are in kernel/dma.c because x86 uses CONFIG_GENERIC_ISA_DMA */ |
304 | #ifdef CONFIG_ISA_DMA_API | ||
307 | extern int request_dma(unsigned int dmanr, const char *device_id); | 305 | extern int request_dma(unsigned int dmanr, const char *device_id); |
308 | extern void free_dma(unsigned int dmanr); | 306 | extern void free_dma(unsigned int dmanr); |
307 | #endif | ||
309 | 308 | ||
310 | /* From PCI */ | 309 | /* From PCI */ |
311 | 310 | ||