From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 13 Dec 2011 18:31:50 +0100 Subject: [U-Boot] [PATCH V2] nand_spl_simple: store ecc data on the stack In-Reply-To: References: <1323624146-8402-1-git-send-email-sbabic@denx.de> <1323775818-28853-1-git-send-email-sbabic@denx.de> Message-ID: <4EE78C06.703@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13/12/2011 16:58, Tom Rini wrote: > On Tue, Dec 13, 2011 at 4:30 AM, Stefano Babic wrote: >> Currently nand_spl_simple puts it's temp data at 0x10000 offset in SDRAM >> which is likely to contain already loaded data. >> The patch saves the oob data and the ecc on the stack replacing >> the fixed address in RAM. > > OK, I think we need some convenience defines in nand_spl_simple.c: > >> + u_char ecc_calc[CONFIG_SYS_NAND_ECCSTEPS * CONFIG_SYS_NAND_ECCBYTES]; > > This is long and used in a lot of places. Furthermore... > >> #define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ >> CONFIG_SYS_NAND_ECCSIZE) > > Is what everyone does. Right, I've missed this one - we can then drop CONFIG_SYS_NAND_ECCSTEPS also from configuration files. > So if we replace ECCSTEPS with > (PAGE_SIZE/ECCSIZE) it gets eve longer. We should probably #define > SYS_NAND_ECCSTEPS, SYS_NAND_ECCTOTAL up top and go with it. I'll do in V3. Regards, Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================