diff options
author | Heiko Schocher <hs@denx.de> | 2010-09-17 13:10:42 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-09-19 19:29:54 +0200 |
commit | ab86f72c354f9b2572340f72b74ca0a258c451bd (patch) | |
tree | 33cadeb2dbb7f31824789189621305d6eda772ab /board/logicpd | |
parent | 561142af20f1fd7b425d9425730014e656defb91 (diff) | |
download | u-boot-imx-ab86f72c354f9b2572340f72b74ca0a258c451bd.zip u-boot-imx-ab86f72c354f9b2572340f72b74ca0a258c451bd.tar.gz u-boot-imx-ab86f72c354f9b2572340f72b74ca0a258c451bd.tar.bz2 |
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 <bengardiner@nanometrics.ca>
Portions of this work were supported by funding from
the CE Linux Forum.
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Ben Gardiner <bengardiner@nanometrics.ca>
Diffstat (limited to 'board/logicpd')
-rw-r--r-- | board/logicpd/imx27lite/config.mk | 2 | ||||
-rw-r--r-- | board/logicpd/imx27lite/imx27lite.c | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/board/logicpd/imx27lite/config.mk b/board/logicpd/imx27lite/config.mk index a2e7768..2f9c4e6 100644 --- a/board/logicpd/imx27lite/config.mk +++ b/board/logicpd/imx27lite/config.mk @@ -1 +1 @@ -TEXT_BASE = 0xA7F00000 +TEXT_BASE = 0xc0000000 diff --git a/board/logicpd/imx27lite/imx27lite.c b/board/logicpd/imx27lite/imx27lite.c index 4427415..6eb5cc2 100644 --- a/board/logicpd/imx27lite/imx27lite.c +++ b/board/logicpd/imx27lite/imx27lite.c @@ -66,19 +66,22 @@ int board_init (void) int dram_init (void) { + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); + return 0; +} -#if CONFIG_NR_DRAM_BANKS > 0 - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = get_ram_size((volatile void *)PHYS_SDRAM_1, +void dram_init_banksize(void) +{ + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE, PHYS_SDRAM_1_SIZE); -#endif #if CONFIG_NR_DRAM_BANKS > 1 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 - - return 0; } int checkboard(void) |