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

Commit 8dfd0374 authored by Sascha Hauer's avatar Sascha Hauer Committed by Pierre Ossman
Browse files

MMC core: limit minimum initialization frequency to 400kHz



Some controllers allow a much lower frequency than 400kHz.
Keep the minimum frequency within sensible limits.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent ae628903
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -708,7 +708,13 @@ static void mmc_power_up(struct mmc_host *host)
	 */
	mmc_delay(10);

	if (host->f_min > 400000) {
		pr_warning("%s: Minimum clock frequency too high for "
				"identification mode\n", mmc_hostname(host));
		host->ios.clock = host->f_min;
	} else
		host->ios.clock = 400000;

	host->ios.power_mode = MMC_POWER_ON;
	mmc_set_ios(host);