Thread (7 messages) 7 messages, 3 authors, 2017-05-17

imx7: mmc_select_hs200 failed, error -74

From: haibo.chen@nxp.com (Bough Chen)
Date: 2017-05-17 02:10:32
Also in: linux-mmc

-----Original Message-----
From: linux-mmc-owner at vger.kernel.org [mailto:linux-mmc-
owner at vger.kernel.org] On Behalf Of Fabio Estevam
Sent: Tuesday, May 16, 2017 11:37 PM
To: A.S. Dong <aisheng.dong@nxp.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>; linux-mmc at vger.kernel.org; Ulf
Hansson [off-list ref]; Stefan Agner [off-list ref]; linux-
arm-kernel at lists.infradead.org
Subject: Re: imx7: mmc_select_hs200 failed, error -74

On Tue, May 16, 2017 at 10:58 AM, Fabio Estevam [off-list ref]
wrote:
quoted
Hi,

On a imx7s-warp board (sdhci-esdhc-imx.c driver) running 4.12-rc1 the
following mmc1 error message is seen:

[    1.796192] mmc1: mmc_select_hs200 failed, error -74
Hi Fabio,

Can you open the mmc debug and show the full log?
By the way, you should first make sure whether the eMMC chip you used support HS200, and double
check whether the vccq voltage is 1.8v or 1.2v, HS200 mode can't work on 3.3v I/O voltage.

Best Regards
Haibo Chen
quoted hunk ↗ jump to hunk
quoted
[    1.810220] mmc1: new MMC card at address 0001
[    1.823066] mmcblk1: mmc1:0001 V10008 7.05 GiB
[    1.834155] mmcblk1boot0: mmc1:0001 V10008 partition 1 4.00 MiB
[    1.841608] mmcblk1boot1: mmc1:0001 V10008 partition 2 4.00 MiB
[    1.848971] mmcblk1rpmb: mmc1:0001 V10008 partition 3 4.00 MiB
[    1.859576]  mmcblk1: p1 p2

The rootfs can be mounted correctly from eMMC though.

What is the proper way to fix the 'mmc_select_hs200 failed' error message?
with the following changes:
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1454,7 +1454,7 @@ static int mmc_select_hs200(struct mmc_card *card)
                if (mmc_set_signal_voltage(host, old_signal_voltage))
                        err = -EIO;

-               pr_err("%s: %s failed, error %d\n", mmc_hostname(card->host),
+               pr_debug("%s: %s failed, error %d\n",
+ mmc_hostname(card->host),
                       __func__, err);
        }
        return err;
@@ -1474,7 +1474,7 @@ static int mmc_select_timing(struct mmc_card *card)
                err = mmc_select_hs400es(card);
        else if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS200)
                err = mmc_select_hs200(card);
-       else if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS)
+       if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS)
                err = mmc_select_hs(card);

        if (err && err != -EBADMSG)
the card is probed as DDR MMC and the error message is gone:

# dmesg | grep mmc1
[    1.702797] mmc1: SDHCI controller on 30b60000.usdhc [30b60000.usdhc]
using A
[    1.811211] mmc1: new DDR MMC card at address 0001
[    1.820786] mmcblk1: mmc1:0001 V10008 7.05 GiB
[    1.833340] mmcblk1boot0: mmc1:0001 V10008 partition 1 4.00 MiB
[    1.840518] mmcblk1boot1: mmc1:0001 V10008 partition 2 4.00 MiB
[    1.847812] mmcblk1rpmb: mmc1:0001 V10008 partition 3 4.00 MiB

Is this a correct fix?

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the
body of a message to majordomo at vger.kernel.org More majordomo info at
http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help