Skip to content
Snippets Groups Projects
Commit 20adda4c authored by Stefan Roese's avatar Stefan Roese Committed by Tom Rini
Browse files

bootcounter_ram: Flush dcache after data is written into SDRAM


This patch adds a call to flush_dcache_range() to bootcount_store() to
make sure, that the bootcounter data (including the patterns) is
written to memory. Without this, platforms with dcache enabled may not
have the bootcounter updated upon reset.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
parent d9b2678e
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,9 @@ void bootcount_store(ulong a) ...@@ -35,6 +35,9 @@ void bootcount_store(ulong a)
writel(patterns[i % NBR_OF_PATTERNS], writel(patterns[i % NBR_OF_PATTERNS],
&save_addr[i + OFFS_PATTERN]); &save_addr[i + OFFS_PATTERN]);
/* Make sure the data is written to RAM */
flush_dcache_range((ulong)&save_addr[0],
(ulong)&save_addr[REPEAT_PATTERN + OFFS_PATTERN]);
} }
ulong bootcount_load(void) ulong bootcount_load(void)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment