public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Ulrich Hecht <uli+renesas@fpond.eu>,
	Simon Horman <horms+renesas@verge.net.au>,
	Niklas Soderlund <niklas.soderlund@ragnatech.se>,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH 1/2] mmc: tmio: Further fixup runtime PM management at remove
Date: Mon, 18 May 2020 22:02:47 +0200	[thread overview]
Message-ID: <20200518200247.GB5109@ninjato> (raw)
In-Reply-To: <CAPDyKFr-7OkMW0UU_M78igBScOXiY784_TkqeHHwmVdZViRw6w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

On Fri, May 15, 2020 at 05:02:08PM +0200, Ulf Hansson wrote:
> On Fri, 15 May 2020 at 16:04, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > Before calling tmio_mmc_host_probe(), the caller is required to enable
> > clocks for its device, as to make it accessible when reading/writing
> > registers during probe.
> >
> > Therefore, the responsibility to disable these clocks, in the error path of
> > ->probe() and during ->remove(), is better managed outside
> > tmio_mmc_host_remove(). As a matter of fact, callers of
> > tmio_mmc_host_remove() already expects this to be the behaviour.
> >
> > However, there's a problem with tmio_mmc_host_remove() when the Kconfig
> > option, CONFIG_PM, is set. More precisely, tmio_mmc_host_remove() may then
> > disable the clock via runtime PM, which leads to clock enable/disable
> > imbalance problems, when the caller of tmio_mmc_host_remove() also tries to
> > disable the same clocks.
> 
> Just realized that part of the commit message is missing, explaining
> the change. I intend to add this:
> 
> To solve the problem, let's make sure tmio_mmc_host_remove() leaves
> the device with clocks enabled, but also make sure to disable the
> IRQs, as we normally do at ->runtime_suspend().

Yeah, this paragraph is definately needed.

> Also, this is untested, so relying on you guys with the HW at hand.

I tested this on Gen3 M3-N (works fine!) and will next check your other
patch. If this is okay, too, I will check them on Gen2 tomorrow before I
give my Tested-by.

Ulf, thanks for working on this, too!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-05-18 20:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 14:04 [PATCH 1/2] mmc: tmio: Further fixup runtime PM management at remove Ulf Hansson
2020-05-15 15:02 ` Ulf Hansson
2020-05-18 20:02   ` Wolfram Sang [this message]
2020-05-19 13:56 ` Wolfram Sang
  -- strict thread matches above, loose matches on Subject: below --
2020-05-19 15:24 Ulf Hansson
2020-05-20 11:35 ` Ulf Hansson
2020-05-20 14:30 ` Geert Uytterhoeven
2020-05-20 15:18   ` Ulf Hansson
2020-05-20 15:49   ` Wolfram Sang
2020-05-20 18:19     ` Geert Uytterhoeven
2020-05-20 19:29       ` Geert Uytterhoeven
2020-05-20 20:32         ` Wolfram Sang

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=20200518200247.GB5109@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=geert+renesas@glider.be \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-mmc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=ulf.hansson@linaro.org \
    --cc=uli+renesas@fpond.eu \
    --cc=yamada.masahiro@socionext.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