linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
Subject: Re: [PATCH] mmc: tmio: make sure SDIO gets reinitialized after resume
Date: Tue, 30 May 2017 11:55:18 +0200	[thread overview]
Message-ID: <CAPDyKFqR9b9ogbQ2Ln-uscUytihdMCdAHH6+2=cymSFHYg2-mw@mail.gmail.com> (raw)
In-Reply-To: <20170523133408.11651-1-wsa+renesas@sang-engineering.com>

On 23 May 2017 at 15:34, Wolfram Sang <wsa+renesas@sang-engineering.com> wrote:
> To achieve that, we set the registers in the generic HW reset routine
> which gets called at both, init and resume. We also make sure to move
> SDIO initialization before reset gets called in probe().
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Tested-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>
> Changes since RFT:
> * added tag from Hayakawa-san (thanks!)
> * rebased to mmc/next (on top of the DMA refactor series)
>
>  drivers/mmc/host/tmio_mmc_core.c | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index e1ad461c4b8c8f..ed40681253497a 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -265,6 +265,12 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
>         if (host->pdata->flags & TMIO_MMC_HAVE_HIGH_REG)
>                 sd_ctrl_write16(host, CTL_RESET_SDIO, 0x0001);
>         msleep(10);
> +
> +       if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) {
> +               sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
> +               sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
> +       }
> +
>  }
>
>  static void tmio_mmc_reset_work(struct work_struct *work)
> @@ -1280,6 +1286,10 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
>         if (_host->native_hotplug)
>                 pm_runtime_get_noresume(&pdev->dev);
>
> +       _host->sdio_irq_enabled = false;
> +       if (pdata->flags & TMIO_MMC_SDIO_IRQ)
> +               _host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
> +
>         tmio_mmc_clk_stop(_host);
>         tmio_mmc_reset(_host);
>
> @@ -1296,13 +1306,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host,
>
>         _host->sdcard_irq_mask &= ~irq_mask;
>
> -       _host->sdio_irq_enabled = false;
> -       if (pdata->flags & TMIO_MMC_SDIO_IRQ) {
> -               _host->sdio_irq_mask = TMIO_SDIO_MASK_ALL;
> -               sd_ctrl_write16(_host, CTL_SDIO_IRQ_MASK, _host->sdio_irq_mask);
> -               sd_ctrl_write16(_host, CTL_TRANSACTION_CTL, 0x0001);
> -       }
> -
>         spin_lock_init(&_host->lock);
>         mutex_init(&_host->ios_lock);
>
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2017-05-30  9:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 13:34 [PATCH] mmc: tmio: make sure SDIO gets reinitialized after resume Wolfram Sang
2017-05-30  9:55 ` Ulf Hansson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPDyKFqR9b9ogbQ2Ln-uscUytihdMCdAHH6+2=cymSFHYg2-mw@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=masaharu.hayakawa.ry@renesas.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).