diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-04-21 21:01:35 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-04-21 21:01:35 +0200 |
commit | c9aab0f9dd23fddcebf5984dc19e62b514e759a7 (patch) | |
tree | 65ce91815907466f07e87d8b79eaf19763c282bf /board/ti/am335x/board.c | |
parent | 94b972d366c29b92319865e3ded16da062aa8507 (diff) | |
parent | 2e8f5dc16ad360cc15ea402a1dc4d421a04adbbd (diff) |
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Diffstat (limited to 'board/ti/am335x/board.c')
-rw-r--r-- | board/ti/am335x/board.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 554398f346..da780edb89 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -30,6 +30,7 @@ #include <power/tps65910.h> #include <environment.h> #include <watchdog.h> +#include <environment.h> #include "board.h" DECLARE_GLOBAL_DATA_PTR; @@ -81,7 +82,7 @@ static int read_eeprom(struct am335x_baseboard_id *header) return 0; } -#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) +#ifndef CONFIG_SKIP_LOWLEVEL_INIT static const struct ddr_data ddr2_data = { .datardsratio0 = ((MT47H128M16RT25E_RD_DQS<<30) | (MT47H128M16RT25E_RD_DQS<<20) | @@ -219,7 +220,17 @@ static struct emif_regs ddr3_evm_emif_reg_data = { int spl_start_uboot(void) { /* break into full u-boot on 'c' */ - return (serial_tstc() && serial_getc() == 'c'); + if (serial_tstc() && serial_getc() == 'c') + return 1; + +#ifdef CONFIG_SPL_ENV_SUPPORT + env_init(); + env_relocate_spec(); + if (getenv_yesno("boot_os") != 1) + return 1; +#endif + + return 0; } #endif |