浏览代码

microblaze: Flush cache before jumping to kernel

There is used max cache size on system which doesn't define
cache size.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek 15 年之前
父节点
当前提交
9b4d905690
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      arch/microblaze/lib/bootm.c

+ 8 - 0
arch/microblaze/lib/bootm.c

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