summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-07-10 20:43:16 +0900
committerTom Rini <trini@ti.com>2014-07-22 07:44:25 -0400
commitc13bb167578f716e38828cf9ca0bb38173da5a1d (patch)
treee6dd0bc0d5feb5f21abdb2f44569ba16b5a76e1e /common
parent949bbd7c867026e7f8ecb71abe6ebd113eda84d2 (diff)
spl: nand: read only in the size of image_header on the first access
For the same reason as in commit 50c8d66d, all the remaining CONFIG_SYS_NAND_PAGE_SIZE in common/spl/spl_nand.c can be replaced with sizeof(*header). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_nand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 062461b2b6..9b200bc4d5 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -44,7 +44,7 @@ void spl_nand_load_image(void)
/* load linux */
nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS,
- CONFIG_SYS_NAND_PAGE_SIZE, (void *)header);
+ sizeof(*header), (void *)header);
spl_parse_image_header(header);
if (header->ih_os == IH_OS_LINUX) {
/* happy - was a linux */
@@ -62,13 +62,13 @@ void spl_nand_load_image(void)
#endif
#ifdef CONFIG_NAND_ENV_DST
nand_spl_load_image(CONFIG_ENV_OFFSET,
- CONFIG_SYS_NAND_PAGE_SIZE, (void *)header);
+ sizeof(*header), (void *)header);
spl_parse_image_header(header);
nand_spl_load_image(CONFIG_ENV_OFFSET, spl_image.size,
(void *)spl_image.load_addr);
#ifdef CONFIG_ENV_OFFSET_REDUND
nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND,
- CONFIG_SYS_NAND_PAGE_SIZE, (void *)header);
+ sizeof(*header), (void *)header);
spl_parse_image_header(header);
nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, spl_image.size,
(void *)spl_image.load_addr);