From: Ulf Hansson <ulf.hansson@linaro.org> To: Yoshihiro Kaneko <ykaneko0929@gmail.com> Cc: linux-mmc <linux-mmc@vger.kernel.org>, Ian Molton <ian.molton@codethink.co.uk>, Simon Horman <horms@verge.net.au>, Magnus Damm <magnus.damm@gmail.com>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, Linux-sh list <linux-sh@vger.kernel.org> Subject: Re: [PATCH/RFC] mmc: tmio: Fix suspend process Date: Thu, 18 Jun 2015 15:33:45 +0200 [thread overview] Message-ID: <CAPDyKFrF9UK6LRGX4Jc5aZxikx4+4=Pya+x4QZC=GyRbi33U7Q@mail.gmail.com> (raw) In-Reply-To: <1434302565-30996-1-git-send-email-ykaneko0929@gmail.com> On 14 June 2015 at 19:22, Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote: > From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > The clock should be enable when SDHI registers are accessed. > > Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > --- > > This patch is based on mmc-next branch of Ulf Hansson's mmc tree. > > * Perhaps this relates to the need to enhance clock management > > drivers/mmc/host/tmio_mmc_pio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c > index e3dcf31..ec10bcd 100644 > --- a/drivers/mmc/host/tmio_mmc_pio.c > +++ b/drivers/mmc/host/tmio_mmc_pio.c > @@ -1240,7 +1240,9 @@ int tmio_mmc_host_runtime_suspend(struct device *dev) > struct mmc_host *mmc = dev_get_drvdata(dev); > struct tmio_mmc_host *host = mmc_priv(mmc); > > + pm_runtime_get_sync(dev); I don't recommend doing a pm_runtime_get_sync() from your ->runtime_suspend() callback. There a often cases where this can deadlock. Anyway, isn't the clock already enabled here? > tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL); > + pm_runtime_put(dev); > > if (host->clk_cache) > tmio_mmc_clk_stop(host); > -- > 1.9.1 > Kind regards Uffe
WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@linaro.org> To: Yoshihiro Kaneko <ykaneko0929@gmail.com> Cc: linux-mmc <linux-mmc@vger.kernel.org>, Ian Molton <ian.molton@codethink.co.uk>, Simon Horman <horms@verge.net.au>, Magnus Damm <magnus.damm@gmail.com>, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>, Linux-sh list <linux-sh@vger.kernel.org> Subject: Re: [PATCH/RFC] mmc: tmio: Fix suspend process Date: Thu, 18 Jun 2015 13:33:45 +0000 [thread overview] Message-ID: <CAPDyKFrF9UK6LRGX4Jc5aZxikx4+4=Pya+x4QZC=GyRbi33U7Q@mail.gmail.com> (raw) In-Reply-To: <1434302565-30996-1-git-send-email-ykaneko0929@gmail.com> On 14 June 2015 at 19:22, Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote: > From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > The clock should be enable when SDHI registers are accessed. > > Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > --- > > This patch is based on mmc-next branch of Ulf Hansson's mmc tree. > > * Perhaps this relates to the need to enhance clock management > > drivers/mmc/host/tmio_mmc_pio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c > index e3dcf31..ec10bcd 100644 > --- a/drivers/mmc/host/tmio_mmc_pio.c > +++ b/drivers/mmc/host/tmio_mmc_pio.c > @@ -1240,7 +1240,9 @@ int tmio_mmc_host_runtime_suspend(struct device *dev) > struct mmc_host *mmc = dev_get_drvdata(dev); > struct tmio_mmc_host *host = mmc_priv(mmc); > > + pm_runtime_get_sync(dev); I don't recommend doing a pm_runtime_get_sync() from your ->runtime_suspend() callback. There a often cases where this can deadlock. Anyway, isn't the clock already enabled here? > tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL); > + pm_runtime_put(dev); > > if (host->clk_cache) > tmio_mmc_clk_stop(host); > -- > 1.9.1 > Kind regards Uffe
next prev parent reply other threads:[~2015-06-18 13:33 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-06-14 17:22 [PATCH/RFC] mmc: tmio: Fix suspend process Yoshihiro Kaneko 2015-06-14 17:22 ` Yoshihiro Kaneko 2015-06-18 13:33 ` Ulf Hansson [this message] 2015-06-18 13:33 ` Ulf Hansson
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='CAPDyKFrF9UK6LRGX4Jc5aZxikx4+4=Pya+x4QZC=GyRbi33U7Q@mail.gmail.com' \ --to=ulf.hansson@linaro.org \ --cc=horms@verge.net.au \ --cc=ian.molton@codethink.co.uk \ --cc=kuninori.morimoto.gx@renesas.com \ --cc=linux-mmc@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=magnus.damm@gmail.com \ --cc=ykaneko0929@gmail.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.