summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-05 07:28:07 -0600
committerAndreas Bießmann <andreas@biessmann.org>2016-06-12 23:49:38 +0200
commitb4d956f6bc0fe6ff9a5776cbce0fe97a344737a3 (patch)
treecd9de3476a26a2b3a977fcafd03a80cf3fa3edb5
parentb5bd09820c79dc92b3e5fb5be4b47ce22c731443 (diff)
downloadu-boot-imx-b4d956f6bc0fe6ff9a5776cbce0fe97a344737a3.zip
u-boot-imx-b4d956f6bc0fe6ff9a5776cbce0fe97a344737a3.tar.gz
u-boot-imx-b4d956f6bc0fe6ff9a5776cbce0fe97a344737a3.tar.bz2
bootm: Align cache flush end address correctly
Flushing part of the cache should be done on cache boundaries. Trying to flush part of a cache line is not supported and the request may be ignored or print warnings. Adjust the bootm code to align the end address to prevent this problem. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Tested-on: smartweb, corvus, taurus, axm Tested-by: Heiko Schocher <hs@denx.de> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
-rw-r--r--common/bootm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 4941414..2431019 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -445,7 +445,7 @@ static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end,
bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE);
return err;
}
- flush_cache(load, *load_end - load);
+ flush_cache(load, ALIGN(*load_end - load, ARCH_DMA_MINALIGN));
debug(" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, *load_end);
bootstage_mark(BOOTSTAGE_ID_KERNEL_LOADED);