From 6c4a739807bf50f3c375000565b76a92aab6a500 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Sun, 31 Mar 2024 17:28:59 -0600 Subject: [PATCH] xilinx: zynq: add FDT_FIXUP_PARTITIONS support There are situations where we may want to let U-Boot modify the FDT nand partitions for the kernel, such as when supporting multiple sizes of NAND chips. Signed-off-by: James Hilliard Link: https://lore.kernel.org/r/20240331232859.727769-1-james.hilliard1@gmail.com Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 17291a9d3b..f5117012d6 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -20,6 +21,7 @@ #include #include #include +#include #include "board.h" #include #include @@ -701,6 +703,13 @@ int ft_board_setup(void *blob, struct bd_info *bd) u8 buf[MAX_RAND_SIZE]; int nodeoffset, ret; + static const struct node_info nodes[] = { + { "arm,pl353-nand-r2p1", MTD_DEV_TYPE_NAND, }, + }; + + if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS) && IS_ENABLED(CONFIG_NAND_ZYNQ)) + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); + if (uclass_get_device(UCLASS_RNG, 0, &dev) || !dev) { debug("No RNG device\n"); return 0; -- 2.39.5