fix r26953: use physical address for DMA buffer, also for IRAM
AMSv2 and AMSv1 lowmem put the codec buffer in IRAM so we need to adjust the address : AS3525_PHYSICAL_ADDRESS macro will do just that git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26954 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ffc7323ec3
commit
4329512017
3 changed files with 6 additions and 2 deletions
|
@ -751,7 +751,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
|
|||
|
||||
if(aligned)
|
||||
{
|
||||
dma_buf = buf;
|
||||
dma_buf = AS3525_PHYSICAL_ADDR(buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -847,7 +847,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
|
|||
|
||||
if(aligned)
|
||||
{
|
||||
dma_buf = buf;
|
||||
dma_buf = AS3525_PHYSICAL_ADDR(buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -41,6 +41,10 @@
|
|||
#endif
|
||||
|
||||
#define AS3525_UNCACHED_ADDR(a) ((typeof(a)) ((uintptr_t)(a) + 0x10000000))
|
||||
#define AS3525_PHYSICAL_ADDR(a) \
|
||||
((typeof(a)) ((((uintptr_t)(a)) & (MEM*0x100000)) \
|
||||
? (((uintptr_t)(a)) - IRAM_ORIG) \
|
||||
: ((uintptr_t)(a))))
|
||||
|
||||
#ifdef SANSA_C200V2
|
||||
/* 0: Backlight on A5, 1: Backlight on A7 */
|
||||
|
|
Loading…
Reference in a new issue