[U-Boot-Users] Booting from NAND flash

Craig Millen craig.millen at pikatech.com
Wed Nov 28 21:16:02 CET 2007


Hello all.
I am currently trying to use u-boot to boot from NAND flash as opposed
to NOR flash. 
We have both on our board, but would rather just use NAND and depopulate
the NOR.
 
Questions:
There seems to be only one complete setup that includes a bootloader and
full support for NAND booting, which is the AMCC/Sequoia board.  Though
my board is very similar, we are using the PPC440EP and not the
PPC440EPX, with the latter having internal RAM. 
Has anyone booted u-boot from NAND by using the external RAM?
 
Excerpt from u-boot/cpu/ppc4xx/start.S starting at line 389:
 
#if defined(CONFIG_NAND_SPL)
 /*
  * Enable internal SRAM
  */
 
 lis r2,0x7fff
 ori r2,r2,0xffff
 mfdcr r1,isram0_dpc
 and r1,r1,r2  /* Disable parity check */
 mtdcr isram0_dpc,r1
 mfdcr r1,isram0_pmeg
 and r1,r1,r2  /* Disable pwr mgmt */
 mtdcr isram0_pmeg,r1
 
 /*
  * Copy SPL from cache into internal SRAM
  */
 li r4,(CFG_NAND_BOOT_SPL_SIZE >> 2) - 1
 mtctr r4
 lis r2,CFG_NAND_BOOT_SPL_SRC at h
 ori r2,r2,CFG_NAND_BOOT_SPL_SRC at l
 lis r3,CFG_NAND_BOOT_SPL_DST at h
 ori r3,r3,CFG_NAND_BOOT_SPL_DST at l
 
spl_loop: 
 lwzu r4,4(r2)
 stwu r4,4(r3)
 bdnz spl_loop
 
 /*
  * Jump to code in RAM
  */
.... etc
 
Based on this snippet of code, it seems to imply that the secondary
program loader (NAND_SPL) can only be used if you have internal memory.
If this is the case, I don't understand why there isn't an additional
clause something like:
#if defined(CONFIG_NAND_SPL && (CONFIG_440EPX) ||
defined(CONFIG_440GRX)))
 
 
Any information on booting from NAND is greatly appreciated.
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071128/3668858c/attachment.htm 


More information about the U-Boot mailing list