diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2015-08-18 13:06:37 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-28 12:33:17 -0400 |
commit | 4519668b29bb8422ceca8e7ca9a35d5af0afe959 (patch) | |
tree | cf6361ac4f48d13dc677978ae8778e63bedba402 /common | |
parent | 285e266b417103378c1cf1e9aea47b34731c45d0 (diff) | |
download | u-boot-4519668b29bb8422ceca8e7ca9a35d5af0afe959.zip u-boot-4519668b29bb8422ceca8e7ca9a35d5af0afe959.tar.gz u-boot-4519668b29bb8422ceca8e7ca9a35d5af0afe959.tar.bz2 |
mtd/nand/ubi: assortment of alignment fixes
Various U-Boot adoptions/extensions to MTD/NAND/UBI did not take buffer
alignment into account which led to failures of the following form:
ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Scott Wood <scottwood@freescale.com>
[trini: Add __UBOOT__ hunk to lib/zlib/zutil.c due to malloc.h in common.h]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_ubi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c index cbc10c5..10eea65 100644 --- a/common/cmd_ubi.c +++ b/common/cmd_ubi.c @@ -363,7 +363,7 @@ int ubi_volume_read(char *volume, char *buf, size_t size) tbuf_size = vol->usable_leb_size; if (size < tbuf_size) tbuf_size = ALIGN(size, ubi->min_io_size); - tbuf = malloc(tbuf_size); + tbuf = malloc_cache_aligned(tbuf_size); if (!tbuf) { printf("NO MEM\n"); return ENOMEM; |