From: Graeme Russ Date: Tue, 4 Jan 2011 06:46:43 +1100 Subject: [U-Boot] [RFC][PATCH 23/36] sc520 - Init SDRAM PAR early In-Reply-To: <1294084016-2674-1-git-send-email-graeme.russ@gmail.com> References: <1294084016-2674-1-git-send-email-graeme.russ@gmail.com> Message-ID: <1294084016-2674-24-git-send-email-graeme.russ@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de --- 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 +#include /* 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