linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Ian Molton <ian.molton@codethink.co.uk>,
	Chris Ball <chris@printf.net>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: tmio: Fix hang during suspend
Date: Fri, 15 Aug 2014 16:42:33 +0200	[thread overview]
Message-ID: <CAPDyKFpuCyRVJe_oRTukoryDAMK9iN5qoR4VU2wrjnvjMA-+Bg@mail.gmail.com> (raw)
In-Reply-To: <1408029833-6970-1-git-send-email-geert+renesas@glider.be>

On 14 August 2014 17:23, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> On R-Car Gen 2, the SDHI registers cannot be accessed while the SDHI
> module clock is disabled. Doing so will cause a lock-up.
>
> When suspending, enable the module clock before disabling the SDHI
> interrupts, and disable the clock again afterwards.
>
> This fixes suspend and resume on r8a7791/koelsch.

Out of curiosity, are you using CONFIG_PM_RUNTIME to trigger this bug?

Kind regards
Uffe

>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/mmc/host/tmio_mmc_pio.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
> index faf0924e71cb..83192420a7e3 100644
> --- a/drivers/mmc/host/tmio_mmc_pio.c
> +++ b/drivers/mmc/host/tmio_mmc_pio.c
> @@ -1147,8 +1147,18 @@ int tmio_mmc_host_suspend(struct device *dev)
>  {
>         struct mmc_host *mmc = dev_get_drvdata(dev);
>         struct tmio_mmc_host *host = mmc_priv(mmc);
> +       struct tmio_mmc_data *pdata = host->pdata;
> +
> +       if (pdata->clk_enable) {
> +               unsigned int f;
> +               pdata->clk_enable(host->pdev, &f);
> +       }
>
>         tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
> +
> +       if (pdata->clk_disable)
> +               pdata->clk_disable(host->pdev);
> +
>         return 0;
>  }
>  EXPORT_SYMBOL(tmio_mmc_host_suspend);
> --
> 1.9.1
>

  parent reply	other threads:[~2014-08-15 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 15:23 [PATCH] mmc: tmio: Fix hang during suspend Geert Uytterhoeven
2014-08-15 12:49 ` Ian Molton
2014-08-18 12:36   ` Geert Uytterhoeven
2014-08-18 13:10     ` Ulf Hansson
2014-08-19  9:18       ` Geert Uytterhoeven
2014-08-15 14:42 ` Ulf Hansson [this message]
2014-08-15 15:10   ` Geert Uytterhoeven

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=CAPDyKFpuCyRVJe_oRTukoryDAMK9iN5qoR4VU2wrjnvjMA-+Bg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=chris@printf.net \
    --cc=geert+renesas@glider.be \
    --cc=ian.molton@codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    /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).