Skip to contentSkip to conversation

mmc: mmc: fix switch to 1V8 for hs400es mode

PATCH In review Haibo Chen 3 participants 3 messages Jul 7, 2017 – Aug 8, 2017

Subsystems (2)
lore
Share & tools
lore

Haibo Chen

author
#0 lore raw

PATCH 1/1 mmc: mmc: fix switch to 1V8 for hs400es mode

Change the default err value to -EINVAL, otherwise signal voltage will not change to 1V8 if card or controller only support 1V8 for HS400ES mode.

Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
---
 drivers/mmc/core/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -1
index 92c6167..336a950 100644
@@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
 static int mmc_select_hs400es(struct mmc_card *card)
 {
 	struct mmc_host *host = card->host;
-	int err = 0;
+	int err = -EINVAL;
 	u8 val;
 
 	if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
Signature · 1 line
1.9.1
#1 lore raw

Hi Haibo,

Quoted 4 lines · Haibo Chen

Change the default err value to -EINVAL, otherwise signal voltage will not change to 1V8 if card or controller only support 1V8 for HS400ES mode.

This description is misleading as hs400(es) must be running under 1.8v vqmmc. But the patch itself is correct.

Quoted 21 lines
Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es mode")
---
  drivers/mmc/core/mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/mmc.c +1 -1
index 92c6167..336a950 100644
@@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
  static int mmc_select_hs400es(struct mmc_card *card)
  {
  	struct mmc_host *host = card->host;
-	int err = 0;
+	int err = -EINVAL;
  	u8 val;
 
  	if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
#2 lore raw
Quoted 21 lines · Shawn Lin

Hi Haibo,

Quoted 5 lines · Haibo Chen

Change the default err value to -EINVAL, otherwise signal voltage will not change to 1V8 if card or controller only support 1V8 for HS400ES mode.

This description is misleading as hs400(es) must be running under 1.8v vqmmc. But the patch itself is correct.

Quoted 8 lines
Fixes commit 1720d3545b77 ("mmc: core: switch to 1V8 or 1V2 for hs400es

mode")

---
  drivers/mmc/core/mmc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

drivers/mmc/core/mmc.c int mmc_hs400_to_hs200(struct mmc_card *card) · line 1295

Quoted 13 lines
drivers/mmc/core/mmc.c +1 -1
index 92c6167..336a950 100644
@@ -1289,7 +1289,7 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
  static int mmc_select_hs400es(struct mmc_card *card)
  {
        struct mmc_host *host = card->host;
-       int err = 0;
+       int err = -EINVAL;
        u8 val;
        if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
 

Seems like Haibo has been busy. Shawn, if you think it's important, could you pick up this and re-submit?

Kind regards
Uffe