diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2014-07-24 13:13:58 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2014-07-24 13:13:58 +0200 |
commit | 36b44c6fc7ddde29aec7f39ebcb5cc959d24b469 (patch) | |
tree | 06675408ba5cc28bf59fe9b0cd271648263326d7 | |
parent | e8fad1b70bed78e019ada7af3e29bbfce0652094 (diff) |
colibri_vf: disable automatic boot when using recovery modeColibri_VF_LinuxImageV2.3Beta1_20140804Apalis_iMX6_LinuxImageV2.3Beta1_20140804
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).
-rw-r--r-- | arch/arm/include/asm/arch-vf610/imx-regs.h | 8 | ||||
-rw-r--r-- | board/toradex/colibri_vf/colibri_vf.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h index 5a18801e5dc..2d929e50fd4 100644 --- a/arch/arm/include/asm/arch-vf610/imx-regs.h +++ b/arch/arm/include/asm/arch-vf610/imx-regs.h @@ -227,6 +227,14 @@ /* Slow Clock Source Controller Module (SCSC) */ #define SCSC_SOSC_CTR_SOSC_EN (0x1) +/* System Reset Controller (SRC) */ +#define SRC_SBMR2_BMOD_MASK (0x3 << 24) +#define SRC_SBMR2_BMOD_SHIFT 24 +#define SRC_SBMR2_BMOD_FUSES 0x0 +#define SRC_SBMR2_BMOD_SERIAL 0x1 +#define SRC_SBMR2_BMOD_RCON 0x2 + + #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) #include <asm/types.h> diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index f079c3dcc81..71f30a4954f 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -578,6 +578,7 @@ void get_board_serial(struct tag_serialnr *serialnr) #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { + struct src *src = (struct src *)SRC_BASE_ADDR; if (read_cfb()) printf("Missing Toradex config block\n"); @@ -597,6 +598,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 */ |