[U-Boot] [PATCH] bootcounter_ram: Fix misaligned cache warning
Stefan Roese
sr at denx.de
Fri Nov 18 17:21:52 CET 2016
This patch fixes the warning about misaligned cache on Armada XP:
CACHE: Misaligned operation at range [7ffff000, 7fffffac]
Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Valentin Longchamp <valentin.longchamp at keymile.com>
---
drivers/bootcount/bootcount_ram.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c
index e0d2669..ad4cc56 100644
--- a/drivers/bootcount/bootcount_ram.c
+++ b/drivers/bootcount/bootcount_ram.c
@@ -37,7 +37,8 @@ void bootcount_store(ulong a)
/* Make sure the data is written to RAM */
flush_dcache_range((ulong)&save_addr[0],
- (ulong)&save_addr[REPEAT_PATTERN + OFFS_PATTERN]);
+ (((ulong)&save_addr[REPEAT_PATTERN + OFFS_PATTERN] &
+ ~(ARCH_DMA_MINALIGN - 1)) + ARCH_DMA_MINALIGN));
}
ulong bootcount_load(void)
--
2.10.2
More information about the U-Boot
mailing list