microblaze: Flush cache before jumping to kernel
authorMichal Simek <monstr@monstr.eu>
Fri, 16 Apr 2010 10:01:32 +0000 (12:01 +0200)
committerMichal Simek <monstr@monstr.eu>
Fri, 16 Apr 2010 10:16:04 +0000 (12:16 +0200)
There is used max cache size on system which doesn't define
cache size.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/lib/bootm.c

index fef563b48370ad2f32179117fab25bb138701739..2227a81bb0c3baaf109651659eb0446f5c2f4f9f 100644 (file)
@@ -73,6 +73,14 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
                (ulong) theKernel, rd_data_start, (ulong) of_flat_tree);
 #endif
 
+#ifdef XILINX_USE_DCACHE
+#ifdef XILINX_DCACHE_BYTE_SIZE
+       flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
+#else
+#warning please rebuild BSPs and update configuration
+       flush_cache(0, 32768);
+#endif
+#endif
        /*
         * Linux Kernel Parameters (passing device tree):
         * r5: pointer to command line