Commit 29e5c027 authored by Patrick Delaunay's avatar Patrick Delaunay

board: stm32mp1: no MTD partitions fixup for serial boot

Remove the update of the MTD partitions in kernel device tree
for serial boot (USB / UART), and the kernel will use the MTD
partitions define in the loaded DTB because U-Boot can't known the
expected flash layout in this case.
Signed-off-by: Patrick Delaunay's avatarPatrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard's avatarPatrice Chotard <patrice.chotard@st.com>
parent 40426d6f
......@@ -848,9 +848,14 @@ int ft_board_setup(void *blob, struct bd_info *bd)
{ "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
{ "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
};
if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
char *boot_device;
/* Check the boot-source and don't update MTD for serial or usb boot */
boot_device = env_get("boot_device");
if (!boot_device ||
(strcmp(boot_device, "serial") && strcmp(boot_device, "usb")))
if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS))
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment