[U-Boot] [PATCH V3 4/6] sf command: allow default chip select through CONFIG_SPI_FLASH_CS

Mike Frysinger vapier at gentoo.org
Wed Jan 25 20:10:26 CET 2012


On Wednesday 25 January 2012 10:10:18 Matthias Fuchs wrote:
> Can you also add a config option for the SPI bus number? I think these
> two need to handled in the same patch.
> 
> So you could add this stuff:
> 
>  static int do_spi_flash_probe(int argc, char * const argv[])
>  {
> +#ifdef CONFIG_SF_DEFAULT_BUS
> +       unsigned int bus = CONFIG_SF_DEFAULT_BUS;
> +#else
>         unsigned int bus = 0;
> +#endif

move the default logic to the top of the file like the existing 
CONFIG_SF_DEFAULT_SPEED, then the code later on only needs to do:
	unsigned int bus = CONFIG_SF_DEFAULT_BUS;

otherwise, this suggestion sounds good too
-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/20120125/4e46854f/attachment.pgp>


More information about the U-Boot mailing list