]> git.sur5r.net Git - u-boot/blobdiff - drivers/bootcount/bootcount_ram.c
cfi_flash: Fix whitespace with casting
[u-boot] / drivers / bootcount / bootcount_ram.c
index 5bdabcd562090bcee93e05abcef48c971144177d..ad4cc569a381f88d228e9e11a407dd604627d63a 100644 (file)
@@ -35,6 +35,10 @@ void bootcount_store(ulong a)
                writel(patterns[i % NBR_OF_PATTERNS],
                        &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] &
+                            ~(ARCH_DMA_MINALIGN - 1)) + ARCH_DMA_MINALIGN));
 }
 
 ulong bootcount_load(void)