Patchwork [U-Boot,RFC,35/36] sc520 - Release CAR and enable caching

login
register
mail settings
Submitter Graeme Russ
Date Jan. 3, 2011, 7:46 p.m.
Message ID <1294084016-2674-36-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/77341/
State Superseded
Delegated to: Graeme Russ
Headers show

Comments

Graeme Russ - Jan. 3, 2011, 7:46 p.m.
---
 arch/i386/cpu/sc520/sc520.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

--
1.7.1.422.g049e9

Patch

diff --git a/arch/i386/cpu/sc520/sc520.c b/arch/i386/cpu/sc520/sc520.c
index 8145f1a..37015e4 100644
--- a/arch/i386/cpu/sc520/sc520.c
+++ b/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)
 {