[U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
Christian Riesch
christian.riesch at omicron.at
Tue Nov 22 08:35:56 CET 2011
Hello Mike,
Thank you for your comments.
On Mon, Nov 21, 2011 at 8:07 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> 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 ?
As Scott already posted, something similar was introduced for nand in
commit 435199f38020c294659a44607ca0e1b6f0ed1542 and it is in
drivers/mtd/nand.
>> --- /dev/null
>> +++ b/drivers/mtd/spi/spi_spl_load.c
>>
>> + puts("Probing SPI flash...\n");
>
> useless noise ?
Yes :-) Will be removed.
>
>> + 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.
Ok, I'll change that.
>> --- 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 ?
Not completely unrelated. It's a dependency to make
CONFIG_SPL_SPI_FLASH_SUPPORT compile. But it should probably be moved
to a separate patch.
Regards, Christian
More information about the U-Boot
mailing list