Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb91b911 authored by Simon Horman's avatar Simon Horman Committed by Chris Ball
Browse files

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: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: default avatarCao Minh Hiep <hiepcm@gmail.com>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 930f152c
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -1299,12 +1299,6 @@ 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;
	if (pd->ocr)
		mmc->ocr_avail = pd->ocr;