From c32f05d9958ad1792318a340020b222c25795396 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 19 Sep 2017 17:47:55 -0700 Subject: colibri-imx6ull: 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 Acked-by: Max Krummenacher --- board/toradex/colibri-imx6ull/colibri_imx6ull.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/toradex/colibri-imx6ull/colibri_imx6ull.c b/board/toradex/colibri-imx6ull/colibri_imx6ull.c index 6e15362360..51d1492a69 100644 --- a/board/toradex/colibri-imx6ull/colibri_imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri_imx6ull.c @@ -358,6 +358,14 @@ int board_late_init(void) add_board_boot_modes(board_boot_modes); #endif +#ifdef CONFIG_CMD_USB_SDP + if (is_boot_from_usb()) { + printf("Serial Downloader recovery mode, using sdp command\n"); + setenv("bootdelay", "0"); + setenv("bootcmd", "sdp 0"); + } +#endif /* CONFIG_CMD_USB_SDP */ + return 0; } -- cgit v1.2.3