mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-05 11:00:43 +09:00
cmd_nand: dump: Align data and OOB buffers
In order for cache invalidation and flushing to work properly, the data and OOB buffers must be aligned to full cache lines. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
parent
9614a1e963
commit
62fd66f3d3
@ -48,8 +48,8 @@ static int nand_dump(nand_info_t *nand, ulong off, int only_oob, int repeat)
|
|||||||
|
|
||||||
last = off;
|
last = off;
|
||||||
|
|
||||||
datbuf = malloc(nand->writesize);
|
datbuf = memalign(ARCH_DMA_MINALIGN, nand->writesize);
|
||||||
oobbuf = malloc(nand->oobsize);
|
oobbuf = memalign(ARCH_DMA_MINALIGN, nand->oobsize);
|
||||||
if (!datbuf || !oobbuf) {
|
if (!datbuf || !oobbuf) {
|
||||||
puts("No memory for page buffer\n");
|
puts("No memory for page buffer\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user