From ab86f72c354f9b2572340f72b74ca0a258c451bd Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Fri, 17 Sep 2010 13:10:42 +0200 Subject: ARM: implement relocation for ARM926 Change the implementation for arm926 to relocate the code to an arbitrary address in RAM. Adapt the TX25 (i.MX25), magnesium board to test the changes. On the tx25 board TEXT_BASE is set to the final relocation address to prevent one more copying of u-boot code when relocating. More info see: doc/README.arm-relocation da850 board: Tested-by: Ben Gardiner Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher Cc: Ben Gardiner --- board/karo/tx25/config.mk | 4 ++-- board/karo/tx25/tx25.c | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'board/karo/tx25') diff --git a/board/karo/tx25/config.mk b/board/karo/tx25/config.mk index 732a14a..51ca1ab 100644 --- a/board/karo/tx25/config.mk +++ b/board/karo/tx25/config.mk @@ -1,5 +1,5 @@ ifdef CONFIG_NAND_SPL -TEXT_BASE = 0x81ec0000 +TEXT_BASE = 0x810c0000 else -TEXT_BASE = 0x81f00000 +TEXT_BASE = 0x81fc0000 endif diff --git a/board/karo/tx25/tx25.c b/board/karo/tx25/tx25.c index 2608698..dc57d5c 100644 --- a/board/karo/tx25/tx25.c +++ b/board/karo/tx25/tx25.c @@ -159,7 +159,14 @@ int board_late_init(void) int dram_init (void) { + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1, + PHYS_SDRAM_1_SIZE); + return 0; +} +void dram_init_banksize(void) +{ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = get_ram_size((volatile void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE); @@ -167,9 +174,9 @@ int dram_init (void) gd->bd->bi_dram[1].start = PHYS_SDRAM_2; gd->bd->bi_dram[1].size = get_ram_size((volatile void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE); -#endif +#else - return 0; +#endif } int checkboard(void) -- cgit v1.1