summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_imx7/colibri_imx7.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-05-01 16:26:09 -0700
committerStefan Agner <stefan.agner@toradex.com>2017-08-31 19:57:37 -0700
commita2e77a650a496e2be0b1630b874f531e9f394d47 (patch)
tree85c0d16a546d632a23422f54ebc59ee0cd4e0d01 /board/toradex/colibri_imx7/colibri_imx7.c
parente05589df6f18d6417ae2463f1bd9d07daf661ffc (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>
Diffstat (limited to 'board/toradex/colibri_imx7/colibri_imx7.c')
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 0a2c121a57..2536bfd274 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -336,6 +336,14 @@ int board_late_init(void)
add_board_boot_modes(board_boot_modes);
#endif
+#ifdef CONFIG_CMD_USB_SDP
+ if (get_boot_device() == USB_SDP_BOOT) {
+ printf("Serial Downloader recovery mode, using sdp command\n");
+ setenv("bootdelay", "0");
+ setenv("bootcmd", "sdp 0");
+ }
+#endif
+
return 0;
}