From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sat, 29 Jan 2011 08:36:03 +0100 Subject: [U-Boot] [PATCH 4/8] orion5x: Allow SDRAM initialization to be omitted In-Reply-To: <1296262841-8819-4-git-send-email-mspang@csclub.uwaterloo.ca> References: <1296262841-8819-1-git-send-email-mspang@csclub.uwaterloo.ca> <1296262841-8819-4-git-send-email-mspang@csclub.uwaterloo.ca> Message-ID: <4D43C363.30604@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 29/01/2011 02:00, Michael Spang a ?crit : > For the TS-7800, the FPGA contains a bootloader which handles > the SDRAM initialization and loads a bootloader from RAM. We > should not try to initialize RAM again while running from it. > > Signed-off-by: Michael Spang > --- > arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S b/arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S > index 0523bd4..37d7d14 100644 > --- a/arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S > +++ b/arch/arm/cpu/arm926ejs/orion5x/lowlevel_init.S > @@ -86,6 +86,8 @@ > > lowlevel_init: > > +#ifndef CONFIG_SKIP_SDRAM_INIT > + > /* Use 'r4 as the base for internal register accesses */ > ldr r4, =ORION5X_REGS_PHY_BASE > > @@ -289,5 +291,7 @@ lowlevel_init: > orr r2, r2, r6 > str r2, [r3, #0x484] > > +#endif > + > /* Return to U-boot via saved link register */ > mov pc, lr That's basically making lowlevel_init empty, so I would prefer that you put #ifdef/#endif around the call to lowlevel_init in start.S and modify the orion5x Makefile to include lowlevel_init.S only if CONFIG_SKIP_DRAM_INIT is not defined. (come to think of it, CONFIG_SKIP_LOWLEVEL_INIT is a bit of a misnomer since it actually skips not only lowlevelinit but also cpu_init_crit. Possibly one could even go as far as renaming CONFIG_SKIP_LOWLEVEL_INIT to CONFIG_SKIP_CPU_INIT_CRIT, and then reuse CONFIG_SKIP_LOWLEVEL_INIT for lowlevel_init; but that can be a separate patch, with a nifty doc update.) Amicalement, -- Albert.