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 <sr@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Stefan Roese 2016-11-18 17:21:52 +01:00 committed by Tom Rini
parent ca388143ce
commit 384b1d507f
1 changed files with 2 additions and 1 deletions

View File

@ -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)