Blackfin SPI Driver: tweak magic spi dma sequence to get it working on BF54x
authorMike Frysinger <[email protected]>
Tue, 7 Apr 2009 02:00:43 +0000 (19:00 -0700)
committerLinus Torvalds <[email protected]>
Tue, 7 Apr 2009 15:31:06 +0000 (08:31 -0700)
Without this change, SPI DMA is not reliably under stress tests.
Obiviously it's a hardware issue which is not addressed by any document.

Signed-off-by: Mike Frysinger <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/spi/spi_bfin5xx.c

index e706de1d10c840ee6d8730cd12eec15c3ee1704f..317731a9cd6ddb56ce1f234eeb8883dd16c0572d 100644 (file)
@@ -862,8 +862,9 @@ static void pump_transfers(unsigned long data)
                set_dma_start_addr(drv_data->dma_channel, dma_start_addr);
                set_dma_config(drv_data->dma_channel, dma_config);
                local_irq_save(flags);
-               enable_dma(drv_data->dma_channel);
+               SSYNC();
                write_CTRL(drv_data, cr);
+               enable_dma(drv_data->dma_channel);
                dma_enable_irq(drv_data->dma_channel);
                local_irq_restore(flags);