diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2019-07-30 19:16:41 +0200 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@st.com> | 2019-08-27 11:19:23 +0200 |
commit | 55f9cd2afe450b768a90788134cb58910943e6c4 (patch) | |
tree | b0e7be662c38c2614e25f6110039d18e68100aab /board/st | |
parent | 4616ff425cac4b374ef16711a145a4d8db6e3173 (diff) | |
download | u-boot-55f9cd2afe450b768a90788134cb58910943e6c4.tar.gz |
stm32mp1: board: check the boot-source to disable bootdelay
Allows to avoid to wait 2 second in U-Boot before to
start STM32CubeProgrammer command.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'board/st')
-rw-r--r-- | board/st/stm32mp1/stm32mp1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index b3bff5f45e..1be1160e0a 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -624,6 +624,7 @@ int board_init(void) int board_late_init(void) { + char *boot_device; #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG const void *fdt_compat; int fdt_compat_len; @@ -660,6 +661,11 @@ int board_late_init(void) /* for DK1/DK2 boards */ board_check_usb_power(); + /* Check the boot-source to disable bootdelay */ + boot_device = env_get("boot_device"); + if (!strcmp(boot_device, "serial") || !strcmp(boot_device, "usb")) + env_set("bootdelay", "0"); + return 0; } |