diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2013-06-06 10:35:48 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-06-06 11:48:14 -0400 |
commit | b9ec2744128d0940342b236e9018614ba8848118 (patch) | |
tree | 6c3af6dedf03955f6f584364e7ac57288d6105c4 /drivers/mmc | |
parent | e83b7a8acc420923cbe8a30901d9eb60677f54fb (diff) |
mmc: tmio: reset the controller after power-up
This fixes two reported problems:
1. after a system resume the controller isn't functioning until a command
runs on a timeout and a controller reset is performed.
2. if a card is ejected during a running write operation, its re-insertion
isn't detected.
Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Reported-by: Nguyen Hong Ky <nh-ky@jinso.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Tested-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Tested-by: Nguyen Hong Ky <nh-ky@jinso.co.jp>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/tmio_mmc_pio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 67d96428e62a..f29470835a4f 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c | |||
@@ -867,6 +867,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
867 | host->resuming = false; | 867 | host->resuming = false; |
868 | } | 868 | } |
869 | } | 869 | } |
870 | if (host->power == TMIO_MMC_OFF_STOP) | ||
871 | tmio_mmc_reset(host); | ||
870 | tmio_mmc_set_clock(host, ios->clock); | 872 | tmio_mmc_set_clock(host, ios->clock); |
871 | if (host->power == TMIO_MMC_OFF_STOP) | 873 | if (host->power == TMIO_MMC_OFF_STOP) |
872 | /* power up SD card and the bus */ | 874 | /* power up SD card and the bus */ |
@@ -1186,7 +1188,6 @@ int tmio_mmc_host_runtime_resume(struct device *dev) | |||
1186 | struct mmc_host *mmc = dev_get_drvdata(dev); | 1188 | struct mmc_host *mmc = dev_get_drvdata(dev); |
1187 | struct tmio_mmc_host *host = mmc_priv(mmc); | 1189 | struct tmio_mmc_host *host = mmc_priv(mmc); |
1188 | 1190 | ||
1189 | tmio_mmc_reset(host); | ||
1190 | tmio_mmc_enable_dma(host, true); | 1191 | tmio_mmc_enable_dma(host, true); |
1191 | 1192 | ||
1192 | return 0; | 1193 | return 0; |