Message ID | 20240815080948.457524-1-lukma@denx.de |
---|---|
State | Changes Requested |
Delegated to: | Fabio Estevam |
Headers | show |
Series | config: imx: Define CFG_SYS_UBOOT_BASE for Phytec's imx8mm SoM QSPI boot | expand |
Hi Lukasz, On Thu, Aug 15, 2024 at 5:10 AM Lukasz Majewski <lukma@denx.de> wrote: > +#define UBOOT_ITB_OFFSET 0x57C00 > +#define FSPI_CONF_BLOCK_SIZE 0x1000 > +#define UBOOT_ITB_OFFSET_FSPI \ > + (UBOOT_ITB_OFFSET + FSPI_CONF_BLOCK_SIZE) Putting it in a single line helps readability. > +#ifdef CONFIG_FSPI_CONF_HEADER > +#define CFG_SYS_UBOOT_BASE \ > + (QSPI0_AMBA_BASE + UBOOT_ITB_OFFSET_FSPI) Same here.
diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h index 0910ae2d87..92c30022a8 100644 --- a/include/configs/phycore_imx8mm.h +++ b/include/configs/phycore_imx8mm.h @@ -11,8 +11,17 @@ #include <linux/stringify.h> #include <asm/arch/imx-regs.h> +#define UBOOT_ITB_OFFSET 0x57C00 +#define FSPI_CONF_BLOCK_SIZE 0x1000 +#define UBOOT_ITB_OFFSET_FSPI \ + (UBOOT_ITB_OFFSET + FSPI_CONF_BLOCK_SIZE) +#ifdef CONFIG_FSPI_CONF_HEADER +#define CFG_SYS_UBOOT_BASE \ + (QSPI0_AMBA_BASE + UBOOT_ITB_OFFSET_FSPI) +#else #define CFG_SYS_UBOOT_BASE \ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) +#endif #ifdef CONFIG_SPL_BUILD /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
The image offset when booting from SPI-NOR (QSPI, FSPI driver) is different than one for SD card / eMMC as extra space (0x1000) is consumed by FSPI configuration header (CONFIG_FSPI_CONF_HEADER). Signed-off-by: Lukasz Majewski <lukma@denx.de> --- include/configs/phycore_imx8mm.h | 9 +++++++++ 1 file changed, 9 insertions(+)