summaryrefslogtreecommitdiff
path: root/common/cmd_nand.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-07-30 20:21:55 +0000
committerTom Warren <twarren@nvidia.com>2012-09-07 13:54:31 -0700
commit62fd66f3d38eeadeed17ce457600372d694f3bd2 (patch)
tree682deceb3ea299695450c2125fe8b7c3e242dc47 /common/cmd_nand.c
parent9614a1e9636976add95730c2da569ac1b274f232 (diff)
downloadu-boot-imx-62fd66f3d38eeadeed17ce457600372d694f3bd2.zip
u-boot-imx-62fd66f3d38eeadeed17ce457600372d694f3bd2.tar.gz
u-boot-imx-62fd66f3d38eeadeed17ce457600372d694f3bd2.tar.bz2
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>
Diffstat (limited to 'common/cmd_nand.c')
-rw-r--r--common/cmd_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index a91ccf4..4367f5a 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;