Re: [RFC PATCH 1/4] mmc: renesas_sdhi: only reset SCC when its pointer is populated

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

 



Hi Wolfram,

Thanks for your work.

On 2020-11-10 15:20:55 +0100, Wolfram Sang wrote:
> Only re-initialize SCC and tuning when an SCC was found during probe().
> This is currently a noop because all R-Car Gen2+ are considered to have
> an SCC. But this will change in a later patch, so we need this
> preparation.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>

> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index acb9c81a4e45..a395f835e836 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -556,16 +556,18 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host)
>  {
>  	struct renesas_sdhi *priv = host_to_priv(host);
>  
> -	renesas_sdhi_reset_scc(host, priv);
> -	renesas_sdhi_reset_hs400_mode(host, priv);
> -	priv->needs_adjust_hs400 = false;
> +	if (priv->scc_ctl) {
> +		renesas_sdhi_reset_scc(host, priv);
> +		renesas_sdhi_reset_hs400_mode(host, priv);
> +		priv->needs_adjust_hs400 = false;
>  
> -	sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, CLK_CTL_SCLKEN |
> -			sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
> +		sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, CLK_CTL_SCLKEN |
> +				sd_ctrl_read16(host, CTL_SD_CARD_CLK_CTL));
>  
> -	sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL,
> -		       ~SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN &
> -		       sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL));
> +		sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL,
> +			       ~SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN &
> +			       sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL));
> +	}
>  
>  	if (host->pdata->flags & TMIO_MMC_MIN_RCAR2)
>  		sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK,
> -- 
> 2.28.0
> 

-- 
Regards,
Niklas Söderlund



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux