diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-06 13:13:54 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-06 13:13:54 -0400 |
commit | 11e4afb49b7fa1fc8e1ffd850c1806dd86a08204 (patch) | |
tree | 9e57efcb106ae912f7bec718feb3f8ec607559bb /arch/powerpc/kernel/dma.c | |
parent | 162500b3a3ff39d941d29db49b41a16667ae44f0 (diff) | |
parent | 9b2a606d3898fcb2eedb6faded3bb37549590ac4 (diff) |
Merge branches 'gemini' and 'misc' into devel
Diffstat (limited to 'arch/powerpc/kernel/dma.c')
-rw-r--r-- | arch/powerpc/kernel/dma.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 6215062caf8c..84d6367ec003 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -8,7 +8,8 @@ | |||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/dma-debug.h> | 10 | #include <linux/dma-debug.h> |
11 | #include <linux/lmb.h> | 11 | #include <linux/gfp.h> |
12 | #include <linux/memblock.h> | ||
12 | #include <asm/bug.h> | 13 | #include <asm/bug.h> |
13 | #include <asm/abs_addr.h> | 14 | #include <asm/abs_addr.h> |
14 | 15 | ||
@@ -88,7 +89,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask) | |||
88 | /* Could be improved so platforms can set the limit in case | 89 | /* Could be improved so platforms can set the limit in case |
89 | * they have limited DMA windows | 90 | * they have limited DMA windows |
90 | */ | 91 | */ |
91 | return mask >= (lmb_end_of_DRAM() - 1); | 92 | return mask >= (memblock_end_of_DRAM() - 1); |
92 | #else | 93 | #else |
93 | return 1; | 94 | return 1; |
94 | #endif | 95 | #endif |
@@ -126,11 +127,11 @@ static inline void dma_direct_sync_sg(struct device *dev, | |||
126 | __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction); | 127 | __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction); |
127 | } | 128 | } |
128 | 129 | ||
129 | static inline void dma_direct_sync_single_range(struct device *dev, | 130 | static inline void dma_direct_sync_single(struct device *dev, |
130 | dma_addr_t dma_handle, unsigned long offset, size_t size, | 131 | dma_addr_t dma_handle, size_t size, |
131 | enum dma_data_direction direction) | 132 | enum dma_data_direction direction) |
132 | { | 133 | { |
133 | __dma_sync(bus_to_virt(dma_handle+offset), size, direction); | 134 | __dma_sync(bus_to_virt(dma_handle), size, direction); |
134 | } | 135 | } |
135 | #endif | 136 | #endif |
136 | 137 | ||
@@ -143,8 +144,8 @@ struct dma_map_ops dma_direct_ops = { | |||
143 | .map_page = dma_direct_map_page, | 144 | .map_page = dma_direct_map_page, |
144 | .unmap_page = dma_direct_unmap_page, | 145 | .unmap_page = dma_direct_unmap_page, |
145 | #ifdef CONFIG_NOT_COHERENT_CACHE | 146 | #ifdef CONFIG_NOT_COHERENT_CACHE |
146 | .sync_single_range_for_cpu = dma_direct_sync_single_range, | 147 | .sync_single_for_cpu = dma_direct_sync_single, |
147 | .sync_single_range_for_device = dma_direct_sync_single_range, | 148 | .sync_single_for_device = dma_direct_sync_single, |
148 | .sync_sg_for_cpu = dma_direct_sync_sg, | 149 | .sync_sg_for_cpu = dma_direct_sync_sg, |
149 | .sync_sg_for_device = dma_direct_sync_sg, | 150 | .sync_sg_for_device = dma_direct_sync_sg, |
150 | #endif | 151 | #endif |