diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-08-28 21:45:58 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-09-03 15:34:28 -0400 |
commit | 0cb162a76b16d58250a33e817af6a763e89a770a (patch) | |
tree | af5ac50c1ec59f665e0a4845672a16d758b44953 /firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c | |
parent | 1ae8213a64c23ac86173b8139e01c7cad350ec6b (diff) | |
download | rockbox-0cb162a76b16d58250a33e817af6a763e89a770a.tar.gz rockbox-0cb162a76b16d58250a33e817af6a763e89a770a.zip |
mips: Heavily rework DMA & caching code
Based on code originally written by Amaury Pouly (g#1789, g#1791, g#1527)
but rebased and heavily updated.
Change-Id: Ic794abb5e8d89feb4b88fc3abe854270fb28db70
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c b/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c index 39df037f76..59b086e4f8 100644 --- a/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c +++ b/firmware/target/mips/ingenic_jz47xx/pcm-jz4760.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "pcm-internal.h" | 28 | #include "pcm-internal.h" |
29 | #include "cpu.h" | 29 | #include "cpu.h" |
30 | 30 | ||
31 | |||
32 | /**************************************************************************** | 31 | /**************************************************************************** |
33 | ** Playback DMA transfer | 32 | ** Playback DMA transfer |
34 | **/ | 33 | **/ |
@@ -60,8 +59,8 @@ static inline void set_dma(const void *addr, size_t size) | |||
60 | int burst_size; | 59 | int burst_size; |
61 | logf("%x %d %x", (unsigned int)addr, size, REG_AIC_SR); | 60 | logf("%x %d %x", (unsigned int)addr, size, REG_AIC_SR); |
62 | 61 | ||
63 | dma_cache_wback_inv((unsigned long)addr, size); | 62 | commit_discard_dcache_range(addr, size); |
64 | 63 | ||
65 | if(size % 16) | 64 | if(size % 16) |
66 | { | 65 | { |
67 | if(size % 4) | 66 | if(size % 4) |