From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Ziswiler Date: Fri, 8 Feb 2019 18:12:24 +0100 Subject: [U-Boot] [PATCH v2 21/23] apalis_imx6: use SDP if USB serial downloader has been used In-Reply-To: <20190208171226.16169-1-marcel@ziswiler.com> References: <20190208171226.16169-1-marcel@ziswiler.com> Message-ID: <20190208171226.16169-22-marcel@ziswiler.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Stefan Agner 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: Marcel Ziswiler --- Changes in v2: None board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 2c90a40042..ce54638c4c 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -714,6 +714,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 */ -- 2.20.1