[U-Boot] [PATCH V2] nand_spl_simple: store ecc data on the stack

Stefano Babic sbabic at denx.de
Tue Dec 13 18:31:50 CET 2011


On 13/12/2011 16:58, Tom Rini wrote:
> On Tue, Dec 13, 2011 at 4:30 AM, Stefano Babic <sbabic at denx.de> 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
=====================================================================


More information about the U-Boot mailing list