]> git.ipfire.org Git - people/ms/u-boot.git/commit - arch/powerpc/cpu/mpc85xx/cpu_init.c
ppc/85xx: add boot from NAND/eSDHC/eSPI support
authorMingkai Hu <Mingkai.hu@freescale.com>
Fri, 11 Sep 2009 06:19:10 +0000 (14:19 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 16 Sep 2009 02:30:09 +0000 (21:30 -0500)
commit7da53351d817c6d77364cfde922891f37d0e5ed8
treeabeece002e916f67d1eb46fde6ee59e683d5cd16
parentb2eec281a811bb52941f61203d8fe35256b3582c
ppc/85xx: add boot from NAND/eSDHC/eSPI support

The MPC8536E is capable of booting form NAND/eSDHC/eSPI, this patch
implements these three bootup methods in a unified way - all of these
use the general cpu/mpc85xx/start.S, and load the main image to L2SRAM
which lets us use the SPD to initialize the SDRAM.

For all three bootup methods, the bootup process can be divided into two
stages: the first stage will initialize the corresponding controller,
configure the L2SRAM, then copy the second stage image to L2SRAM and
jump to it. The second stage image is just like the general U-Boot image
to configure all the hardware and boot up to U-Boot command line.

When boot from NAND, the eLBC controller will first load the first stage
image to internal 4K RAM buffer because it's also stored on the NAND
flash. The first stage image, also call 4K NAND loader, will initialize
the L2SRAM, load the second stage image to L2SRAM and jump to it. The 4K
NAND loader's code comes from the corresponding nand_spl directory, along
with the code twisted by CONFIG_NAND_SPL.

When boot from eSDHC/eSPI, there's no such a first stage image because
the CPU ROM code does the same work. It will initialize the L2SRAM
according to the config addr/word pairs on the fixed address and
initialize the eSDHC/eSPI controller, then load the second stage image
to L2SRAM and jump to it.

The macro CONFIG_SYS_RAMBOOT is used to control the code to produce the
second stage image for all different bootup methods. It's set in the
board config file when one of the bootup methods above is selected.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
cpu/mpc85xx/cpu_init.c
cpu/mpc85xx/start.S
cpu/mpc85xx/tlb.c
cpu/mpc85xx/u-boot-nand.lds [new file with mode: 0644]
drivers/misc/fsl_law.c