From: Bough Chen <haibo.chen@nxp.com> To: Lucas Stach <l.stach@pengutronix.de>, Ulf Hansson <ulf.hansson@linaro.org>, Adrian Hunter <adrian.hunter@intel.com> Cc: Rob Herring <robh+dt@kernel.org>, dl-linux-imx <linux-imx@nxp.com>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: RE: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: advertise HS400 mode through MMC caps Date: Tue, 11 May 2021 03:00:40 +0000 [thread overview] Message-ID: <VI1PR04MB5294AF754C68D41C844083A990539@VI1PR04MB5294.eurprd04.prod.outlook.com> (raw) In-Reply-To: <20210510190400.105162-2-l.stach@pengutronix.de> [-- Attachment #1: Type: text/plain, Size: 2552 bytes --] > -----Original Message----- > From: Lucas Stach [mailto:l.stach@pengutronix.de] > Sent: 2021年5月11日 3:04 > To: Ulf Hansson <ulf.hansson@linaro.org>; Adrian Hunter > <adrian.hunter@intel.com>; Bough Chen <haibo.chen@nxp.com> > Cc: Rob Herring <robh+dt@kernel.org>; dl-linux-imx <linux-imx@nxp.com>; > kernel@pengutronix.de; linux-mmc@vger.kernel.org; > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org > Subject: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: advertise HS400 mode through > MMC caps > > Instead of having an indirection through the SDHCI layer and emulating a > capability bit, that isn't there in hardware, do the same same thing as with > HS400_ES and advertise the support for HS400 directly through the MMC caps. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > --- > drivers/mmc/host/sdhci-esdhc-imx.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c > b/drivers/mmc/host/sdhci-esdhc-imx.c > index a20459744d21..65a52586db36 100644 > --- a/drivers/mmc/host/sdhci-esdhc-imx.c > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c > @@ -427,9 +427,6 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int > reg) > | FIELD_PREP(SDHCI_RETUNING_MODE_MASK, > SDHCI_TUNING_MODE_3); > > - if (imx_data->socdata->flags & ESDHC_FLAG_HS400) > - val |= SDHCI_SUPPORT_HS400; > - > /* > * Do not advertise faster UHS modes if there are no > * pinctrl states for 100MHz/200MHz. > @@ -1603,7 +1600,7 @@ static int sdhci_esdhc_imx_probe(struct > platform_device *pdev) > host->quirks |= SDHCI_QUIRK_BROKEN_ADMA; > > if (imx_data->socdata->flags & ESDHC_FLAG_HS400) > - host->quirks2 |= SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400; > + host->mmc->caps2 |= MMC_CAP2_HS400; Hi Lucas, I think patch1 and patch 2 are enough to cover your requirement. For this patch, I think it's unnecessary, sdhci-esdhc-imx.c need to reuse sdhci.c as much as possible. In sdhci.c, already contain the following logic. if (host->quirks2 & SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 && (host->caps1 & SDHCI_SUPPORT_HS400)) mmc->caps2 |= MMC_CAP2_HS400; The reason why we directly use host->mmc->caps2 for HS400ES mode is that sdhci.c do not contain the similar logic. Adrian, what's your comment? Best Regards Haibo > > if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23) > host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN; > -- > 2.31.1 [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 9571 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Bough Chen <haibo.chen@nxp.com> To: Lucas Stach <l.stach@pengutronix.de>, Ulf Hansson <ulf.hansson@linaro.org>, Adrian Hunter <adrian.hunter@intel.com> Cc: Rob Herring <robh+dt@kernel.org>, dl-linux-imx <linux-imx@nxp.com>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: RE: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: advertise HS400 mode through MMC caps Date: Tue, 11 May 2021 03:00:40 +0000 [thread overview] Message-ID: <VI1PR04MB5294AF754C68D41C844083A990539@VI1PR04MB5294.eurprd04.prod.outlook.com> (raw) In-Reply-To: <20210510190400.105162-2-l.stach@pengutronix.de> [-- Attachment #1.1: Type: text/plain, Size: 2552 bytes --] > -----Original Message----- > From: Lucas Stach [mailto:l.stach@pengutronix.de] > Sent: 2021年5月11日 3:04 > To: Ulf Hansson <ulf.hansson@linaro.org>; Adrian Hunter > <adrian.hunter@intel.com>; Bough Chen <haibo.chen@nxp.com> > Cc: Rob Herring <robh+dt@kernel.org>; dl-linux-imx <linux-imx@nxp.com>; > kernel@pengutronix.de; linux-mmc@vger.kernel.org; > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org > Subject: [PATCH v2 2/3] mmc: sdhci-esdhc-imx: advertise HS400 mode through > MMC caps > > Instead of having an indirection through the SDHCI layer and emulating a > capability bit, that isn't there in hardware, do the same same thing as with > HS400_ES and advertise the support for HS400 directly through the MMC caps. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > --- > drivers/mmc/host/sdhci-esdhc-imx.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c > b/drivers/mmc/host/sdhci-esdhc-imx.c > index a20459744d21..65a52586db36 100644 > --- a/drivers/mmc/host/sdhci-esdhc-imx.c > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c > @@ -427,9 +427,6 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int > reg) > | FIELD_PREP(SDHCI_RETUNING_MODE_MASK, > SDHCI_TUNING_MODE_3); > > - if (imx_data->socdata->flags & ESDHC_FLAG_HS400) > - val |= SDHCI_SUPPORT_HS400; > - > /* > * Do not advertise faster UHS modes if there are no > * pinctrl states for 100MHz/200MHz. > @@ -1603,7 +1600,7 @@ static int sdhci_esdhc_imx_probe(struct > platform_device *pdev) > host->quirks |= SDHCI_QUIRK_BROKEN_ADMA; > > if (imx_data->socdata->flags & ESDHC_FLAG_HS400) > - host->quirks2 |= SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400; > + host->mmc->caps2 |= MMC_CAP2_HS400; Hi Lucas, I think patch1 and patch 2 are enough to cover your requirement. For this patch, I think it's unnecessary, sdhci-esdhc-imx.c need to reuse sdhci.c as much as possible. In sdhci.c, already contain the following logic. if (host->quirks2 & SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 && (host->caps1 & SDHCI_SUPPORT_HS400)) mmc->caps2 |= MMC_CAP2_HS400; The reason why we directly use host->mmc->caps2 for HS400ES mode is that sdhci.c do not contain the similar logic. Adrian, what's your comment? Best Regards Haibo > > if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23) > host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN; > -- > 2.31.1 [-- Attachment #1.2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 9571 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-11 3:00 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-10 19:03 [PATCH v2 1/3] dt-bindings: mmc: add no-mmc-hs400 flag Lucas Stach 2021-05-10 19:03 ` Lucas Stach 2021-05-10 19:03 ` [PATCH v2 2/3] mmc: sdhci-esdhc-imx: advertise HS400 mode through MMC caps Lucas Stach 2021-05-10 19:03 ` Lucas Stach 2021-05-11 3:00 ` Bough Chen [this message] 2021-05-11 3:00 ` Bough Chen 2021-05-11 8:18 ` Lucas Stach 2021-05-11 8:18 ` Lucas Stach 2021-05-11 12:40 ` Adrian Hunter 2021-05-11 12:40 ` Adrian Hunter 2021-05-12 2:23 ` Bough Chen 2021-05-12 2:23 ` Bough Chen 2021-05-24 14:10 ` Ulf Hansson 2021-05-24 14:10 ` Ulf Hansson 2021-05-10 19:04 ` [PATCH v2 3/3] mmc: core: add support for disabling HS400 mode via DT Lucas Stach 2021-05-10 19:04 ` Lucas Stach 2021-05-11 11:14 ` Ulf Hansson 2021-05-11 11:14 ` Ulf Hansson 2021-05-11 11:54 ` Lucas Stach 2021-05-11 11:54 ` Lucas Stach 2021-05-11 12:19 ` Ulf Hansson 2021-05-11 12:19 ` Ulf Hansson 2021-05-24 14:10 ` Ulf Hansson 2021-05-24 14:10 ` Ulf Hansson 2021-05-24 14:10 ` [PATCH v2 1/3] dt-bindings: mmc: add no-mmc-hs400 flag Ulf Hansson 2021-05-24 14:10 ` 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=VI1PR04MB5294AF754C68D41C844083A990539@VI1PR04MB5294.eurprd04.prod.outlook.com \ --to=haibo.chen@nxp.com \ --cc=adrian.hunter@intel.com \ --cc=devicetree@vger.kernel.org \ --cc=kernel@pengutronix.de \ --cc=l.stach@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-mmc@vger.kernel.org \ --cc=robh+dt@kernel.org \ --cc=ulf.hansson@linaro.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.