diff mbox

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

Message ID 1294084016-2674-24-git-send-email-graeme.russ@gmail.com
State Superseded
Delegated to: Graeme Russ
Headers show

Commit Message

Graeme Russ Jan. 3, 2011, 7:46 p.m. UTC
---
 board/eNET/eNET.c       |    4 +---
 board/eNET/eNET_start.S |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)

--
1.7.1.422.g049e9
diff mbox

Patch

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