summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-03-28 12:03:38 -0400
committerTom Rini <trini@ti.com>2014-04-17 14:39:54 -0400
commitba9a6708ec51c294a9674d6901a8be7c3ef76f57 (patch)
tree7037ca283fa8d5056449a41bbeb0d5a3c85c01b2 /board
parentdb605806496cea6d6a82032b2f9ae1628ae7778d (diff)
am335x_evm: Make SPL_OS also check the boot_os variable for falcon mode
We use the same variable as a3m071 in the environment to determine if we should boot into Linux or U-Boot. This is useful on boards like Beaglebone Black or AM335x GP EVM where we have persistent storage for the environment. Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/ti/am335x/board.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 554398f346e..ce7a8b041e8 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;
@@ -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