Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1235729

[PATCH] mmc: core: Fix init_card in 52Mhz

From Chaotian Jing <chaotian.jing@mediatek.com>
Newsgroups linux.kernel
Subject [PATCH] mmc: core: Fix init_card in 52Mhz
Date 2015-09-30 05:30 +0200
Message-ID <qegfD-1bp-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mmc: core: Fix init_card in 52Mhz Chaotian Jing <chaotian.jing@mediatek.com> - 2015-09-30 05:30 +0200
  Re: [PATCH] mmc: core: Fix init_card in 52Mhz Adrian Hunter <adrian.hunter@intel.com> - 2015-09-30 10:30 +0200
    Re: [PATCH] mmc: core: Fix init_card in 52Mhz Chaotian Jing <chaotian.jing@mediatek.com> - 2015-09-30 11:10 +0200
      Re: [PATCH] mmc: core: Fix init_card in 52Mhz Adrian Hunter <adrian.hunter@intel.com> - 2015-09-30 15:10 +0200

csiph-web