diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-05-01 16:26:09 -0700 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2021-05-12 11:46:06 +0300 |
commit | 35c952c87935db8ef6b1aa38ff0cb387a143fcc6 (patch) | |
tree | 21c4bd62cc216818b8816eecb5304930f29d740a | |
parent | 2a68bb1926d61ee0f15877ce76d615fd1bc88fe3 (diff) |
colibri_imx7: use SDP if USB serial downloader has been used
In case USB serial downloader has been used to load U-Boot start the
serial download protocol (SDP) emulation. This allows to download
complete images such as Toradex Easy Installer over USB SDP as well.
This code uses the boot ROM provided boot information to reliably
detect USB serial downloader.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
(cherry-picked from a2e77a650a496e2be0b1630b874f531e9f394d47)
Forward-ported to 2020.07:
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
-rw-r--r-- | board/toradex/colibri_imx7/colibri_imx7.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 1fcb97b16e..ec61498c7c 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -354,12 +354,22 @@ int board_usb_phy_mode(int port) } } +#ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { #if defined(CONFIG_DM_VIDEO) setup_lcd(); #endif + +#ifdef CONFIG_CMD_USB_SDP + if (is_boot_from_usb()) { + printf("Serial Downloader recovery mode, using sdp command\n"); + env_set("bootdelay", "0"); + env_set("bootcmd", "sdp 0"); + } +#endif return 0; } +#endif /* CONFIG_BOARD_LATE_INIT */ #endif |