[U-Boot] [PATCH v2 3/8] tegra2: spi: Add SPI driver for Tegra2 SOC

Mike Frysinger vapier at gentoo.org
Sun Nov 6 09:41:39 CET 2011


On Saturday 05 November 2011 15:17:37 Simon Glass wrote:
> On Sat, Nov 5, 2011 at 10:13 AM, Mike Frysinger wrote:
> > On Saturday 05 November 2011 10:36:30 Simon Glass wrote:
> >> On Thu, Nov 3, 2011 at 6:36 PM, Mike Frysinger wrote:
> >> > On Thursday 03 November 2011 18:41:34 Simon Glass wrote:
> >> >> --- /dev/null
> >> >> +++ b/drivers/spi/tegra2_spi.c
> >> >> 
> >> >> +int spi_cs_is_valid(unsigned int bus, unsigned int cs)
> >> >> +{
> >> >> +     /* Tegra2 SPI-Flash - only 1 device ('bus/cs') */
> >> >> +     if (bus > 0 && cs != 0)
> >> >> +             return 0;
> >> >> +     else
> >> >> +             return 1;
> >> >> +}
> >> > 
> >> > shouldn't that be "||" and not "&&" ?
> >> 
> >> This function should be removed as it doesn't print enough errors.
> > 
> > this func is part of the SPI API.  you can't remove it ;).
> 
> OK - it seems to only be used by the mmc_spi command which Tegra isn't
> using. But I will add it back in. (Should it be called in
> spi_flash_probe(), for example?)

the call in mmc_spi could conceivably be dropped since spi_setup_slave() 
verifies things itself.  the point of having this func be split out is so 
boards could override it (as well as the cs activate/deactivate funcs).
-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/20111106/00624409/attachment.pgp 


More information about the U-Boot mailing list