[U-Boot] [PATCH] mmc: sdhci: assign to clk_mul when host version is upper than SD3.0

Jaehoon Chung jh80.chung at samsung.com
Wed Oct 26 04:03:13 CEST 2016


On 10/21/2016 08:52 PM, Jaehoon Chung wrote:
> To prevent the wrong value check the SD version.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/sdhci.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 10ff57e..766e9ee 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -608,9 +608,11 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
>  	 * In case of Host Controller v3.00, find out whether clock
>  	 * multiplier is supported.
>  	 */
> -	caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
> -	host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
> -			SDHCI_CLOCK_MUL_SHIFT;
> +	if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
> +		caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
> +		host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
> +				SDHCI_CLOCK_MUL_SHIFT;
> +	}
>  
>  	return 0;
>  }
> 



More information about the U-Boot mailing list