[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-13-g95d90eb
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-10-23 12:32:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 95d90ebb39ba5c94e8de8eba0b158b9a20228838 (commit)
from b8f43b034204adc6b83702bb031c6fc9e8d7a3f2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 95d90ebb39ba5c94e8de8eba0b158b9a20228838
Author: Eric Jarrige <eri...@ar...>
Date: Tue Oct 23 14:35:52 2012 +0200
[UBOOT] 2012.10: build user friendly continuous multi RAMs memory mapping - add U-Boot feature to support non contiguous RAM banks
-----------------------------------------------------------------------
Summary of changes:
...60-arm-support-continuous-mmu-mem-mapping.patch | 52 ++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
create mode 100644 patches/u-boot/2012.10/360-arm-support-continuous-mmu-mem-mapping.patch
diff --git a/patches/u-boot/2012.10/360-arm-support-continuous-mmu-mem-mapping.patch b/patches/u-boot/2012.10/360-arm-support-continuous-mmu-mem-mapping.patch
new file mode 100644
index 0000000..a680e73
--- /dev/null
+++ b/patches/u-boot/2012.10/360-arm-support-continuous-mmu-mem-mapping.patch
@@ -0,0 +1,52 @@
+ARM: support continuous MMU memory mapping beside the regular identity mapping.
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+---
+diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
+index 939de10..25f0ff1 100644
+--- a/arch/arm/lib/cache-cp15.c
++++ b/arch/arm/lib/cache-cp15.c
+@@ -50,7 +50,7 @@ static void cp_delay (void)
+ asm volatile("" : : : "memory");
+ }
+
+-static inline void dram_bank_mmu_setup(int bank)
++static inline void dram_bank_mmu_setup(int bank, int page_offset)
+ {
+ u32 *page_table = (u32 *)gd->tlb_addr;
+ bd_t *bd = gd->bd;
+@@ -60,7 +60,7 @@ static inline void dram_bank_mmu_setup(int bank)
+ for (i = bd->bi_dram[bank].start >> 20;
+ i < (bd->bi_dram[bank].start + bd->bi_dram[bank].size) >> 20;
+ i++) {
+- page_table[i] = i << 20 | (3 << 10) | CACHE_SETUP;
++ page_table[page_offset++] = i << 20 | (3 << 10) | CACHE_SETUP;
+ }
+ }
+
+@@ -68,7 +68,8 @@ static inline void dram_bank_mmu_setup(int bank)
+ static inline void mmu_setup(void)
+ {
+ u32 *page_table = (u32 *)gd->tlb_addr;
+- int i;
++ bd_t *bd = gd->bd;
++ int i, page_offset, continuity_offset;
+ u32 reg;
+
+ arm_init_before_mmu();
+@@ -76,8 +77,14 @@ static inline void mmu_setup(void)
+ for (i = 0; i < 4096; i++)
+ page_table[i] = i << 20 | (3 << 10) | 0x12;
+
++ continuity_offset = bd->bi_dram[0].start >> 20;
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+- dram_bank_mmu_setup(i);
++ page_offset = (bd->bi_dram[i].start) >> 20;
++ /* direct identity mapping */
++ dram_bank_mmu_setup(i, page_offset);
++ /* secondary mapping to build a continous memory space */
++ dram_bank_mmu_setup(i, continuity_offset);
++ continuity_offset = (bd->bi_dram[i].start + bd->bi_dram[i].size) >> 20;
+ }
+
+ /* Copy the page table address to cp15 */
hooks/post-receive
--
armadeus
|