diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2014-10-16 12:50:36 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2014-10-23 11:11:04 +0200 |
commit | 781895e999b05fb75d13650600ab12587841fd74 (patch) | |
tree | a16b59644182ed774d0856eb8a6fba617c907c16 /board | |
parent | 016f4846a53b5a756fc2f199cd48327ce009b84f (diff) |
colibri_vf: disable automatic boot when using recovery mode
Since we use the same UART to download U-Boot and get the U-Boot
prompt, it is quite hard to switch between the download program
and the terminal emulator within the boot delay. This patch
disables the automatic boot by setting the bootdelay to -1 when
using the recovery mode (serial downloader).
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/colibri_vf/colibri_vf.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 3be74e0d675..a977f64c9ff 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -252,6 +252,8 @@ int board_early_init_f(void) #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { + struct src *src = (struct src *)SRC_BASE_ADDR; + /* Default memory arguments */ if (!getenv("memargs")) { switch (gd->ram_size) { @@ -268,6 +270,12 @@ int board_late_init(void) } } + if (((src->sbmr2 & SRC_SBMR2_BMOD_MASK) >> SRC_SBMR2_BMOD_SHIFT) + == SRC_SBMR2_BMOD_SERIAL) { + printf("Serial Downloader recovery mode, disable autoboot\n"); + setenv("bootdelay", "-1"); + } + return 0; } #endif /* CONFIG_BOARD_LATE_INIT */ |