linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Tseng <rogerable@realtek.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: micky <micky_ching@realsil.com.cn>, Chris Ball <chris@printf.net>,
	"Samuel Ortiz" <sameo@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	"driverdev-devel@linuxdriverproject.org" 
	<devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Wei_wang <wei_wang@realsil.com.cn>
Subject: Re: [PATCH] mmc: rtsx: add card power off during probe
Date: Mon, 22 Sep 2014 10:09:32 +0000	[thread overview]
Message-ID: <1411380672.24091.18.camel@debian-rtk5880> (raw)
In-Reply-To: <CAPDyKFqokjwerEC+6A=2h4cPH29rnX0tyW=2=KQX2rSE=SEKHw@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2094 bytes --]

On Thu, 2014-09-18 at 23:14 +0200, Ulf Hansson wrote:
> [...]
> 
> >>
> >> In that case, don't forget to enable MMC_CAP2_FULL_PWR_CYCLE.
> >>
> >> >
> >> > if MMC_CAP2_NO_PRESCAN_POWERUP enable, will call mmc_power_off() at start,
> >> > then it will check ios.power_mode, but the state is MMC_POWER_OFF and just
> >> > return.
> >>
> >> Uhh, that's right! So, I wonder why we invokes mmc_power_off() from
> >> that path at all.
> >>
> >> Hmm, I think we should change the behavior in mmc_start_host(), like below:
> >> 1) Add a "MMC_POWER_UNDEFINED" state which is what the power state
> >> should be assigned to at allocation.
> >> 2 ) From mmc_start_host(), invoke mmc_power_off() when
> >> MMC_CAP2_NO_PRESCAN_POWERUP and MMC_CAP2_FULL_PWR_CYCLE is set.
> >>
> >> Would that work?
> > Yes. I have confirmed this by following changes. The MMC_POWER_UNDEFINED
> > designation in mmc_start_host() will eventually cause a power-off
> > operation.
> >
> > But I wonder if we need to additionally check MMC_CAP2_FULL_PWR_CYCLE
> > before calling mmc_power_off()?
> 
> The intent from my side was to keep the current behaviour for those
> that already used MMC_CAP2_NO_PRESCAN_POWERUP, but it's s not a big
> deal.
> 

I checked the log and found the commit that invokes mmc_power_off():
a08b17be8b984a7c51cd5a480cd977363df353f9
0d3e3350d5871c53464be4c92d57198744247005
(https://www.mail-archive.com/linux-mmc@vger.kernel.org/msg19638.html )

The proposed change might bring back some delay since invoking
mmc_power_off() in mmc_start_host() is more than NOP now and triggers
real power-off and re-init in sdhci.

Will this be OK?

> So, let's try your proposal, thus don't check MMC_CAP2_FULL_PWR_CYCLE.
> 
> Can you repost new version of your patches and please split them up on
> core and host separately.
> 
> Kind regards
> Uffe
> 
> ------Please consider the environment before printing this e-mail.

-- 
Best regards,
Roger Tseng
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2014-09-22 10:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  1:39 [PATCH] mmc: rtsx: add card power off during probe micky_ching
2014-09-16 18:01 ` Ulf Hansson
2014-09-17  9:11   ` micky
2014-09-17 19:29     ` Ulf Hansson
2014-09-18  7:19       ` Roger Tseng
2014-09-18 21:14         ` Ulf Hansson
2014-09-22 10:09           ` Roger Tseng [this message]
2014-09-23  9:20             ` Ulf Hansson
2014-09-23 19:51               ` Adrian Hunter

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=1411380672.24091.18.camel@debian-rtk5880 \
    --to=rogerable@realtek.com \
    --cc=chris@printf.net \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=micky_ching@realsil.com.cn \
    --cc=sameo@linux.intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wei_wang@realsil.com.cn \
    /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).