omap3_spi: fix bus numbers according to omap3_add_spi[1-4]
Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
7230ca2380
commit
630c4ecc5e
|
@ -327,10 +327,10 @@ static int omap3_spi_setup(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
struct spi_master *master = spi->master;
|
struct spi_master *master = spi->master;
|
||||||
|
|
||||||
if (((master->bus_num == 0) && (spi->chip_select > 3)) ||
|
if (((master->bus_num == 1) && (spi->chip_select > 3)) ||
|
||||||
((master->bus_num == 1) && (spi->chip_select > 1)) ||
|
|
||||||
((master->bus_num == 2) && (spi->chip_select > 1)) ||
|
((master->bus_num == 2) && (spi->chip_select > 1)) ||
|
||||||
((master->bus_num == 3) && (spi->chip_select > 0))) {
|
((master->bus_num == 3) && (spi->chip_select > 1)) ||
|
||||||
|
((master->bus_num == 4) && (spi->chip_select > 0))) {
|
||||||
printf("SPI error: unsupported chip select %i \
|
printf("SPI error: unsupported chip select %i \
|
||||||
on bus %i\n", spi->chip_select, master->bus_num);
|
on bus %i\n", spi->chip_select, master->bus_num);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -363,10 +363,10 @@ static int omap3_spi_probe(struct device_d *dev)
|
||||||
/*
|
/*
|
||||||
* OMAP3 McSPI (MultiChannel SPI) has 4 busses (modules)
|
* OMAP3 McSPI (MultiChannel SPI) has 4 busses (modules)
|
||||||
* with different number of chip selects (CS, channels):
|
* with different number of chip selects (CS, channels):
|
||||||
* McSPI1 has 4 CS (bus 0, cs 0 - 3)
|
* McSPI1 has 4 CS (bus 1, cs 0 - 3)
|
||||||
* McSPI2 has 2 CS (bus 1, cs 0 - 1)
|
* McSPI2 has 2 CS (bus 2, cs 0 - 1)
|
||||||
* McSPI3 has 2 CS (bus 2, cs 0 - 1)
|
* McSPI3 has 2 CS (bus 3, cs 0 - 1)
|
||||||
* McSPI4 has 1 CS (bus 3, cs 0)
|
* McSPI4 has 1 CS (bus 4, cs 0)
|
||||||
*
|
*
|
||||||
* The board code has to make sure that it does not use
|
* The board code has to make sure that it does not use
|
||||||
* invalid buses or chip selects.
|
* invalid buses or chip selects.
|
||||||
|
|
Loading…
Reference in New Issue