From eb91b9118db8c05a5a1257b594b021d32b491254 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 28 Mar 2012 18:01:11 +0900 Subject: [PATCH] mmc: sh_mmcif: Simplify calculation of mmc->f_min 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 Acked-by: Guennadi Liakhovetski Tested-by: Cao Minh Hiep Signed-off-by: Simon Horman Signed-off-by: Chris Ball --- drivers/mmc/host/sh_mmcif.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 4bb999e..724b35e 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1299,13 +1299,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; -- 2.7.4