aboutsummaryrefslogtreecommitdiff
path: root/board/toradex/apalis_imx6
diff options
context:
space:
mode:
authorStefan Agner2019-02-08 18:12:24 +0100
committerStefano Babic2019-04-13 20:30:08 +0200
commit15834c638317d480e943fae688b148edcfc52892 (patch)
tree361718194993f75deccab4a1aaaea53296d94295 /board/toradex/apalis_imx6
parentede25100e1930cca9d4c7188dc65842ccb340cd1 (diff)
apalis_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>
Diffstat (limited to 'board/toradex/apalis_imx6')
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 934ba1fb5bb..3e591854380 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -723,6 +723,14 @@ int board_late_init(void)
#endif /* CONFIG_TDX_APALIS_IMX6_V1_0 */
#endif /* CONFIG_REVISION_TAG */
+#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 /* CONFIG_CMD_USB_SDP */
+
return 0;
}
#endif /* CONFIG_BOARD_LATE_INIT */