We experimenting problems with imx8mn family cpu. We try to support
boot0 and boot1 fallback.
The condition to decide what function the bootrom should choose
come from is_boot_from_stream_device

This is a boot from mmcblk0boot0 with some debug

U-Boot SPL 2020.04-5.4.70-2.3.2+gf3bcbdfc62 (Jul 03 2021 - 17:00:27 +0000)
power_bd71837_init
DDRINFO: start DRAM init
DDRINFO: DRAM rate 1600MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from BOOTROM
ROM API interface 2 from boot 131073

Interface is 2 MMC and boot is 131073 and according to this

static int is_boot_from_stream_device(u32 boot)
+{
+       u32 interface;
+
+       interface = boot >> 16;
+       if (interface >= BT_DEV_TYPE_USB)
+               return 1;
+
+       if (interface == BT_DEV_TYPE_MMC && (boot & 1))
+               return 1;
+
+       return 0;
+}

the return is 1, that does not allow us to boot.

Boot from boot1 give 131072 that is boot1 this let device boot because
is_boot_from_stream_device is 0 and
romapi use spl_romapi_load_image_seekable

Adjust the bootcondition let us boot from mmcblk0boot0 and
mmcblk0boot1 without any problem

mmc partconf 0
EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x0
BOOT_PARTITION_ENABLE: 0x1
PARTITION_ACCESS: 0x0

and the board was fused already.

Signed-off-by: Michael Trimarchi <mich...@amarulasolutions.com>
---
 arch/arm/mach-imx/spl_imx_romapi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/spl_imx_romapi.c 
b/arch/arm/mach-imx/spl_imx_romapi.c
index 7e6a05a6f3..36f8848d45 100644
--- a/arch/arm/mach-imx/spl_imx_romapi.c
+++ b/arch/arm/mach-imx/spl_imx_romapi.c
@@ -18,10 +18,11 @@ static int is_boot_from_stream_device(u32 boot)
        u32 interface;
 
        interface = boot >> 16;
+
        if (interface >= BT_DEV_TYPE_USB)
                return 1;
 
-       if (interface == BT_DEV_TYPE_MMC && (boot & 1))
+       if (!is_imx8mn() && interface == BT_DEV_TYPE_MMC && (boot & 1))
                return 1;
 
        return 0;
-- 
2.25.1

Reply via email to