[U-Boot] [PATCH v3 01/11] nand: remove CONFIG_SYS_NAND_PAGE_SIZE

Tim Harvey tharvey at gateworks.com
Thu May 8 07:16:12 CEST 2014


We only need to read in the size of struct image_header and thus don't
need to know the page size of the nand device.

Cc: Scott Wood <scottwood at freescale.com>
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
Acked-by: Stefano Babic <sbabic at denx.de>
Acked-by: Scott Wood <scottwood at freescale.com>
---
v3:
 - no changes

v2:
 - cc Scott Wood <scottwood at freescale.com> on this
 - Acked-by: Stefano Babic <sbabic at denx.de>
 - Acked-by: Scott Wood <scottwood at freescale.com>
---
 common/spl/spl_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 9da0218..062461b 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -76,7 +76,7 @@ void spl_nand_load_image(void)
 #endif
 	/* Load u-boot */
 	nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
-		CONFIG_SYS_NAND_PAGE_SIZE, (void *)header);
+		sizeof(*header), (void *)header);
 	spl_parse_image_header(header);
 	nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
 		spl_image.size, (void *)spl_image.load_addr);
-- 
1.8.3.2



More information about the U-Boot mailing list