[PATCH v2 1/1] xilinx: zynq: add FDT_FIXUP_PARTITIONS support
Michal Simek
michal.simek at amd.com
Tue Apr 2 14:41:27 CEST 2024
On 4/1/24 01:28, James Hilliard wrote:
> 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 <james.hilliard1 at gmail.com>
> ---
> Changes v1 -> v2:
> - move partition fixups to board/xilinx/common/board.c
> ---
> 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 9641ed307b..20a6f00e45 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>
What is this header used for?
> #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>
> @@ -693,6 +695,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;
M
More information about the U-Boot
mailing list