From: Thierry Reding Date: Mon, 30 Jul 2012 20:21:55 +0000 (+0000) Subject: cmd_nand: dump: Align data and OOB buffers X-Git-Tag: v2012.10-rc1~2^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62fd66f3d38eeadeed17ce457600372d694f3bd2;p=u-boot 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 Acked-by: Simon Glass Signed-off-by: Tom Warren --- diff --git a/common/cmd_nand.c b/common/cmd_nand.c index a91ccf4df3..4367f5a0f2 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -48,8 +48,8 @@ static int nand_dump(nand_info_t *nand, ulong off, int only_oob, int repeat) last = off; - datbuf = malloc(nand->writesize); - oobbuf = malloc(nand->oobsize); + datbuf = memalign(ARCH_DMA_MINALIGN, nand->writesize); + oobbuf = memalign(ARCH_DMA_MINALIGN, nand->oobsize); if (!datbuf || !oobbuf) { puts("No memory for page buffer\n"); return 1;