aboutsummaryrefslogtreecommitdiff
path: root/board/st
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2023-06-08 17:16:44 +0200
committerPatrice Chotard <patrice.chotard@foss.st.com>2023-06-16 11:01:16 +0200
commit8a8efacf5f2b518f56db53dbf3ac9f6ad431c4e5 (patch)
tree0e64b32704549f632ae50cf1d8a1d9148254181d /board/st
parent6cf8888541962ee343eb06d6f586aba14b606253 (diff)
downloadu-boot-8a8efacf5f2b518f56db53dbf3ac9f6ad431c4e5.zip
u-boot-8a8efacf5f2b518f56db53dbf3ac9f6ad431c4e5.tar.gz
u-boot-8a8efacf5f2b518f56db53dbf3ac9f6ad431c4e5.tar.bz2
board: stm32mp1: use fdt_copy_fixed_partitions
Copy the fixed partition nodes from U-Boot device tree to Linux kernel device tree to dynamically configure the MTD partitions. fdt_copy_fixed_partitions is only based on device tree and replace the function fdt_fixup_mtdparts based on mtdparts variable; the variable mtdid and mtdparts are not more required. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'board/st')
-rw-r--r--board/st/stm32mp1/stm32mp1.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 5b28ccd..3205a31 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -25,7 +25,6 @@
#include <log.h>
#include <malloc.h>
#include <misc.h>
-#include <mtd_node.h>
#include <net.h>
#include <netdev.h>
#include <phy.h>
@@ -915,20 +914,7 @@ int mmc_get_env_dev(void)
#if defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{
- static const struct node_info nodes[] = {
- { "jedec,spi-nor", MTD_DEV_TYPE_NOR, },
- { "spi-nand", MTD_DEV_TYPE_SPINAND},
- { "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
- { "st,stm32mp1-fmc2-nfc", MTD_DEV_TYPE_NAND, },
- };
- 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));
+ fdt_copy_fixed_partitions(blob);
if (IS_ENABLED(CONFIG_FDT_SIMPLEFB))
fdt_simplefb_enable_and_mem_rsv(blob);