diff options
| author | Patrick Delaunay <[email protected]> | 2020-10-15 14:52:30 +0200 |
|---|---|---|
| committer | Patrick Delaunay <[email protected]> | 2020-11-25 10:58:15 +0100 |
| commit | 29e5c027889ed583fd04d87927e714201b47a225 (patch) | |
| tree | 29db383922772c8c663291b16a27f745f766e8cc | |
| parent | 40426d6f9a9afea7c16361d780f5475747a55266 (diff) | |
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 <[email protected]>
Reviewed-by: Patrice Chotard <[email protected]>
| -rw-r--r-- | board/st/stm32mp1/stm32mp1.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 03a19af9302..8a3ce0a6f59 100644 --- a/board/st/stm32mp1/stm32mp1.c +++ b/board/st/stm32mp1/stm32mp1.c @@ -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, }, }; + char *boot_device; - if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS)) - fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); + /* 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; } |
