From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Andreas_Bie=DFmann?= Date: Fri, 16 Jan 2015 11:16:43 +0100 Subject: [U-Boot] [PATCH] ARM: atmel: at91sam9m10g45ek: enable SPL In-Reply-To: <54B8DA40.3040808@atmel.com> References: <1421376816-847-1-git-send-email-voice.shen@atmel.com> <54B8D56B.2070708@gmail.com> <54B8DA40.3040808@atmel.com> Message-ID: <54B8E50B.2010802@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 Hi Bo, On 01/16/2015 10:30 AM, Bo Shen wrote: > On 01/16/2015 05:10 PM, Andreas Bie?mann wrote: >> On 01/16/2015 03:53 AM, Bo Shen wrote: >>> --- a/arch/arm/cpu/arm926ejs/at91/Makefile >>> +++ b/arch/arm/cpu/arm926ejs/at91/Makefile >>> @@ -25,5 +25,9 @@ obj-y += reset.o >>> obj-y += timer.o >>> >>> ifndef CONFIG_SKIP_LOWLEVEL_INIT >>> +ifdef CONFIG_SPL_BUILD >>> +obj-y += spl_lowlevel_init.o >>> +else >>> obj-y += lowlevel_init.o >>> endif >>> +endif >> >> I'm fine with having two variants of lowlevel_init for a time, but we >> should consolidate this and use C-style initialisation of SDRAM and >> stuff for the other armv5 at91 devices in future. AFAIK the >> a/a/c/arm926ejs/at91/lowlevel_init.S is mainly used for NOR Flash boots, >> so using the SPL code (but not necessarily the two binary mechanism) for >> the NOR Flash boots in future is appreciated. > > OK, when all the arm9 at91 related board has SPL support, then I will do > this. Can we achieve this in this MW? >>> +ENTRY(lowlevel_init) >>> + /* >>> + * Setup a temporary stack >>> + */ >>> + ldr sp, =CONFIG_SYS_INIT_SP_ADDR >>> + bic sp, sp, #7 /* 8-byte alignment for ABI compliance */ >>> + >>> + ldr r9, =gdata >> >> I remember some patches removing the SPL gdata stuff, is that true? > > Thanks. > > Yes, just search for it, the following patch do this. > http://patchwork.ozlabs.org/patch/423789/ (arm: Reduce the scope of > lowlevel_init()) I think we should use the function provided there. What do you think? Best regards Andreas Bie?mann