* [PATCH] ARM: i.MX7/8M: reliably detect serial boot
@ 2021-04-12 22:24 Ahmad Fatoum
2021-04-13 7:39 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-04-12 22:24 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
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>
---
arch/arm/mach-imx/boot.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index c3cf4b85ff25..e9b5a4944390 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;
}
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: i.MX7/8M: reliably detect serial boot
2021-04-12 22:24 [PATCH] ARM: i.MX7/8M: reliably detect serial boot Ahmad Fatoum
@ 2021-04-13 7:39 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-04-13 7:39 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, Apr 13, 2021 at 12:24:16AM +0200, Ahmad Fatoum wrote:
> 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>
> ---
> arch/arm/mach-imx/boot.c | 3 +++
> 1 file changed, 3 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
> index c3cf4b85ff25..e9b5a4944390 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;
> }
> --
> 2.29.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-13 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 22:24 [PATCH] ARM: i.MX7/8M: reliably detect serial boot Ahmad Fatoum
2021-04-13 7:39 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox