From: Sascha Hauer Date: Thu, 9 Apr 2009 06:32:02 +0000 (+0200) Subject: MMC core: limit minimum initialization frequency to 400kHz X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8dfd0374be84793360db7fff2e635d2cd3bbcb21;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Sascha Hauer --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 23fb2c39d9ed..d84c880fac84 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -708,7 +708,13 @@ static void mmc_power_up(struct mmc_host *host) */ mmc_delay(10); - host->ios.clock = host->f_min; + 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);