summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Hilliard <[email protected]>2024-03-31 17:28:59 -0600
committerMichal Simek <[email protected]>2024-04-03 15:28:11 +0200
commit6c4a739807bf50f3c375000565b76a92aab6a500 (patch)
tree521384e475a82d2b6978b75df48861a737fe26f8
parent46947ef68f6a10352fce148da33521f1d2df37cb (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
-rw-r--r--board/xilinx/common/board.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 17291a9d3b9..f5117012d62 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -12,6 +12,7 @@
#include <env.h>
#include <image.h>
#include <init.h>
+#include <jffs2/load_kernel.h>
#include <lmb.h>
#include <log.h>
#include <asm/global_data.h>
@@ -20,6 +21,7 @@
#include <i2c.h>
#include <linux/sizes.h>
#include <malloc.h>
+#include <mtd_node.h>
#include "board.h"
#include <dm.h>
#include <i2c_eeprom.h>
@@ -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;