diff options
author | Michal Simek <monstr@monstr.eu> | 2010-02-09 03:25:08 -0500 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2010-03-11 08:10:02 -0500 |
commit | dcbae4be907488df5e1cc8a89b7df1a0565c257c (patch) | |
tree | b0c9eb8f524e98c87f029e9b0d400ed261f59b29 /arch/microblaze/kernel/dma.c | |
parent | 4c912c1a33abb67aefecb5ed8bd73d91887c4977 (diff) |
microblaze: Preliminary support for dma drivers
I found several problems for ll_temac driver and on system with WB.
This early fix should fix it. I will clean this patch before I will add
it to mainline
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/dma.c')
-rw-r--r-- | arch/microblaze/kernel/dma.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c index f230a8de0bcd..fbe1e8184eff 100644 --- a/arch/microblaze/kernel/dma.c +++ b/arch/microblaze/kernel/dma.c | |||
@@ -20,18 +20,15 @@ | |||
20 | * can set archdata.dma_data to an unsigned long holding the offset. By | 20 | * can set archdata.dma_data to an unsigned long holding the offset. By |
21 | * default the offset is PCI_DRAM_OFFSET. | 21 | * default the offset is PCI_DRAM_OFFSET. |
22 | */ | 22 | */ |
23 | 23 | static inline void __dma_sync_page(unsigned long paddr, unsigned long offset, | |
24 | static inline void __dma_sync_page(void *paddr, unsigned long offset, | ||
25 | size_t size, enum dma_data_direction direction) | 24 | size_t size, enum dma_data_direction direction) |
26 | { | 25 | { |
27 | unsigned long start = (unsigned long)paddr; | ||
28 | |||
29 | switch (direction) { | 26 | switch (direction) { |
30 | case DMA_TO_DEVICE: | 27 | case DMA_TO_DEVICE: |
31 | flush_dcache_range(start + offset, start + offset + size); | 28 | flush_dcache_range(paddr + offset, paddr + offset + size); |
32 | break; | 29 | break; |
33 | case DMA_FROM_DEVICE: | 30 | case DMA_FROM_DEVICE: |
34 | invalidate_dcache_range(start + offset, start + offset + size); | 31 | invalidate_dcache_range(paddr + offset, paddr + offset + size); |
35 | break; | 32 | break; |
36 | default: | 33 | default: |
37 | BUG(); | 34 | BUG(); |