* imx7: mmc_select_hs200 failed, error -74 @ 2017-05-16 13:58 Fabio Estevam 2017-05-16 15:37 ` Fabio Estevam 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2017-05-16 13:58 UTC (permalink / raw) To: linux-arm-kernel 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 [ 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? Thanks, Fabio Estevam ^ permalink raw reply [flat|nested] 7+ messages in thread
* imx7: mmc_select_hs200 failed, error -74 2017-05-16 13:58 imx7: mmc_select_hs200 failed, error -74 Fabio Estevam @ 2017-05-16 15:37 ` Fabio Estevam 2017-05-16 17:57 ` Fabio Estevam 2017-05-17 2:10 ` Bough Chen 0 siblings, 2 replies; 7+ messages in thread From: Fabio Estevam @ 2017-05-16 15:37 UTC (permalink / raw) To: linux-arm-kernel On Tue, May 16, 2017 at 10:58 AM, Fabio Estevam <festevam@gmail.com> wrote: > 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 > [ 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* imx7: mmc_select_hs200 failed, error -74 2017-05-16 15:37 ` Fabio Estevam @ 2017-05-16 17:57 ` Fabio Estevam 2017-05-17 2:10 ` Bough Chen 1 sibling, 0 replies; 7+ messages in thread From: Fabio Estevam @ 2017-05-16 17:57 UTC (permalink / raw) To: linux-arm-kernel On Tue, May 16, 2017 at 12:37 PM, Fabio Estevam <festevam@gmail.com> wrote: > Is this a correct fix? This does not seem correct. I will submit a proper patch. ^ permalink raw reply [flat|nested] 7+ messages in thread
* imx7: mmc_select_hs200 failed, error -74 2017-05-16 15:37 ` Fabio Estevam 2017-05-16 17:57 ` Fabio Estevam @ 2017-05-17 2:10 ` Bough Chen 2017-05-17 18:02 ` Fabio Estevam 1 sibling, 1 reply; 7+ messages in thread From: Bough Chen @ 2017-05-17 2:10 UTC (permalink / raw) To: linux-arm-kernel > -----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 <ulf.hansson@linaro.org>; Stefan Agner <stefan@agner.ch>; 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 <festevam@gmail.com> > wrote: > > 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 > > [ 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* imx7: mmc_select_hs200 failed, error -74 2017-05-17 2:10 ` Bough Chen @ 2017-05-17 18:02 ` Fabio Estevam 2017-05-17 18:23 ` Stefan Agner 0 siblings, 1 reply; 7+ messages in thread From: Fabio Estevam @ 2017-05-17 18:02 UTC (permalink / raw) To: linux-arm-kernel Hi Haibo, On Tue, May 16, 2017 at 11:10 PM, Bough Chen <haibo.chen@nxp.com> wrote: > 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. The imx7s warp board supplies 3.15V to VCCQ eMMC pins, so it cannot work in HS200 mode as you said. In this case it should still be able to work in DDR52 mode though. Please see the patch I sent: http://marc.info/?l=linux-mmc&m=149495763808805&w=2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* imx7: mmc_select_hs200 failed, error -74 2017-05-17 18:02 ` Fabio Estevam @ 2017-05-17 18:23 ` Stefan Agner 2017-05-17 18:40 ` Fabio Estevam 0 siblings, 1 reply; 7+ messages in thread From: Stefan Agner @ 2017-05-17 18:23 UTC (permalink / raw) To: linux-arm-kernel On 2017-05-17 11:02, Fabio Estevam wrote: > Hi Haibo, > > On Tue, May 16, 2017 at 11:10 PM, Bough Chen <haibo.chen@nxp.com> wrote: > >> 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. > > The imx7s warp board supplies 3.15V to VCCQ eMMC pins, so it cannot > work in HS200 mode as you said. > > In this case it should still be able to work in DDR52 mode though. Maybe I missed something, but shouldn't that all be part of the device tree these days? E.g. mark that it is only 3.3V capable (no-1-8-v) and maybe other capabilities (see Documentation/devicetree/bindings/mmc/mmc.txt). > > Please see the patch I sent: > http://marc.info/?l=linux-mmc&m=149495763808805&w=2 Afaict, the hardware tries to use whatever is the greatest common denominator... If the board has restrictions, they should be specified in the DT, and the driver should respect them. -- Stefan ^ permalink raw reply [flat|nested] 7+ messages in thread
* imx7: mmc_select_hs200 failed, error -74 2017-05-17 18:23 ` Stefan Agner @ 2017-05-17 18:40 ` Fabio Estevam 0 siblings, 0 replies; 7+ messages in thread From: Fabio Estevam @ 2017-05-17 18:40 UTC (permalink / raw) To: linux-arm-kernel Hi Stefan, On Wed, May 17, 2017 at 3:23 PM, Stefan Agner <stefan@agner.ch> wrote: > E.g. mark that it is only 3.3V capable (no-1-8-v) and maybe other > capabilities (see Documentation/devicetree/bindings/mmc/mmc.txt). Passing 'no-1-8-v' to the dts did the trick, thanks! ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-05-17 18:40 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-05-16 13:58 imx7: mmc_select_hs200 failed, error -74 Fabio Estevam 2017-05-16 15:37 ` Fabio Estevam 2017-05-16 17:57 ` Fabio Estevam 2017-05-17 2:10 ` Bough Chen 2017-05-17 18:02 ` Fabio Estevam 2017-05-17 18:23 ` Stefan Agner 2017-05-17 18:40 ` Fabio Estevam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox