diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-13 07:53:34 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-13 07:53:34 +0900 |
commit | 163ec0369be4c26e68385f6cec88d0ee38c8d8e5 (patch) | |
tree | f3e441866f8bc1b0548e7d8eddd9548b6aedef5e /arch/arm/plat-omap/dma.c | |
parent | 199642bfe107c411f25fbfc16c9fd49cfef9785d (diff) | |
parent | 99dbdd98f271899e023d52b3f4c2bf67cdd7eb56 (diff) |
Merge branch 'next/cleanup-plat-s3c24xx' into next/cleanup-plat-s3c24xx-s5p
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index ecdb3da0dea..c58d896cd5c 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -916,6 +916,13 @@ void omap_start_dma(int lch) l |= OMAP_DMA_CCR_BUFFERING_DISABLE; l |= OMAP_DMA_CCR_EN; + /* + * As dma_write() uses IO accessors which are weakly ordered, there + * is no guarantee that data in coherent DMA memory will be visible + * to the DMA device. Add a memory barrier here to ensure that any + * such data is visible prior to enabling DMA. + */ + mb(); p->dma_write(l, CCR, lch); dma_chan[lch].flags |= OMAP_DMA_ACTIVE; @@ -965,6 +972,13 @@ void omap_stop_dma(int lch) p->dma_write(l, CCR, lch); } + /* + * Ensure that data transferred by DMA is visible to any access + * after DMA has been disabled. This is important for coherent + * DMA regions. + */ + mb(); + if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { int next_lch, cur_lch = lch; char dma_chan_link_map[dma_lch_count]; |