Re: [PATCH 3/3] mmc: sh_mmcif: Simplify calculation of mmc->f_min

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

 



On Wed, 28 Mar 2012, Simon Horman wrote:

> There is no need to tune mmc->f_min to a value near 400kHz as the MMC core
> begins testing frequencies at 400kHz regardless of the value of mmc->f_min.
> 
> As suggested by Guennadi Liakhovetski.
> 
> Cc: Magnus Damm <magnus.damm@xxxxxxxxx>
> Cc: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> Tested-by: Cao Minh Hiep <hiepcm@xxxxxxxxx>
> Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

Acked-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>

Thanks
Guennadi

> ---
>  drivers/mmc/host/sh_mmcif.c |    8 +-------
>  1 files changed, 1 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 1410baa..f23b9bd 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -1298,13 +1298,7 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev)
>  
>  	mmc->ops = &sh_mmcif_ops;
>  	mmc->f_max = host->clk / 2;
> -	/* close to 400KHz */
> -	if (host->clk < 51200000)
> -		mmc->f_min = host->clk / 128;
> -	else if (host->clk < 102400000)
> -		mmc->f_min = host->clk / 256;
> -	else
> -		mmc->f_min = host->clk / 512;
> +	mmc->f_min = host->clk / 512;
>  	if (pd->ocr)
>  		mmc->ocr_avail = pd->ocr;
>  	mmc->caps = MMC_CAP_MMC_HIGHSPEED;
> -- 
> 1.7.6.3
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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