From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Delaunay Date: Tue, 30 Jul 2019 19:16:41 +0200 Subject: [U-Boot] [PATCH 33/48] stm32mp1: board: check the boot-source to disable bootdelay In-Reply-To: <1564507016-16570-1-git-send-email-patrick.delaunay@st.com> References: <1564507016-16570-1-git-send-email-patrick.delaunay@st.com> Message-ID: <1564507016-16570-34-git-send-email-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Allows to avoid to wait 2 second in U-Boot before to start STM32CubeProgrammer command. Signed-off-by: Patrick Delaunay --- board/st/stm32mp1/stm32mp1.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 181409c..c61a562 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -623,6 +623,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; @@ -659,6 +660,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; } -- 2.7.4