[U-Boot] [PATCH v2] mpc83xx: Add NAND boot support for MPC8315E-RDB boards

Kim Phillips kim.phillips at freescale.com
Mon Dec 7 22:10:34 CET 2009


On Tue, 24 Nov 2009 20:12:12 +0300
Anton Vorontsov <avorontsov at ru.mvista.com> wrote:

> Here is the updated patch.
> 
>  MAKEALL                                   |    1 +
>  Makefile                                  |    6 ++-
>  board/freescale/mpc8315erdb/config.mk     |    8 +++
>  board/freescale/mpc8315erdb/mpc8315erdb.c |   42 +++++++++++++
>  board/freescale/mpc8315erdb/sdram.c       |    7 ++
>  include/configs/MPC8315ERDB.h             |   95 +++++++++++++++++++++++------
>  6 files changed, 139 insertions(+), 20 deletions(-)

please add NAND boot instructions to doc/README.mpc8315erdb also.

> diff --git a/MAKEALL b/MAKEALL
> index d63c5c2..821e3e8 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -360,6 +360,7 @@ LIST_83xx="		\
>  	MPC8313ERDB_33	\
>  	MPC8313ERDB_NAND_66	\
>  	MPC8315ERDB	\
> +	MPC8315ERDB_NAND	\
>  	MPC8323ERDB	\
>  	MPC832XEMDS	\
>  	MPC832XEMDS_ATM	\
> diff --git a/Makefile b/Makefile
> index bcb3fe9..13c34f8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2291,8 +2291,12 @@ MPC8313ERDB_NAND_66_config: unconfig
>  		echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk ; \
>  	fi ;
>  
> +MPC8315ERDB_NAND_config \
>  MPC8315ERDB_config: unconfig
> -	@$(MKCONFIG) -a MPC8315ERDB ppc mpc83xx mpc8315erdb freescale
> +	if [ "$(findstring _NAND_,$@)" ] ; then \

missing leading @ - s/if/@if/.

> +		ln -sf mpc8313erdb nand_spl/board/freescale/mpc8315erdb ; \
> +	fi ;

can we instead permanently rename
nand_spl/board/freescale/mpc8313erdb to mpc831xerdb...argh, probably
not without merging the non-NAND parts also...

> +++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
...
> +void board_init_f(ulong bootflag)
> +{
> +	board_early_init_f();
> +	NS16550_init((NS16550_t)(CONFIG_SYS_IMMR + 0x4500),
> +		     CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
> +	puts("NAND boot... ");
> +	init_timebase();
> +	initdram(0);
> +	relocate_code(CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000, (gd_t *)gd,

use CONFIG_SYS_NAND_U_BOOT_RELOC_SP

meanwhile, 8315 NAND boot doesn't build when applied to u-boot's next
branch:

Configuring for MPC8315ERDB board...
sdram.o: In function `fixed_sdram':
/home/r1aaha/git/u-boot/nand_spl/board/freescale/mpc8313erdb/sdram.c:72: undefined reference to `udelay'

perhaps due to some confusion with setting CONFIG_SYS_RAMBOOT?

Kim


More information about the U-Boot mailing list