From: Adrian Hunter <adrian.hunter@intel.com>
To: Haylen Chu <heylenay@outlook.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Jisheng Zhang <jszhang@kernel.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: sdhci-of-dwcmshc: Use inverted-wp quirk for CV18xx and SG200x SoCs
Date: Wed, 12 Jun 2024 11:11:22 +0300 [thread overview]
Message-ID: <a5bb2bb3-efe3-461f-a3d8-88af82f29b15@intel.com> (raw)
In-Reply-To: <SEYPR01MB42219753E4388009470D958DD7FC2@SEYPR01MB4221.apcprd01.prod.exchangelabs.com>
On 31/05/24 17:13, Haylen Chu wrote:
> MMC controller integrated in Sophgo CV18xx and SG200x SoCs has an
> inverted write-protect flag, causing SDCards misdetected as read-only.
Is it the SDHCI_WRITE_PROTECT bit of the SDHCI_PRESENT_STATE
register that needs to be inverted?
> So set SDHCI_QURIK_INVERTED_WRITE_PROTECT to make write protection work
> correctly.
>
> Fixes: 017199c2849c ("mmc: sdhci-of-dwcmshc: Add support for Sophgo CV1800B and SG2002")
> Signed-off-by: Haylen Chu <heylenay@outlook.com>
> ---
> drivers/mmc/host/sdhci-of-dwcmshc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
> index 39edf04fedcf..62b7f28de54f 100644
> --- a/drivers/mmc/host/sdhci-of-dwcmshc.c
> +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
> @@ -962,7 +962,8 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_th1520_pdata = {
>
> static const struct sdhci_pltfm_data sdhci_dwcmshc_cv18xx_pdata = {
> .ops = &sdhci_dwcmshc_cv18xx_ops,
> - .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
> + SDHCI_QUIRK_INVERTED_WRITE_PROTECT,
> .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> };
>
next prev parent reply other threads:[~2024-06-12 8:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 14:13 [PATCH] mmc: sdhci-of-dwcmshc: Use inverted-wp quirk for CV18xx and SG200x SoCs Haylen Chu
2024-06-12 8:11 ` Adrian Hunter [this message]
2024-06-13 13:03 ` Jisheng Zhang
2024-06-13 13:15 ` Jisheng Zhang
2024-06-13 13:26 ` Jisheng Zhang
2024-06-18 9:13 ` Haylen Chu
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=a5bb2bb3-efe3-461f-a3d8-88af82f29b15@intel.com \
--to=adrian.hunter@intel.com \
--cc=heylenay@outlook.com \
--cc=jszhang@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.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: link
Be 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.