[U-Boot] [PATCH V6 2/5] omap-common: add nand spl support

Scott Wood scottwood at freescale.com
Thu Jul 28 20:50:05 CEST 2011


On Thu, 28 Jul 2011 19:46:25 +0530
Aneesh V <aneesh at ti.com> wrote:

> On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
> > +#ifdef CONFIG_SPL_NAND_SUPPORT
> > +static void nand_load_image(void)
> > +{
> > +	gpmc_init();
> > +	nand_init();
> > +	nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
> > +		CONFIG_SYS_NAND_U_BOOT_SIZE,
> > +		(uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
> 
> Guess CONFIG_SYS_NAND_U_BOOT_DST is same as CONFIG_SYS_TEXT_BASE. Why
> define a new flag then?

History from when CONFIG_SYS_TEXT_BASE was just TEXT_BASE and there was no
separate CONFIG_SYS_TEXT_BASE_SPL.  Also, what if there's a middle step
before the final U-Boot?  This is a define that's used across all
platforms.

> > +#ifdef CONFIG_NAND_ENV_DST
> > +	nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
> > +		(uchar *)CONFIG_NAND_ENV_DST);
> > +#ifdef CONFIG_ENV_OFFSET_REDUND
> > +	nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
> > +		(uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
> > +#endif
> > +#endif
> > +	nand_deselect();
> > +	parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
> 
> I think you are assuming the image type and size here.

This is how all the other NAND SPLs do it.  We're building both at the same
time to create a single combination image, so it's not that bad of an
assumption.

An image header might simplify the chained spl/tpl case, though.

-Scott



More information about the U-Boot mailing list