diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2009-02-04 03:49:45 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-02-04 03:49:45 -0500 |
commit | 41245ac5952e5b05e6fbb7c188eae0947f640189 (patch) | |
tree | deb8cb8ec3c712a6e0c9745197d22899440176c3 | |
parent | c6bbd8ac54742f657bd223e03b5b70e73ba092cd (diff) |
Blackfin arch: fix bug - Dmacopy failed in BF537-STAMP
Dmacopy failed in BF537-STAMP when copy from SRAM to SDRAM and kernel
will reboot automatically.
Fixing by doing a SSYNC before mucking with DMA registers
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r-- | arch/blackfin/kernel/bfin_dma_5xx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 07e02c0d1c07..8531693fb48d 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -249,6 +249,13 @@ static void __dma_memcpy(u32 daddr, s16 dmod, u32 saddr, s16 smod, size_t cnt, u | |||
249 | 249 | ||
250 | spin_lock_irqsave(&mdma_lock, flags); | 250 | spin_lock_irqsave(&mdma_lock, flags); |
251 | 251 | ||
252 | /* Force a sync in case a previous config reset on this channel | ||
253 | * occurred. This is needed so subsequent writes to DMA registers | ||
254 | * are not spuriously lost/corrupted. Do it under irq lock and | ||
255 | * without the anomaly version (because we are atomic already). | ||
256 | */ | ||
257 | __builtin_bfin_ssync(); | ||
258 | |||
252 | if (bfin_read_MDMA_S0_CONFIG()) | 259 | if (bfin_read_MDMA_S0_CONFIG()) |
253 | while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) | 260 | while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) |
254 | continue; | 261 | continue; |