Re: [PATCH] mmc: sdhci-of-esdhc: disable SD clock for clock value 0

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

 



On 21/09/17 08:42, Yangbo Lu wrote:
> SD clock should be disabled for clock value 0. It's not
> right to just return. This may cause failure of signal
> voltage switching.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@xxxxxxx>

Minor comment below, nevertheless:

Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

> ---
>  drivers/mmc/host/sdhci-of-esdhc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index d96a057a7db8..b21008729aeb 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -36,6 +36,8 @@ struct sdhci_esdhc {
>  	unsigned int peripheral_clock;
>  };
>  
> +static void esdhc_clock_enable(struct sdhci_host *host, bool enable);

We usually move functions rather than forward declare them.

> +
>  /**
>   * esdhc_read*_fixup - Fixup the value read from incompatible eSDHC register
>   *		       to make it compatible with SD spec.
> @@ -469,8 +471,10 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
>  
>  	host->mmc->actual_clock = 0;
>  
> -	if (clock == 0)
> +	if (clock == 0) {
> +		esdhc_clock_enable(host, false);
>  		return;
> +	}
>  
>  	/* Workaround to start pre_div at 2 for VNN < VENDOR_V_23 */
>  	if (esdhc->vendor_ver < VENDOR_V_23)
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux