diff options
author | Alison Wang <b18965@freescale.com> | 2014-12-03 15:00:48 +0800 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2014-12-11 09:39:32 -0800 |
commit | 8415bb68c8c2e0430f58fc349352a565bddf286e (patch) | |
tree | e61333d4dfd5c6b13485a899f1fa67dec93ac4b8 /board/freescale/ls1021atwr/ls1021atwr.c | |
parent | 86949c2b7c94542c20767c405fc458346bd3975b (diff) | |
download | u-boot-8415bb68c8c2e0430f58fc349352a565bddf286e.tar.gz |
arm: ls102xa: Add SD boot support for LS1021ATWR board
This patch adds SD boot support for LS1021ATWR board. SPL
framework is used. PBL initialize the internal RAM and copy
SPL to it, then SPL initialize DDR using SPD and copy u-boot
from SD card to DDR, finally SPL transfer control to u-boot.
Signed-off-by: Chen Lu <chen.lu@freescale.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
Signed-off-by: Jason Jin <jason.jin@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board/freescale/ls1021atwr/ls1021atwr.c')
-rw-r--r-- | board/freescale/ls1021atwr/ls1021atwr.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index 269d3e2c51..0faee0afad 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -18,6 +18,7 @@ #include <fsl_mdio.h> #include <tsec.h> #include <fsl_sec.h> +#include <spl.h> #ifdef CONFIG_U_QE #include "../../../drivers/qe/qe.h" #endif @@ -271,6 +272,25 @@ int board_early_init_f(void) return 0; } +#ifdef CONFIG_SPL_BUILD +void board_init_f(ulong dummy) +{ + /* Set global data pointer */ + gd = &gdata; + + /* Clear the BSS */ + memset(__bss_start, 0, __bss_end - __bss_start); + + get_clocks(); + + preloader_console_init(); + + dram_init(); + + board_init_r(NULL, 0); +} +#endif + int board_init(void) { struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR; |