From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 10 May 2009 22:34:54 +0200 Subject: [U-Boot] [PATCH v2 1/3] MX31: Add NAND SPL for i.MX31. In-Reply-To: <59b21cf20905101231n6394d821ka7ffa26bc6dbae03@mail.gmail.com> References: <20090509210458.GF13502@game.jcrosoft.org> <59b21cf20905101231n6394d821ka7ffa26bc6dbae03@mail.gmail.com> Message-ID: <20090510203454.GG21079@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 21:31 Sun 10 May , Magnus Lilja wrote: > 2009/5/9 Jean-Christophe PLAGNIOL-VILLARD : > > On 21:56 Sun 03 May ? ? , Magnus Lilja wrote: > >> @@ -32,7 +35,7 @@ > >> ?#include > >> ?.globl _start > >> ?_start: b ? ?reset > >> -#ifdef CONFIG_ONENAND_IPL > >> +#if defined(CONFIG_ONENAND_IPL) || defined(CONFIG_NAND_SPL) > > create a better CONFIG_ > > because we could need for other boot mode > > A better CONFIG_ than what? CONFIG_NAND_SPL is already used elsewhere > in U-boot when booting from NAND. IIRC in this case the purpose is to reduce the size of the start.S to allow more code in the ipl & spl > > >> ? ? ? ldr ? ? pc, _hang > >> ? ? ? ldr ? ? pc, _hang > >> ? ? ? ldr ? ? pc, _hang > >> @@ -156,9 +159,9 @@ relocate: ? ? ? ? ? ? ? ? ? ? ? ? /* relocate U-Boot to RAM ? ? ? ? ? */ > >> ? ? ? adr ? ? r0, _start ? ? ? ? ? ? ?/* r0 <- current position of code ? */ > >> ? ? ? ldr ? ? r1, _TEXT_BASE ? ? ? ? ?/* test if we run from flash or RAM */ > >> ? ? ? cmp ? ? r0, r1 ? ? ? ? ? ? ? ? ?/* don't reloc during debug ? ? ? ? */ > >> -#ifndef CONFIG_ONENAND_IPL > >> +#if !defined(CONFIG_ONENAND_IPL) && !defined(CONFIG_NAND_SPL) > >> ? ? ? beq ? ? stack_setup > >> -#endif ? ? ? /* CONFIG_ONENAND_IPL */ > >> +#endif ? ? ? /* !CONFIG_ONENAND_IPL && !CONFIG_NAND_SPL*/ > >> > >> ?#endif ? ? ? /* CONFIG_ONENAND_IPL */ > >> + > >> + ? ? } > >> + > >> + ? ? page_count = CFG_NAND_CHIP_SIZE / CFG_NAND_PAGE_SIZE; > > please use CONFIG_SYS_ or CONFIG_ > > Will do. > > > and why not detect it? > > Might be possible, I'll look into it to see if it's doable. tks Best Regards, J.