aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWolfgang Muees <wolfgang.mues@auerswald.de>2009-03-11 09:13:15 -0400
committerPierre Ossman <drzeus@drzeus.cx>2009-03-24 16:30:01 -0400
commit48881caec426786cd451383ee53943cc5d3bfdeb (patch)
tree1a7bafb65415bf4ddedc4d1c1dec94b7356d41dc /drivers/mmc
parentb8e2006d5b17e58a18b38fc5a38769aad5f78d98 (diff)
mmc_spi: allow setting of spi mode 3
Allow the platform data structures to specify spi mode 3 (if there is a pullup on the clock line or the spi hardware is not able to serve spi mode 0). Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmc_spi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 87e211df68ac..ad9e0e213f64 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1204,10 +1204,12 @@ static int mmc_spi_probe(struct spi_device *spi)
1204 1204
1205 /* MMC and SD specs only seem to care that sampling is on the 1205 /* MMC and SD specs only seem to care that sampling is on the
1206 * rising edge ... meaning SPI modes 0 or 3. So either SPI mode 1206 * rising edge ... meaning SPI modes 0 or 3. So either SPI mode
1207 * should be legit. We'll use mode 0 since it seems to be a 1207 * should be legit. We'll use mode 0 since the steady state is 0,
1208 * bit less troublesome on some hardware ... unclear why. 1208 * which is appropriate for hotplugging, unless the platform data
1209 * specify mode 3 (if hardware is not compatible to mode 0).
1209 */ 1210 */
1210 spi->mode = SPI_MODE_0; 1211 if (spi->mode != SPI_MODE_3)
1212 spi->mode = SPI_MODE_0;
1211 spi->bits_per_word = 8; 1213 spi->bits_per_word = 8;
1212 1214
1213 status = spi_setup(spi); 1215 status = spi_setup(spi);