summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-08-08 18:27:19 -0700
committerStefan Agner <stefan.agner@toradex.com>2017-08-31 19:57:38 -0700
commit3ef2146262c6f9aff793971d96bab901657469f4 (patch)
treee29b45b98f7275362769603604a964338884b47f
parent4fcacc18d02ac0cc9ef943eb722c4e8cf5a03077 (diff)
colibri_imx6: 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>
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index eb2c552c4b..76d999affc 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -686,6 +686,14 @@ int board_late_init(void)
setenv("board_rev", env_str);
#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;
}
#endif /* CONFIG_BOARD_LATE_INIT */