public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Booting from NAND flash
@ 2007-11-28 20:16 Craig Millen
  2007-11-29  6:19 ` Stefan Roese
  0 siblings, 1 reply; 3+ messages in thread
From: Craig Millen @ 2007-11-28 20:16 UTC (permalink / raw)
  To: u-boot

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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] Booting from NAND flash
  2007-11-28 20:16 [U-Boot-Users] Booting from NAND flash Craig Millen
@ 2007-11-29  6:19 ` Stefan Roese
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2007-11-29  6:19 UTC (permalink / raw)
  To: u-boot

Hi Craig,

On Wednesday 28 November 2007, Craig Millen wrote:
> 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?

Yes. You missed other platforms that support NAND booting:

AMCC-Acadia (405EZ) and AMCC-Bamboo (440EP)

And here you go: 440EP is already supported.

> Excerpt from u-boot/cpu/ppc4xx/start.S starting at line 389:
>
> #if defined(CONFIG_NAND_SPL)
>  /*
>   * Enable internal SRAM
>   */

This doesn't seem to be the current source code. In the current version this 
looks like this:

#if defined(CONFIG_NAND_SPL)
#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
        /*
         * Enable internal SRAM (only on 440EPx/GRx, 440EP/GR have no OCM)
         */
        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
#endif
#if defined(CONFIG_440EP)
        /*
         * On 440EP with no internal SRAM, we setup SDRAM very early
         * and copy the NAND_SPL to SDRAM and jump to it
         */

So you should really update to the latest U-Boot version and use Bamboo as a 
reference for your NAND booting port.

Just let me know if you have any further questions.

Best regards,
Stefan

=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] Booting from NAND flash
       [not found] <mailman.815502.1196284960.7786.u-boot-users@lists.sourceforge.net>
@ 2007-11-29 14:12 ` Fowley, Douglas G
  0 siblings, 0 replies; 3+ messages in thread
From: Fowley, Douglas G @ 2007-11-29 14:12 UTC (permalink / raw)
  To: u-boot

> Message: 4
> Date: Wed, 28 Nov 2007 15:16:02 -0500
> From: "Craig Millen" <craig.millen@pikatech.com>
> Subject: [U-Boot-Users] Booting from NAND flash
> To: <u-boot-users@lists.sourceforge.net>
> Message-ID:
> 	<67BFAF42E016FC40ADE4EE73E07B70600CA43F@pks00005.kanatek.com>
> Content-Type: text/plain; charset="us-ascii"
> 
> 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?

The Freescale MPC8313E-RDB can boot from NOR, NAND, or the I2C Boot
Sequencer.  The board comes with U-Boot 1.1.6 installed in NOR.  I used
the U-Boot source package on the resource CD to build and load the NAND
version.  I then modified the NAND-SPL in U-Boot for use with the I2C
Boot Sequencer.

The result is a small SPL that resides in the I2C EEPROM on the board.
The I2C Boot Sequencer initializes DRAM, then loads and executes the
SPL from the EEPROM.  The SPL loads U-Boot from NAND, then U-Boot
proceeds like normal.

Regards,

Doug 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-29 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 20:16 [U-Boot-Users] Booting from NAND flash Craig Millen
2007-11-29  6:19 ` Stefan Roese
     [not found] <mailman.815502.1196284960.7786.u-boot-users@lists.sourceforge.net>
2007-11-29 14:12 ` Fowley, Douglas G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox