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

Scott Wood scottwood at freescale.com
Wed Jan 11 00:01:59 CET 2012


On 12/13/2011 01:33 PM, 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.
> 
> Signed-off-by: Stefano Babic <sbabic at denx.de>
> CC: Ilya Yanok <yanok at emcraft.com>
> CC: Scott Wood <scottwood at freescale.com>
> CC: Tom Rini <tom.rini at gmail.com>
> CC: Simon Schwarz <simonschwarzcor at googlemail.com>
> CC: Wolfgang Denk <wd at denx.de>
> ---
> V4:
>  - Drop SYS_ from local defines (Wolfgang Denk, Scott Wood)
>  - drop parenthesis around defines (Scott Wood)
> 
> V3:
>  - use local defines for CONFIG_SYS_NAND_ECCSTEPS and
>    CONFIG_SYS_NAND_ECCTOTAL (Tom Rini)
>  - drop CONFIG_SYS_NAND_ECCSTEPS from board config files
> 
> V2:
>  - CONFIG_SYS_NAND_ECCTOTAL can always be computed (Ilya Yanok)
>  - drop all CONFIG_SYS_NAND_ECCTOTAL in arm boards using nand_simple.c
> 
>  drivers/mtd/nand/nand_spl_simple.c     |   42 ++++++++++++-------------------
>  include/configs/am3517_crane.h         |    4 ---
>  include/configs/am3517_evm.h           |    4 ---
>  include/configs/devkit8000.h           |    5 ----
>  include/configs/hawkboard.h            |    5 +---
>  include/configs/omap3_beagle.h         |    4 ---
>  include/configs/omap3_evm.h            |    4 ---
>  include/configs/omap3_evm_quick_nand.h |    4 ---
>  8 files changed, 17 insertions(+), 55 deletions(-)

After this patch a hawkboard_nand build gives this:

> Configuring for hawkboard_nand - Board: hawkboard, Options: NAND_U_BOOT
> /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c: In function 'nand_read_page':
> /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c:148:17: error: 'CONFIG_SYS_NAND_ECCSTEPS' undeclared (first use in this function)
> /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c:148:17: note: each undeclared identifier is reported only once for each function it appears in
> /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c:164:18: error: 'CONFIG_SYS_NAND_ECCTOTAL' undeclared (first use in this function)
> make[1]: *** [/tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.o] Error 1
> make: *** [nand_spl] Error 2
> make: *** Waiting for unfinished jobs....

Should I drop hawkboard from this patch, or add the change to
nand_spl/nand_boot.c?  Is a hawkboard conversion to the new SPL pending
in some other tree?

-Scott



More information about the U-Boot mailing list