[U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL

Mike Frysinger vapier at gentoo.org
Mon Nov 21 20:07:49 CET 2011


On Monday 21 November 2011 11:33:43 Christian Riesch wrote:
> --- a/drivers/mtd/spi/Makefile
> +++ b/drivers/mtd/spi/Makefile
> 
> +ifdef CONFIG_SPL_BUILD
> +ifdef CONFIG_SPL_SPI_LOAD
> +COBJS-y += spi_spl_load.o
> +endif
> +endif

if it's SPL only, then it should probably be in the spl/ tree somewhere ?

> --- /dev/null
> +++ b/drivers/mtd/spi/spi_spl_load.c
>
> +	puts("Probing SPI flash...\n");

useless noise ?

> +	flash = spi_flash_probe(0, 0, CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);

hardcoding bus/cs 0:0 doesn't make much sense.  push them it into the 
arguments to the func, or add dedicated SPL defines for them which default to 
0:0.

> --- a/include/spi_flash.h
> +++ b/include/spi_flash.h
>
> +__attribute__((noreturn)) void spi_boot(void);

void spi_boot(void) __noreturn;

> --- a/lib/Makefile
> +++ b/lib/Makefile
>
>  COBJS-$(CONFIG_SHA256) += sha256.o
>  COBJS-y	+= strmhz.o
>  COBJS-$(CONFIG_RBTREE)	+= rbtree.o
> +else
> +COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o
>  endif

unrelated change ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111121/db04d994/attachment.pgp>


More information about the U-Boot mailing list