From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Mon, 23 Apr 2012 13:43:27 -0400 Subject: [U-Boot] [PATCH] spi: mxs: Allow other chip selects to work In-Reply-To: <1335184992-2381-1-git-send-email-fabio.estevam@freescale.com> References: <1335184992-2381-1-git-send-email-fabio.estevam@freescale.com> Message-ID: <201204231343.28756.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: