summaryrefslogtreecommitdiff
path: root/board/armltd
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-07-25 01:50:08 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-09-03 22:40:45 +0200
commit26c82638c92f1b21216df5852788280d81b45fe5 (patch)
tree7806d995497b2d5d44339981a66c2577a5500cd4 /board/armltd
parenta46877cc472230fddfe56f2dfd26017b28f4bba9 (diff)
downloadu-boot-imx-26c82638c92f1b21216df5852788280d81b45fe5.zip
u-boot-imx-26c82638c92f1b21216df5852788280d81b45fe5.tar.gz
u-boot-imx-26c82638c92f1b21216df5852788280d81b45fe5.tar.bz2
integratorap: support relocation
The integrator board was apparently never converted over to support relocation until now. After this the integrator u-boot both compiles and boots on the Integrator AP. This also fixes the SDRAM memory size detection. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'board/armltd')
-rw-r--r--board/armltd/integrator/integrator.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 9bb56b5..c8d2bc7 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -86,15 +86,9 @@ int misc_init_r (void)
return (0);
}
-/******************************
- Routine:
- Description:
-******************************/
int dram_init (void)
{
- gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
- gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
#ifdef CONFIG_CM_SPD_DETECT
{
extern void dram_query(void);
@@ -118,8 +112,13 @@ extern void dram_query(void);
*/
sdram_shift = ((cm_reg_sdram & 0x0000001C)/4)%4;
gd->bd->bi_dram[0].size = 0x01000000 << sdram_shift;
-
+ gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+ 0x01000000 << sdram_shift);
}
+#else
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+ gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+ PHYS_SDRAM_1_SIZE);
#endif /* CM_SPD_DETECT */
return 0;