]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
integratorap: support relocation
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 25 Jul 2011 01:50:08 +0000 (01:50 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 3 Sep 2011 20:40:45 +0000 (22:40 +0200)
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>
board/armltd/integrator/integrator.c
include/configs/integratorap.h

index 9bb56b520823903497408673c996c1ab3e94453c..c8d2bc7bacb34cbca6222620120cfe48a35c2c3f 100644 (file)
@@ -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;
index 8b41885fed3587bf8be0ea838e22ef31858ba1ad..1650c03e36af3e1f277197a7a3b2a90c297a5bb7 100644 (file)
@@ -47,7 +47,7 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_CM_INIT         1
 #define CONFIG_CM_REMAP                1
-#undef CONFIG_CM_SPD_DETECT
+#define CONFIG_CM_SPD_DETECT
 
 /*
  * Size of malloc() pool