xilinx: zynq: add FDT_FIXUP_PARTITIONS support
PATCH v2 1/1 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.
---
Changes v1 -> v2:
- move partition fixups to board/xilinx/common/board.c
--- board/xilinx/common/board.c | 9 +++++++++ 1 file changed, 9 insertions(+)
board/xilinx/common/board.c +9 -0
@@ -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>
@@ -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 ;
Signature · 1 line
2.34.1
Michal Simek
maintainerQuoted 17 lines · James Hilliard
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]>---
Changes v1 -> v2:
- move partition fixups toboard/xilinx/common/board.c--- board/xilinx/common/board.c | 9 +++++++++ 1 file changed, 9 insertions(+)board/xilinx/common/board.c +0
-0
board/xilinx/common/board.c line 15
Quoted 4 lines
board/xilinx/common/board.c +1
-0@@ -12,6 +12,7 @@#include <env.h> #include <image.h> #include <init.h> +#include <jffs2/load_kernel.h>
What is this header used for?
Quoted 15 lines
board/xilinx/common/board.c +1
-0#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;
board/xilinx/common/board.c int ft_board_setup(void *blob, struct bd_info *bd) · line 707
Quoted 10 lines
board/xilinx/common/board.c +7
-0+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
Quoted 16 lines · Michal Simek
Quoted 12 lines · James Hilliard
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]>---
Changes v1 -> v2:
- move partition fixups toboard/xilinx/common/board.c--- board/xilinx/common/board.c | 9 +++++++++ 1 file changed, 9 insertions(+)
Quoted 11 lines
board/xilinx/common/board.c line 15
Quoted 9 lines
board/xilinx/common/board.c +1
-0@@ -12,6 +12,7 @@#include <env.h> #include <image.h> #include <init.h> +#include <jffs2/load_kernel.h> What is this header used for?
It's needed for MTD_DEV_TYPE_NAND.
Quoted 28 lines
Quoted 16 lines
board/xilinx/common/board.c +1
-0#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;board/xilinx/common/board.c int ft_board_setup(void *blob, struct bd_info *bd) · line 707
Quoted 10 lines
board/xilinx/common/board.c +7
-0+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
Michal Simek
maintainerQuoted 29 lines · James Hilliard
Quoted 16 lines · Michal Simek
Quoted 12 lines · James Hilliard
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]>---
Changes v1 -> v2:
- move partition fixups toboard/xilinx/common/board.c--- board/xilinx/common/board.c | 9 +++++++++ 1 file changed, 9 insertions(+)Quoted 11 lines
board/xilinx/common/board.c line 15
Quoted 9 lines
board/xilinx/common/board.c +1
-0@@ -12,6 +12,7 @@#include <env.h> #include <image.h> #include <init.h> +#include <jffs2/load_kernel.h> What is this header used for?
Quoted 1 line
It's needed for
MTD_DEV_TYPE_NAND.
Location is weird. Anyway applied.
Thanks,
Michal