diff options
author | Andreas Fenkart <afenkart@gmail.com> | 2015-04-23 14:15:42 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-05-25 10:20:04 +0300 |
commit | 1fb654fd97ff0c56ff1646dc9e73543abeb912df (patch) | |
tree | 45d0cf619dc641c4eed7c97d991b2f2e703d6e10 /drivers/mmc | |
parent | ba155e2d21f6bf05de86a78dbe5bfd8757604a65 (diff) | |
download | linux-1fb654fd97ff0c56ff1646dc9e73543abeb912df.tar.xz |
mmc: sdio: add reset callback to bus operations
Some drivers schedule automatic hw resets. An example is mwifiex,
which schedules a card reset if the command handler between driver
and card firmware becomes out of sync
Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/sdio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 5bc6c7dbbd60..f6c28a7ea8df 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1056,6 +1056,12 @@ static int mmc_sdio_runtime_resume(struct mmc_host *host) return mmc_sdio_power_restore(host); } +static int mmc_sdio_reset(struct mmc_host *host) +{ + mmc_power_cycle(host, host->card->ocr); + return mmc_sdio_power_restore(host); +} + static const struct mmc_bus_ops mmc_sdio_ops = { .remove = mmc_sdio_remove, .detect = mmc_sdio_detect, @@ -1066,6 +1072,7 @@ static const struct mmc_bus_ops mmc_sdio_ops = { .runtime_resume = mmc_sdio_runtime_resume, .power_restore = mmc_sdio_power_restore, .alive = mmc_sdio_alive, + .reset = mmc_sdio_reset, }; |