public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH] mmc: tmio: Don't access hardware registers after stopping clocks
Date: Tue, 12 Jun 2012 23:28:22 +0200	[thread overview]
Message-ID: <3019432.q0GM0tRQD3@avalon> (raw)
In-Reply-To: <Pine.LNX.4.64.1206121517590.6800@axis700.grange>

Hi Guennadi,

On Tuesday 12 June 2012 15:31:49 Guennadi Liakhovetski wrote:
> On Tue, 12 Jun 2012, Laurent Pinchart wrote:
> > The tmio_mmc_set_ios() function configures the MMC power, clock and bus
> > width. When the MMC controller gets powered off, runtime PM switches the
> > MSTP clock off. Writing to to CTL_SD_MEM_CARD_OPT register afterwards
> > fails and prints an error message to the kernel log.
> > 
> > As configuring the bus width is pointless when the interface gets
> > powered down, skip the operation when power is off.
> 
> The patch looks good - thanks! But maybe we can make the commit message a
> bit more precise. I think, ios->power_mode refers to powering the card
> down and up, not the controller. We use this information to also try to
> put the controller in a power-saving mode. Depending on the kernel and
> board configuration this can be a NOP, it can switch the MSTP clock off,
> as you correctly notice, or it can power the whole PM domain, to which the
> controller belongs, down. So, maybe something like this would be better:
> 
> The tmio_mmc_set_ios() function configures the MMC power, clock and bus
> width. When the mmc core requests the driver to power off the card, we
> inform runtime PM, that the controller can be suspended. This can lead to
> the MSTP clock being turned off. Writing to to CTL_SD_MEM_CARD_OPT
> register afterwards fails and prints an error message to the kernel log.
> 
> As conf... (continue as above)
> 
> Feel free to further improve the above :)

Thank you for the feedback. I'll send a v2 that incorporates a second related 
fix.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2012-06-12 21:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 12:57 [PATCH] mmc: tmio: Don't access hardware registers after stopping clocks Laurent Pinchart
2012-06-12 13:31 ` Guennadi Liakhovetski
2012-06-12 21:28   ` Laurent Pinchart [this message]
2012-06-14 11:12 ` Magnus Damm
2012-06-14 19:12   ` Laurent Pinchart
2012-06-14 19:37     ` Rafael J. Wysocki
2012-06-14 20:34       ` Laurent Pinchart
2012-06-14 21:48         ` Rafael J. Wysocki
2012-06-15 10:03           ` Rafael J. Wysocki
2012-06-15 10:17             ` Laurent Pinchart
2012-06-15 19:08               ` Rafael J. Wysocki
2012-06-15  0:47     ` Magnus Damm
2012-06-15  7:09       ` Guennadi Liakhovetski
2012-06-19  6:53         ` Magnus Damm
2012-06-19  9:34           ` Laurent Pinchart

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=3019432.q0GM0tRQD3@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --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