On Thu, Jun 9, 2022 at 9:56 AM Mamta Shukla <mamta.shu...@leica-geosystems.com> wrote: > > The macro `CONFIG_SYS_UBOOT_BASE` is used by SPL loaders `"NOR"` and > `"XIP"` to determine the base address of u-boot. > > For `"NOR"` on i.MX8MM it is the base address of QSPI0 plus the offset > of the flattened image tree blob. > Although `QSPI0_AMBA_BASE` is used to define CONFIG_SYS_UBOOT_BASE in > multiple board header files for i.MX8MM, it is not specified. > > Specify offset of flattened image tree blob (needs to be set to same > value as specified in 'binman' node), base address of QSPI0 and size of > FlexSPI configuration block. > > Signed-off-by: Mamta Shukla <mamta.shu...@leica-geosystems.com> > Signed-off-by: Thomas Haemmerle <thomas.haemme...@leica-geosystems.com> > --- > v2: > -No changes > > v3: > -No changes > > include/configs/imx8mm_evk.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h > index 5e8f19c43f..1b8d6e6b9f 100644 > --- a/include/configs/imx8mm_evk.h > +++ b/include/configs/imx8mm_evk.h > @@ -13,8 +13,13 @@ > #define CONFIG_SYS_BOOTM_LEN (64 * SZ_1M) > #define CONFIG_SPL_MAX_SIZE (148 * 1024) > #define CONFIG_SYS_MONITOR_LEN SZ_512K > +#define UBOOT_ITB_OFFSET 0x57C00 > +#define QSPI0_AMBA_BASE 0x08000000
Shouldn't QSPI0_AMBA_BASE go to arch/arm/include/asm/arch-imx8m/imx-regs.h since it's an architecture thing? > +#define FSPI_CONF_BLOCK_SIZE 0x1000 Why not move FSPI_CONF_BLOCK_SIZE into Kconfig with the rest of the stuff you added with FSPI_CONF_HEADER, etc. > +#define UBOOT_ITB_OFFSET_FSPI \ > + (UBOOT_ITB_OFFSET + FSPI_CONF_BLOCK_SIZE) > #define CONFIG_SYS_UBOOT_BASE \ > - (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) > + (QSPI0_AMBA_BASE + UBOOT_ITB_OFFSET_FSPI) Doesn't this make the offset in the FSPI location even when built for MMC/SD? It seems like there should be an ifdef here to determine if the offset is either the previous or UBOOT_ITB_OFFSET_FSPI > > #ifdef CONFIG_SPL_BUILD > #define CONFIG_SPL_STACK 0x920000 > -- > 2.25.1 >