Skip to content

Commit

Permalink
mmc: sh_mmcif: Simplify calculation of mmc->f_min
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Guennadi Liakhovetski <[email protected]>
Tested-by: Cao Minh Hiep <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
horms authored and cjb committed Apr 6, 2012
1 parent 930f152 commit eb91b91
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/mmc/host/sh_mmcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eb91b91

Please sign in to comment.