diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-04-13 00:24:16 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-04-13 09:39:05 +0200 |
commit | f448803fe0ddb975e82e01dbccf3b38e73914496 (patch) | |
tree | 35e2f6b72b5a24e63280093bcab49f690652e830 /arch | |
parent | 07fa886b52ba7a72355ea78771dde53d1bb0bdf7 (diff) | |
download | barebox-f448803fe0ddb975e82e01dbccf3b38e73914496.tar.gz barebox-f448803fe0ddb975e82e01dbccf3b38e73914496.tar.xz |
ARM: i.MX7/8M: reliably detect serial boot
While not documented in the reference manual,
info->boot_device_type was observed to equal 15 when:
- SoC is strapped for serial boot
- SoC falls back into serial boot after failed strapped primary
The latter went so far undetected. Fix this.
What's not tested is:
- SoC falls back into serial boot after failed primary from fuses
- SoC warm resets directly into serial boot because of BMODE
If those works, we could drop the imx6_bootsource_serial check at the
beginning, but for now, just leave it be.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20210412222416.25723-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/boot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c index c3cf4b85ff..e9b5a49443 100644 --- a/arch/arm/mach-imx/boot.c +++ b/arch/arm/mach-imx/boot.c @@ -506,6 +506,9 @@ static void __imx7_get_boot_source(enum bootsource *src, int *instance, case 5: *src = BOOTSOURCE_NOR; break; + case 15: + *src = BOOTSOURCE_SERIAL; + break; default: break; } |