From: Doug Anderson <dianders@chromium.org>
To: Jaehoon Chung <jh80.chung@samsung.com>,
Seungwon Jeon <tgih.jun@samsung.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
Sonny Rao <sonnyrao@chromium.org>,
Andrew Bresticker <abrestic@chromium.org>,
Heiko Stuebner <heiko@sntech.de>,
Addy Ke <addy.ke@rock-chips.com>,
Alexandru Stan <amstan@chromium.org>,
javier.martinez@collabora.co.uk,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
Doug Anderson <dianders@chromium.org>,
chris@printf.net, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] mmc: dw_mmc: Don't send clock off command if power is off
Date: Fri, 20 Mar 2015 11:00:20 -0700 [thread overview]
Message-ID: <1426874420-25103-1-git-send-email-dianders@chromium.org> (raw)
We've already seen that it causes failures if we try to send the
"SDMMC_CMD_UPD_CLK" command when power is off to the system. Here's
another case where we were doing it: we were sending an
SDMMC_CMD_UPD_CLK to set the clock to 0 when the card was already
powered off and the clock was already at 0. Let's avoid that command
and avoid problems.
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
drivers/mmc/host/dw_mmc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 47dfd0e..aeec698 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1172,8 +1172,9 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
break;
case MMC_POWER_OFF:
- /* Turn clock off before power goes down */
- dw_mci_setup_bus(slot, false);
+ /* Turn clock off before power goes down; only if powered */
+ if (slot->host->vqmmc_enabled)
+ dw_mci_setup_bus(slot, false);
if (!IS_ERR(mmc->supply.vmmc))
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
--
2.2.0.rc0.207.ga3a616c
next reply other threads:[~2015-03-20 18:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 18:00 Doug Anderson [this message]
2015-03-22 12:16 ` Alim Akhtar
2015-03-22 21:59 ` Doug Anderson
2015-03-27 7:21 ` Jaehoon Chung
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=1426874420-25103-1-git-send-email-dianders@chromium.org \
--to=dianders@chromium.org \
--cc=abrestic@chromium.org \
--cc=addy.ke@rock-chips.com \
--cc=alim.akhtar@samsung.com \
--cc=amstan@chromium.org \
--cc=chris@printf.net \
--cc=heiko@sntech.de \
--cc=javier.martinez@collabora.co.uk \
--cc=jh80.chung@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=sonnyrao@chromium.org \
--cc=tgih.jun@samsung.com \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®