Skip to content
Snippets Groups Projects
Commit 269610f6 authored by Mingkai Hu's avatar Mingkai Hu Committed by Wolfgang Denk
Browse files

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.

Signed-off-by: default avatarMingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent 1fc1d9ae
No related branches found
No related tags found
No related merge requests found
......@@ -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));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment