aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorJan Nikitenko <jan.nikitenko@gmail.com>2008-07-23 19:27:07 -0400
committerPierre Ossman <drzeus@drzeus.cx>2008-07-23 19:27:07 -0400
commit1685a03e98b7e9b83e0aa692c1cc470b3aa37597 (patch)
tree3cafe80a6f3fe37058a774646e2b6c0b78b32a3a /drivers/mmc/host
parent20b7997e8abdf338dcc27fb4f1333c4973a7f113 (diff)
mmc_spi: put signals to low power off fix
The original intention was to write a zero byte to mmc to force spi signals to low when doing power off. Somehow the spi_w8r8 call got there so a read followed the write of single zero byte. This patch changes that to simple write of zero byte without the following read. This way the power off is more reliable and completely sufficient. Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/mmc_spi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 41cc63360e43..7503b81374e0 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1076,6 +1076,7 @@ static void mmc_spi_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
1076 */ 1076 */
1077 if (canpower && ios->power_mode == MMC_POWER_OFF) { 1077 if (canpower && ios->power_mode == MMC_POWER_OFF) {
1078 int mres; 1078 int mres;
1079 u8 nullbyte = 0;
1079 1080
1080 host->spi->mode &= ~(SPI_CPOL|SPI_CPHA); 1081 host->spi->mode &= ~(SPI_CPOL|SPI_CPHA);
1081 mres = spi_setup(host->spi); 1082 mres = spi_setup(host->spi);
@@ -1083,7 +1084,7 @@ static void mmc_spi_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
1083 dev_dbg(&host->spi->dev, 1084 dev_dbg(&host->spi->dev,
1084 "switch to SPI mode 0 failed\n"); 1085 "switch to SPI mode 0 failed\n");
1085 1086
1086 if (spi_w8r8(host->spi, 0x00) < 0) 1087 if (spi_write(host->spi, &nullbyte, 1) < 0)
1087 dev_dbg(&host->spi->dev, 1088 dev_dbg(&host->spi->dev,
1088 "put spi signals to low failed\n"); 1089 "put spi signals to low failed\n");
1089 1090