diff options
author | Stefano Babic <sbabic@denx.de> | 2015-12-11 17:30:42 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-01-03 15:57:56 +0100 |
commit | 40f4839ce12adfc0223d6e3035cf9c3a4754a0ec (patch) | |
tree | 366a30cf0c51909c3dfaa938eca4ffcad2118237 /arch/arm/imx-common | |
parent | fe21eaf92de4d78413e69c95ba23a869e17454f7 (diff) | |
download | u-boot-imx-40f4839ce12adfc0223d6e3035cf9c3a4754a0ec.zip u-boot-imx-40f4839ce12adfc0223d6e3035cf9c3a4754a0ec.tar.gz u-boot-imx-40f4839ce12adfc0223d6e3035cf9c3a4754a0ec.tar.bz2 |
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 <sbabic@denx.de>
CC: Tim Harvey <tharvey@gateworks.com>
CC: Fabio Estevam <Fabio.Estevam@freescale.com>
CC: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
Tested-by: Eric Nelson <eric@nelint.com>
Diffstat (limited to 'arch/arm/imx-common')
-rw-r--r-- | arch/arm/imx-common/spl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/imx-common/spl.c b/arch/arm/imx-common/spl.c index ac6e40e..caa45cf 100644 --- a/arch/arm/imx-common/spl.c +++ b/arch/arm/imx-common/spl.c @@ -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 */ |