From 432951201714e0eb2d6520cedc5d50a78f56c8bc Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sat, 19 Jun 2010 05:55:18 +0000 Subject: 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 --- firmware/target/arm/as3525/system-target.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/target/arm/as3525/system-target.h') diff --git a/firmware/target/arm/as3525/system-target.h b/firmware/target/arm/as3525/system-target.h index 5d11ecb26c..b3b9001a45 100644 --- a/firmware/target/arm/as3525/system-target.h +++ b/firmware/target/arm/as3525/system-target.h @@ -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 */ -- cgit v1.2.3