diff options
author | Simon Horman <horms@verge.net.au> | 2012-03-28 05:01:11 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-04-05 20:32:24 -0400 |
commit | eb91b9118db8c05a5a1257b594b021d32b491254 (patch) | |
tree | 59d946917c73b372dee2162b25eaa4f8c3d94816 /drivers/mmc | |
parent | 930f152cc9998388031af577843baae572ac8ab6 (diff) |
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 <magnus.damm@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Cao Minh Hiep <hiepcm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | 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 4bb999ed335d..724b35e85a26 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) | |||
1299 | 1299 | ||
1300 | mmc->ops = &sh_mmcif_ops; | 1300 | mmc->ops = &sh_mmcif_ops; |
1301 | mmc->f_max = host->clk / 2; | 1301 | mmc->f_max = host->clk / 2; |
1302 | /* close to 400KHz */ | 1302 | mmc->f_min = host->clk / 512; |
1303 | if (host->clk < 51200000) | ||
1304 | mmc->f_min = host->clk / 128; | ||
1305 | else if (host->clk < 102400000) | ||
1306 | mmc->f_min = host->clk / 256; | ||
1307 | else | ||
1308 | mmc->f_min = host->clk / 512; | ||
1309 | if (pd->ocr) | 1303 | if (pd->ocr) |
1310 | mmc->ocr_avail = pd->ocr; | 1304 | mmc->ocr_avail = pd->ocr; |
1311 | mmc->caps = MMC_CAP_MMC_HIGHSPEED; | 1305 | mmc->caps = MMC_CAP_MMC_HIGHSPEED; |