From: Stefan Roese Date: Fri, 18 Nov 2016 16:21:52 +0000 (+0100) Subject: bootcounter_ram: Fix misaligned cache warning X-Git-Tag: v2017.01-rc1~185 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=384b1d507f1057d97e7cd086f9ea649549300a44;p=u-boot bootcounter_ram: Fix misaligned cache warning This patch fixes the warning about misaligned cache on Armada XP: CACHE: Misaligned operation at range [7ffff000, 7fffffac] Signed-off-by: Stefan Roese Cc: Valentin Longchamp Reviewed-by: Tom Rini --- diff --git a/drivers/bootcount/bootcount_ram.c b/drivers/bootcount/bootcount_ram.c index e0d2669b71..ad4cc569a3 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)