NAND boot: fix nand_load overlap issue
PATCH 1/1 NAND boot: fix nand_load overlap issue
The code copy data from NAND flash block by block, so when the data length isn't a whole-number multiple of the block size, it will overlap the rest space.
--- nand_spl/nand_boot_fsl_elbc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
nand_spl/nand_boot_fsl_elbc.c +1 -1
@@ -120,7 +120,7 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst) pos += page_size; offs += page_size; - }while (offs & (block_size -1 )); + }while ((offs & (block_size -1 )) && (pos < uboot_size)); } }
Signature · 1 line
1.5.4
PATCH 1/1 NAND boot: fix nand_load overlap issue
Dear Scott,
Quoted 8 lines · In message <[email protected]> Mingkai…
The code copy data from NAND flash block by block, so when the data length isn't a whole-number multiple of the block size, it will overlap the rest space.
Signed-off-by Mingkai Hu <[email protected]>--- nand_spl/nand_boot_fsl_elbc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Can you please check the state of this patch? Thanks in advance.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The X11 source code style is ATROCIOUS and should not be used as a model." - Doug Gwyn
PATCH 1/1 NAND boot: fix nand_load overlap issue
Quoted 7 lines · Wolfgang Denk
Dear Scott,
Quoted 4 lines · In message <[email protected]> Mingkai…
The code copy data from NAND flash block by block, so when the data length isn't a whole-number multiple of the block size, it will overlap the rest space.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Mingkai Hu <[email protected]>--- nand_spl/nand_boot_fsl_elbc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Can you please check the state of this patch? Thanks in advance.
Applied to u-boot-nand-flash.
-Scott