lkml.org 
[lkml]   [2022]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V2] mmc: sdhci-sprd: Fix no reset data and command after voltage switch
On Wed, 30 Nov 2022 at 13:14, Wenchao Chen <wenchao.chen@unisoc.com> wrote:
>
> After switching the voltage, no reset data and command will cause
> CMD2 timeout.
>
> Fixes: 29ca763fc26f ("mmc: sdhci-sprd: Add pin control support for voltage switch")
> Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
> Changelog:
>
> v1 -> v2:
> There is no need to wait for the state of the pin to stabilize.
> ---
> drivers/mmc/host/sdhci-sprd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index b92a408f138d..bec3f9e3cd3f 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -470,7 +470,7 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
> }
>
> if (IS_ERR(sprd_host->pinctrl))
> - return 0;
> + goto reset;
>
> switch (ios->signal_voltage) {
> case MMC_SIGNAL_VOLTAGE_180:
> @@ -498,6 +498,8 @@ static int sdhci_sprd_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
>
> /* Wait for 300 ~ 500 us for pin state stable */
> usleep_range(300, 500);
> +
> +reset:
> sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA);
>
> return 0;
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2022-12-01 11:51    [W:0.088 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site