Browse Source

i.MX28: Enable caches by default

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut 13 năm trước cách đây
mục cha
commit
345cd3584c
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      arch/arm/cpu/arm926ejs/mx28/mx28.c

+ 10 - 0
arch/arm/cpu/arm926ejs/mx28/mx28.c

@@ -63,6 +63,16 @@ void reset_cpu(ulong ignored)
 		;
 		;
 }
 }
 
 
+void enable_caches(void)
+{
+#ifndef CONFIG_SYS_ICACHE_OFF
+	icache_enable();
+#endif
+#ifndef CONFIG_SYS_DCACHE_OFF
+	dcache_enable();
+#endif
+}
+
 int mx28_wait_mask_set(struct mx28_register_32 *reg, uint32_t mask, int timeout)
 int mx28_wait_mask_set(struct mx28_register_32 *reg, uint32_t mask, int timeout)
 {
 {
 	while (--timeout) {
 	while (--timeout) {