Skip to content
Snippets Groups Projects
Commit ac0a93fd authored by Stefan Agner's avatar Stefan Agner Committed by Stefano Babic
Browse files

imx_common: check for bmode Serial Downloader


Before commit 81c4eccb ("imx: mx6: fix USB bmode to use
reserved value") a non-reserved value has been used to trigger
Serial Downloader using bmode, which translated to a GPR9 value
of 0x10. However, on some boards the non-reserved value lead to
unreliable bmode command. With the above mentioned commit, U-boot
switched to use [7:4] b0001, which translates to GPR9 0x10 for
Serial Downloader mode. Check for the new value and classify it
as Serial Downloader mode.

Signed-off-by: default avatarStefan Agner <stefan.agner@toradex.com>
CC: 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>
parent 1c3e62d6
No related branches found
No related tags found
No related merge requests found
...@@ -27,8 +27,7 @@ u32 spl_boot_device(void) ...@@ -27,8 +27,7 @@ u32 spl_boot_device(void)
* Check for BMODE if serial downloader is enabled * Check for BMODE if serial downloader is enabled
* BOOT_MODE - see IMX6DQRM Table 8-1 * BOOT_MODE - see IMX6DQRM Table 8-1
*/ */
if ((((bmode >> 24) & 0x03) == 0x01) || /* Serial Downloader */ if (((bmode >> 24) & 0x03) == 0x01) /* Serial Downloader */
(gpr10_boot && (reg == 1)))
return BOOT_DEVICE_UART; return BOOT_DEVICE_UART;
/* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */ /* BOOT_CFG1[7:4] - see IMX6DQRM Table 8-8 */
switch ((reg & 0x000000FF) >> 4) { switch ((reg & 0x000000FF) >> 4) {
...@@ -40,6 +39,9 @@ u32 spl_boot_device(void) ...@@ -40,6 +39,9 @@ u32 spl_boot_device(void)
else else
return BOOT_DEVICE_NOR; return BOOT_DEVICE_NOR;
break; break;
/* Reserved: Used to force Serial Downloader */
case 0x1:
return BOOT_DEVICE_UART;
/* SATA: See 8.5.4, Table 8-20 */ /* SATA: See 8.5.4, Table 8-20 */
case 0x2: case 0x2:
return BOOT_DEVICE_SATA; return BOOT_DEVICE_SATA;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment