From: Chaotian Jing <chaotian.jing@mediatek.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Johan Rudholm <johan.rudholm@axis.com>,
Gwendal Grignou <gwendal@chromium.org>,
<linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<srv_heupstream@mediatek.com>,
Sascha Hauer <kernel@pengutronix.de>,
Chaotian Jing <chaotian.jing@mediatek.com>
Subject: [PATCH] mmc: core: Fix init_card in 52Mhz
Date: Wed, 30 Sep 2015 11:28:08 +0800 [thread overview]
Message-ID: <1443583688-1952-1-git-send-email-chaotian.jing@mediatek.com> (raw)
Suppose that we got a data crc error, and it triggers the mmc_reset.
mmc_reset will call mmc_send_status to see if HW reset was supported.
before issue CMD13, it will do retune, and if EMMC was in HS400 mode,
it will reduce frequency to 52Mhz firstly, that results in card init
was doing at 52Mhz, So need ensure frequency is lower than 400Khz when
re-init card.
Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
---
drivers/mmc/core/mmc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index e726903..f2d0c2a 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1945,6 +1945,7 @@ static int mmc_reset(struct mmc_host *host)
/* Set initial state and call mmc_set_ios */
mmc_set_initial_state(host);
+ mmc_set_clock(host, host->f_init);
mmc_host_clk_release(host);
return mmc_init_card(host, card->ocr, card);
--
1.8.1.1.dirty
next reply other threads:[~2015-09-30 3:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 3:28 Chaotian Jing [this message]
2015-09-30 8:24 ` Adrian Hunter
2015-09-30 9:03 ` Chaotian Jing
2015-09-30 13:01 ` Adrian Hunter
2015-10-08 6:41 Chaotian Jing
2015-10-08 6:51 ` kbuild test robot
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=1443583688-1952-1-git-send-email-chaotian.jing@mediatek.com \
--to=chaotian.jing@mediatek.com \
--cc=adrian.hunter@intel.com \
--cc=gwendal@chromium.org \
--cc=johan.rudholm@axis.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=srv_heupstream@mediatek.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®