public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Chaotian Jing <chaotian.jing@mediatek.com>,
	Wenkai Du <wenkai.du@intel.com>
Subject: [PATCH 1/7] mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400
Date: Thu, 26 Nov 2015 14:00:44 +0200	[thread overview]
Message-ID: <1448539250-18769-2-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1448539250-18769-1-git-send-email-adrian.hunter@intel.com>

From: Wenkai Du <wenkai.du@intel.com>

Commit cc4f414c885c ("mmc: mmc: Add driver strength selection")
added driver strength selection for eMMC HS200 and HS400 modes.
That patch also set the driver stength when transitioning through
High Speed mode to HS200/HS400, but driver strength is not defined
for High Speed mode.  While the JEDEC specification is not clear
on this point it has been observed to cause problems for some eMMC,
and removing the driver strength setting in this case makes it
consistent with the normal use of High Speed mode.

Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v4.2+
---
 drivers/mmc/core/mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 66957addf9e4..549c56e8cf6b 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1076,8 +1076,7 @@ static int mmc_select_hs400(struct mmc_card *card)
 	mmc_set_clock(host, max_dtr);
 
 	/* Switch card to HS mode */
-	val = EXT_CSD_TIMING_HS |
-	      card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
+	val = EXT_CSD_TIMING_HS;
 	err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
 			   EXT_CSD_HS_TIMING, val,
 			   card->ext_csd.generic_cmd6_time,
@@ -1160,8 +1159,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
 	mmc_set_clock(host, max_dtr);
 
 	/* Switch HS400 to HS DDR */
-	val = EXT_CSD_TIMING_HS |
-	      card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
+	val = EXT_CSD_TIMING_HS;
 	err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING,
 			   val, card->ext_csd.generic_cmd6_time,
 			   true, send_status, true);
-- 
1.9.1


  reply	other threads:[~2015-11-26 12:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 12:00 [PATCH 0/7] mmc: Some fixes Adrian Hunter
2015-11-26 12:00 ` Adrian Hunter [this message]
2015-11-26 12:00 ` [PATCH 2/7] mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPT Adrian Hunter
2015-11-26 12:00 ` [PATCH 3/7] mmc: sdhci: Do not BUG on invalid vdd Adrian Hunter
2015-11-27  5:08   ` Venu Byravarasu
2015-11-27 13:30     ` Ulf Hansson
2015-11-26 12:00 ` [PATCH 4/7] mmc: sdio: Fix invalid vdd in voltage switch power cycle Adrian Hunter
2015-11-26 12:00 ` [PATCH 5/7] mmc: sdhc: Fix DMA descriptor with zero data length Adrian Hunter
2015-11-27 13:28   ` Ulf Hansson
2015-11-26 12:00 ` [PATCH 6/7] mmc: sdhci: 64-bit DMA actually has 4-byte alignment Adrian Hunter
2015-11-26 12:00 ` [PATCH 7/7] mmc: sdhci: Fix sdhci_runtime_pm_bus_on/off() Adrian Hunter
2015-11-27 13:27 ` [PATCH 0/7] mmc: Some fixes Ulf Hansson

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=1448539250-18769-2-git-send-email-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wenkai.du@intel.com \
    /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