[U-Boot] [RFC][PATCH 23/36] sc520 - Init SDRAM PAR early

Graeme Russ graeme.russ at gmail.com
Mon Jan 3 20:46:43 CET 2011


---
 board/eNET/eNET.c       |    4 +---
 board/eNET/eNET_start.S |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c
index db3be5f..c585771 100644
--- a/board/eNET/eNET.c
+++ b/board/eNET/eNET.c
@@ -118,9 +118,7 @@ static void enet_setup_pars(void)

 	/* PAR 2 is used for Cache-As-RAM */

-	/* PARs 3 and 4 are SDRAM */
-	writel(SC520_SDRAM1_PAR, &sc520_mmcr->par[3]);
-	writel(SC520_SDRAM2_PAR, &sc520_mmcr->par[4]);
+	/* PARs 3 and 4 are SDRAM (already configured in eNET_start.S) */

 	/*
 	 * PARs 5 through 8 are additional NS16550 UARTS
diff --git a/board/eNET/eNET_start.S b/board/eNET/eNET_start.S
index 137fe41..c9e95ee 100644
--- a/board/eNET/eNET_start.S
+++ b/board/eNET/eNET_start.S
@@ -22,11 +22,22 @@
  */

 #include "hardware.h"
+#include <config.h>
+#include <asm/ic/sc520.h>

 /* board early intialization */
 .globl early_board_init
 early_board_init:
-	/* No 32-bit board specific initialisation */
+	/* Map PAR for first 128MB of RAM */
+	movl    $SC520_PAR3, %edi
+	movl	$SC520_SDRAM1_PAR, %eax
+	movl	%eax, (%di)
+
+	/* Map PAR for second 128MB of RAM */
+	movl    $SC520_PAR4, %edi
+	movl	$SC520_SDRAM2_PAR, %eax
+	movl	%eax, (%di)
+
 	jmp	early_board_init_ret

 .globl cpu_halt_asm
--
1.7.1.422.g049e9



More information about the U-Boot mailing list