imx_common: check for Serial Downloader in spl_boot_device
Subsystems (2)
PATCH v3 1/1 imx_common: check for Serial Downloader in spl_boot_device
Check for bmode before reading the boot device to check if a serial downloader is started, and returns UART if the serial downloader is set, letting SPL to wait for an image if CONFIG_SPL_YMODEM_SUPPORT is set.
This allows to load again a SPL based board with imx_usb_loader together with a tool such as kermit.
Signed-off-by Stefano Babic <[email protected]>
CC Tim Harvey <[email protected]>
CC Fabio Estevam <[email protected]>
CC Eric Nelson <[email protected]>
Reviewed-by Eric Nelson <[email protected]>
Tested-by Eric Nelson <[email protected]>
---
Changes in v3:
- fix (1 == reg)
- rephrase some documentation (E.Nelson)
Changes in v2:
- Add documentation (S. Roese)
- Check just bits 24-25 because reserved bits are set on some variants (E. Nelson)
- Set boot device to UART if USB is set to let bmode working as suggested by Eric
arch/arm/imx-common/spl.c | 8 ++++++++ doc/README.imx6 | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+)
arch/arm/imx-common/spl.c +8 -0
@@ -20,7 +20,15 @@ u32 spl_boot_device(void)struct src *psrc = (struct src *)SRC_BASE_ADDR ;unsigned int gpr10_boot =readl (&psrc->gpr10) & (1 <<28 );unsigned reg = gpr10_boot ?readl (&psrc->gpr9) :readl (&psrc->sbmr1); +unsigned int bmode =readl (&psrc->sbmr2); +/* +* Check for BMODE if serial downloader is enabled +* BOOT_MODE - see IMX6DQRM Table 8-1 +*/ +if ((((bmode >>24 ) &0x03 ) ==0x01 ) ||/* Serial Downloader */ + (gpr10_boot && (reg ==1 ))) +return BOOT_DEVICE_UART ;/* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */ switch ((reg &0x000000FF ) >>4 ) {/* EIM: See 8.5.1, Table 8-9 */
doc/README.imx6 +51 -0
54 lines not on this page · raw message
Signature · 1 line
1.9.1