[U-Boot] [PATCH 1/2] mx51evk: support new relocation scheme
Shawn Guo
shawn.gsc at gmail.com
Mon Oct 25 17:14:40 CEST 2010
This patch is to fix build breakage and support new relocatoin
scheme for mx51evk.
- It includes imx-regs.h in mx51evk.h, so that CSD0_BASE_ADDR and
IRAM_BASE_ADDR can be referred to.
- It uses i.mx51 internal RAM as the init stack, as the internal
RAM is totally free from ROM code when u-boot lives.
Signed-off-by: Shawn Guo <shawn.gsc at gmail.com>
---
board/freescale/mx51evk/mx51evk.c | 6 +++---
include/configs/mx51evk.h | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index c8d7d39..8820698 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -52,9 +52,9 @@ u32 get_board_rev(void)
int dram_init(void)
{
- gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
- gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1,
- PHYS_SDRAM_1_SIZE);
+ /* 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;
}
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 6165473..82f364d 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -24,11 +24,11 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <asm/arch/imx-regs.h>
/* High Level Configuration Options */
#define CONFIG_MX51 /* in a mx51 */
-#define CONFIG_SKIP_RELOCATE_UBOOT
#define CONFIG_SYS_MX5_HCLK 24000000
#define CONFIG_SYS_MX5_CLK32 32768
@@ -175,6 +175,9 @@
#define PHYS_SDRAM_1 CSD0_BASE_ADDR
#define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024)
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)
+
#define CONFIG_SYS_DDR_CLKSEL 0
#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
--
1.7.1
More information about the U-Boot
mailing list