瀏覽代碼

sc520: Release CAR and enable caching

Graeme Russ 14 年之前
父節點
當前提交
6002bf03b4
共有 1 個文件被更改,包括 11 次插入5 次删除
  1. 11 5
      arch/i386/cpu/sc520/sc520.c

+ 11 - 5
arch/i386/cpu/sc520/sc520.c

@@ -51,14 +51,20 @@ int cpu_init_f(void)
 	    "popl	%%ecx\n"
 	    "loop 0b\n": : : "ecx");
 
-	if (gd->flags & GD_FLG_COLD_BOOT) {
-		/* turn on the SDRAM write buffer */
-		writeb(0x11, &sc520_mmcr->dbctl);
-	}
-
 	return x86_cpu_init_f();
 }
 
+int cpu_init_r(void)
+{
+	/* Disable the PAR used for CAR */
+	writel(0x0000000, &sc520_mmcr->par[2]);
+
+	/* turn on the SDRAM write buffer */
+	writeb(0x11, &sc520_mmcr->dbctl);
+
+	return x86_cpu_init_r();
+}
+
 #ifdef CONFIG_SYS_SC520_RESET
 void reset_cpu(ulong addr)
 {