RE: [PATCH 2/2] mmc: renesas_sdhi: do hard reset if possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wolfram-san,

> From: Wolfram Sang, Sent: Thursday, March 11, 2021 10:18 PM
> >  	tmio_mmc_reset(host);
> > +	host->set_clock(host, host->clk_cache);
> 
> What about putting it into the reset function itself, so it will be
> always enabled (like for the scc_ctl case)?
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 473f155f6d3d..672953e3362d 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -572,6 +572,7 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host)
>  		read_poll_timeout(reset_control_status, ret, ret == 0, 1, 100,
>  				  false, priv->rstc);
>  		priv->needs_adjust_hs400 = false;
> +		renesas_sdhi_set_clock(host, host->clk_cache);
>  	} else if (priv->scc_ctl) {
>  		renesas_sdhi_disable_scc(host->mmc);
>  		renesas_sdhi_reset_hs400_mode(host, priv);
> 
> If you agree, I will fold this into v2 of this series.

Adding the function itself seems OK. However, I checked the code, and then
adding hard reset into renesas_sdhi_reset() seems to break the following:
-----
commit 5b0739d76227fd5a3f02f014385bfa9c86e0404b
Author: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
Date:   Thu Aug 20 15:25:37 2020 +0200

    mmc: tmio: don't reset whole IP core when tuning fails

    SDHI needs to reset the SCC only, not the whole IP core. So, if tuning
    fails, don't handle specifics in the generic TMIO core, but in the
    specific drivers. For SDHI, we need to move around the reset routine a
    bit. It is not modified.
------

So, perhaps, we have to fix renesas_sdhi_execute_tuning() somehow before
adding hard reset. But, what do you think?

Best regards,
Yoshihiro Shimoda





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux