linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Ludovic Barre <ludovic.barre@st.com>,
	Krishna Konda <kkonda@codeaurora.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jack <jack.lo@gtsys.com.hk>
Subject: Re: [PATCH 6/6] mmc: core: with mmc-hs400-1_8(2)v not add MMC_CAP2_HS200* to host->caps2
Date: Mon, 1 Feb 2021 11:52:35 +0100	[thread overview]
Message-ID: <CAPDyKFoVGiB0VMv2y-YHEE8F72Y7vO6561e0vQXH5hc7yayOKg@mail.gmail.com> (raw)
In-Reply-To: <20201208061839.21163-7-chris.ruehl@gtsys.com.hk>

On Tue, 8 Dec 2020 at 07:19, Chris Ruehl <chris.ruehl@gtsys.com.hk> wrote:
>
> When set mmc-hs400-1_8(2)v in dts, hs200 capabilities are not checked
> in the mmc logic. Thus cleanup and remove MMC_CAP2_HS200_1_8V_SDR /
> MMC_CAP2_HS200_1_2V_SDR from host->caps2.

I had another look at this - and I am struggling to get a grip of the
problem you are trying to solve, sorry. Please try to clarify things
through more descriptive commit messages.

*Plain* HS400 mode does seem to require HS200 mode, because tuning
needs to happen in HS200 mode. HS400 mode with enhanced strobe being
supported, doesn't need HS200 to be supported as tuning isn't done in
HS200 mode.

In your case, the controller supports HS400 mode in (1.8V or 1.2V)
with enhanced strobe, but not HS200 mode, correct?

Then because of the code that runs the initialization for the eMMC
card, we end up switching to HS200 mode prior enabling HS400 ES mode,
which causes problems in the driver/controller for your case, correct?

>
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> ---
>  drivers/mmc/core/host.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index 96b2ca1f1b06..46fde60a2372 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -295,9 +295,9 @@ int mmc_of_parse(struct mmc_host *host)
>         if (device_property_read_bool(dev, "mmc-hs200-1_2v"))
>                 host->caps2 |= MMC_CAP2_HS200_1_2V_SDR;
>         if (device_property_read_bool(dev, "mmc-hs400-1_8v"))
> -               host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
> +               host->caps2 |= MMC_CAP2_HS400_1_8V;
>         if (device_property_read_bool(dev, "mmc-hs400-1_2v"))
> -               host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
> +               host->caps2 |= MMC_CAP2_HS400_1_2V;
>         if (device_property_read_bool(dev, "mmc-hs400-enhanced-strobe"))
>                 host->caps2 |= MMC_CAP2_HS400_ES;
>         if (device_property_read_bool(dev, "no-sdio"))
> --
> 2.20.1
>

Kind regards
Uffe

  reply	other threads:[~2021-02-01 10:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08  6:18 [PATCH 0/6] mmc: core: hs400(es) fix probe/init Chris Ruehl
2020-12-08  6:18 ` [PATCH 1/6] mmc: core: prepare hs400 update, code order Chris Ruehl
2020-12-08  6:18 ` [PATCH 2/6] mmc: core: make hs400 independent from hs200 init Chris Ruehl
2020-12-08  6:18 ` [PATCH 3/6] mmc: core: add enhanced strobe to mmc_select_hs400() Chris Ruehl
2020-12-08  6:18 ` [PATCH 4/6] mmc: core: remove mmc_select_hs400es() Chris Ruehl
2020-12-08  6:18 ` [PATCH 5/6] mmc: core: simplify hs200 tuning Chris Ruehl
2020-12-08  6:18 ` [PATCH 6/6] mmc: core: with mmc-hs400-1_8(2)v not add MMC_CAP2_HS200* to host->caps2 Chris Ruehl
2021-02-01 10:52   ` Ulf Hansson [this message]
2020-12-12  1:01 ` [PATCH 0/6] mmc: core: hs400(es) fix probe/init Chris Ruehl
2021-01-22 12:40 ` 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=CAPDyKFoVGiB0VMv2y-YHEE8F72Y7vO6561e0vQXH5hc7yayOKg@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=chris.ruehl@gtsys.com.hk \
    --cc=jack.lo@gtsys.com.hk \
    --cc=kkonda@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.barre@st.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).