
13 Dec
2011
13 Dec
'11
4:58 p.m.
On Tue, Dec 13, 2011 at 4:30 AM, Stefano Babic sbabic@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. 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.
--
Tom