On both i.MX6 and i.MX7 (also true for VFxxx) there's an additional path that leads mask ROM to switch into serial bootloader mode. Add code to support it. Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- arch/arm/mach-imx/boot.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c index 7eb7a16f3..a98c716fb 100644 --- a/arch/arm/mach-imx/boot.c +++ b/arch/arm/mach-imx/boot.c @@ -231,6 +231,8 @@ void imx53_get_boot_source(enum bootsource *src, int *instance) #define IMX6_SRC_SBMR2 0x1c #define IMX6_BMOD_SERIAL 0b01 #define IMX6_BMOD_RESERVED 0b11 +#define IMX6_BMOD_FUSES 0b00 +#define BT_FUSE_SEL BIT(4) static bool imx6_bootsource_reserved(uint32_t sbmr2) { @@ -239,7 +241,14 @@ static bool imx6_bootsource_reserved(uint32_t sbmr2) static bool imx6_bootsource_serial(uint32_t sbmr2) { - return imx53_get_bmod(sbmr2) == IMX6_BMOD_SERIAL; + return imx53_get_bmod(sbmr2) == IMX6_BMOD_SERIAL || + /* + * If boot from fuses is selected and fuses are not + * programmed by setting BT_FUSE_SEL, ROM code will + * fallback to serial mode + */ + (imx53_get_bmod(sbmr2) == IMX6_BMOD_FUSES && + !(sbmr2 & BT_FUSE_SEL)); } void imx6_get_boot_source(enum bootsource *src, int *instance) -- 2.14.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox