Commit dc0ecfef authored by Johan Rudholm's avatar Johan Rudholm Committed by Ulf Hansson

mmc: sd: add reset bus_ops callback

Enable power cycle and re-initialization of SD cards via the reset
bus_ops. Power cycling a buggy SD card sometimes helps it get back on
track.
Signed-off-by: default avatarJohan Rudholm <johanru@axis.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent f855a371
...@@ -1197,6 +1197,12 @@ static int mmc_sd_power_restore(struct mmc_host *host) ...@@ -1197,6 +1197,12 @@ static int mmc_sd_power_restore(struct mmc_host *host)
return ret; return ret;
} }
static int mmc_sd_reset(struct mmc_host *host)
{
mmc_power_cycle(host, host->card->ocr);
return mmc_sd_power_restore(host);
}
static const struct mmc_bus_ops mmc_sd_ops = { static const struct mmc_bus_ops mmc_sd_ops = {
.remove = mmc_sd_remove, .remove = mmc_sd_remove,
.detect = mmc_sd_detect, .detect = mmc_sd_detect,
...@@ -1207,6 +1213,7 @@ static const struct mmc_bus_ops mmc_sd_ops = { ...@@ -1207,6 +1213,7 @@ static const struct mmc_bus_ops mmc_sd_ops = {
.power_restore = mmc_sd_power_restore, .power_restore = mmc_sd_power_restore,
.alive = mmc_sd_alive, .alive = mmc_sd_alive,
.shutdown = mmc_sd_suspend, .shutdown = mmc_sd_suspend,
.reset = mmc_sd_reset,
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment