From: Adrian Hunter <adrian.hunter@intel.com>
To: haibo.chen@nxp.com, ulf.hansson@linaro.org, linux-mmc@vger.kernel.org
Cc: linux-imx@nxp.com, hkallweit1@gmail.com
Subject: Re: [PATCH] mmc: core: sdio: hold retuning if sdio in 1-bit mode
Date: Mon, 4 Sep 2023 11:11:49 +0300 [thread overview]
Message-ID: <24299751-8b13-fe39-07a0-a9e9111241c8@intel.com> (raw)
In-Reply-To: <20230830093922.3095850-1-haibo.chen@nxp.com>
On 30/08/23 12:39, haibo.chen@nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
>
> tuning only support in 4-bit mode or 8 bit mode, so in 1-bit mode,
> need to hold retuning.
>
> Find this issue when use manual tuning method on imx93. When system
> resume back, SDIO WIFI try to switch back to 4 bit mode, first will
> trigger retuning, and all tuning command failed.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
UHS-I is also not meant for 1-bit mode, but I guess switching modes
in this case is also risky.
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes tag?
> ---
> drivers/mmc/core/sdio.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
> index f64b9ac76a5c..5914516df2f7 100644
> --- a/drivers/mmc/core/sdio.c
> +++ b/drivers/mmc/core/sdio.c
> @@ -1089,8 +1089,14 @@ static int mmc_sdio_resume(struct mmc_host *host)
> }
> err = mmc_sdio_reinit_card(host);
> } else if (mmc_card_wake_sdio_irq(host)) {
> - /* We may have switched to 1-bit mode during suspend */
> + /*
> + * We may have switched to 1-bit mode during suspend,
> + * need to hold retuning, because tuning only supprt
> + * 4-bit mode or 8 bit mode.
> + */
> + mmc_retune_hold_now(host);
> err = sdio_enable_4bit_bus(host->card);
> + mmc_retune_release(host);
> }
>
> if (err)
next prev parent reply other threads:[~2023-09-04 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 9:39 [PATCH] mmc: core: sdio: hold retuning if sdio in 1-bit mode haibo.chen
2023-09-04 8:11 ` Adrian Hunter [this message]
2023-09-04 8:57 ` Bough Chen
2023-09-14 13:02 ` Ulf Hansson
2023-10-26 11:58 ` Bough Chen
2023-11-06 11:56 ` Adrian Hunter
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=24299751-8b13-fe39-07a0-a9e9111241c8@intel.com \
--to=adrian.hunter@intel.com \
--cc=haibo.chen@nxp.com \
--cc=hkallweit1@gmail.com \
--cc=linux-imx@nxp.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox