summaryrefslogtreecommitdiff
path: root/board/toradex
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2021-07-23 09:39:45 +0300
committerStefano Babic <sbabic@denx.de>2021-08-09 14:09:29 +0300
commit46307ef01e083e3bbbad62f6b75107201e0c6184 (patch)
tree1d524e21079463215a908c69ee16c8c9b445d8d9 /board/toradex
parent5d236df9a0e4d5358892f77d7680d80917a7acd2 (diff)
downloadu-boot-46307ef01e083e3bbbad62f6b75107201e0c6184.tar.xz
board: 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> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'board/toradex')
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c10
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 301b07d5b4..6822102d2c 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -355,12 +355,22 @@ int board_usb_phy_mode(int port)
}
}
+#if defined(CONFIG_BOARD_LATE_INIT)
int board_late_init(void)
{
#if defined(CONFIG_DM_VIDEO)
setup_lcd();
#endif
+
+#if defined(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