Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299875
b: refs/heads/master
c: 3545358
h: refs/heads/master
i:
  299873: 0b9977c
  299871: 283fc4a
v: v3
  • Loading branch information
Russell King committed Apr 23, 2012
1 parent ba9d47f commit 727b344
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 754aba436bed2051deaa2af7bdda553df056b6fc
refs/heads/master: 354535845ffb74d8a4827fbdaa493037d0030eea
14 changes: 14 additions & 0 deletions trunk/arch/arm/plat-omap/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 727b344

Please sign in to comment.