All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mmc: sdio: add reset callback to bus operations
@ 2015-04-23 11:15 Andreas Fenkart
  2015-05-05  8:33 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Fenkart @ 2015-04-23 11:15 UTC (permalink / raw)
  To: linux-mmc; +Cc: Ulf Hansson, Jaehoon Chung, NeilBrown, Andreas Fenkart

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>
---
 drivers/mmc/core/sdio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index ce6cc47..01255ef 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -1064,6 +1064,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,
@@ -1074,6 +1080,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,
 };
 
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mmc: sdio: add reset callback to bus operations
  2015-04-23 11:15 [PATCH v2] mmc: sdio: add reset callback to bus operations Andreas Fenkart
@ 2015-05-05  8:33 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2015-05-05  8:33 UTC (permalink / raw)
  To: Andreas Fenkart; +Cc: linux-mmc, Jaehoon Chung, NeilBrown

On 23 April 2015 at 13:15, Andreas Fenkart <afenkart@gmail.com> wrote:
> 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>

Thanks, applied!

Kind regards
Uffe

> ---
>  drivers/mmc/core/sdio.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
> index ce6cc47..01255ef 100644
> --- a/drivers/mmc/core/sdio.c
> +++ b/drivers/mmc/core/sdio.c
> @@ -1064,6 +1064,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,
> @@ -1074,6 +1080,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,
>  };
>
>
> --
> 2.1.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-05  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23 11:15 [PATCH v2] mmc: sdio: add reset callback to bus operations Andreas Fenkart
2015-05-05  8:33 ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.