diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-01-27 19:46:46 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-01-27 20:08:33 +0100 |
commit | 900b494a2710b3237f46929baf0eba26d8bc8292 (patch) | |
tree | 7c568877f27190602e9fe20aa181bd01a45ca36c /firmware/export/imx233.h | |
parent | 74736fcfc95e786ef5aad46c73e1c53365d5d3d8 (diff) |
imx233: fix PHYISCAL_ADDR to handle the buffered region (hard to debug if misused)
Change-Id: Ibbe9d42ecb91aa04925d557f8231f8a9140dd60a
Diffstat (limited to 'firmware/export/imx233.h')
-rw-r--r-- | firmware/export/imx233.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/export/imx233.h b/firmware/export/imx233.h index a68ca6df13..d672137a48 100644 --- a/firmware/export/imx233.h +++ b/firmware/export/imx233.h @@ -47,7 +47,9 @@ #define NOCACHE_BASE (UNCACHED_DRAM_ADDR - CACHED_DRAM_ADDR) #define PHYSICAL_ADDR(a) \ - ((typeof(a))((uintptr_t)(a) >= CACHED_DRAM_ADDR ? \ + ((typeof(a))((uintptr_t)(a) >= BUFFERED_DRAM_ADDR ? \ + ((uintptr_t)(a) - BUFFERED_DRAM_ADDR + UNCACHED_DRAM_ADDR) \ + :(uintptr_t)(a) >= CACHED_DRAM_ADDR ? \ ((uintptr_t)(a) - CACHED_DRAM_ADDR + UNCACHED_DRAM_ADDR) \ :(uintptr_t)(a))) #define UNCACHED_ADDR(a) PHYSICAL_ADDR(a) |