[U-Boot] [PATCH] spi: mxs: Allow other chip selects to work

Mike Frysinger vapier at gentoo.org
Mon Apr 23 19:43:27 CEST 2012


On Monday 23 April 2012 08:43:12 Fabio Estevam wrote:
> --- a/drivers/spi/mxs_spi.c
> +++ b/drivers/spi/mxs_spi.c
> @@ -56,12 +58,19 @@ struct spi_slave *spi_setup_slave(unsigned int bus,
> 
>  	if (bus > 3) {
>  		printf("MXS SPI: Max bus number is 3\n");
>  		return NULL;
>  	}
> 
> +	if (cs > 2) {
> +		printf("MXS SPI: Invalid chip select number: %d\n", cs);
> +		return NULL;
> +	}

this stuff really belongs in spi_cs_is_valid(), sans the printf's.
-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/20120423/10aed766/attachment.pgp>


More information about the U-Boot mailing list