From 87471649a561404a36e9e854d45be95d1599b1c0 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Thu, 2 May 2019 18:07:14 +0200 Subject: stm32mp1: support dynamic MTDPARTS This patch configure the default value for mtdids and mtparts dynamically according the presence of nor and nand in the board device tree Signed-off-by: Patrick Delaunay Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard --- include/configs/stm32mp1.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/configs') diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index 202c5180aa..a91c15098f 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -102,6 +102,14 @@ #include +#if defined(CONFIG_STM32_QSPI) || defined(CONFIG_NAND_STM32_FMC) +#define CONFIG_SYS_MTDPARTS_RUNTIME +#endif + +#define STM32MP_MTDPARTS \ + "mtdparts_nor0=256k(fsbl1),256k(fsbl2),2m(ssbl),-(nor_user)\0" \ + "mtdparts_nand0=2m(fsbl),2m(ssbl1),2m(ssbl2),-(UBI)\0" + /* * memory layout for 32M uncompressed/compressed kernel, * 1M fdt, 1M script, 1M pxe and 1M for splashimage @@ -117,6 +125,7 @@ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ STM32MP_BOOTCMD \ + STM32MP_MTDPARTS \ BOOTENV #endif /* ifndef CONFIG_SPL_BUILD */ -- cgit