diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-04-09 02:32:02 -0400 |
---|---|---|
committer | Pierre Ossman <pierre@ossman.eu> | 2009-06-13 16:42:57 -0400 |
commit | 8dfd0374be84793360db7fff2e635d2cd3bbcb21 (patch) | |
tree | 877fb5d94f27cb6bbfa4244f21906c5fb66d753f /drivers/mmc/core | |
parent | ae628903ab6cc9a04fdf8d4ff3f0c5b2ffa6f939 (diff) |
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/core.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) | |||
708 | */ | 708 | */ |
709 | mmc_delay(10); | 709 | mmc_delay(10); |
710 | 710 | ||
711 | host->ios.clock = host->f_min; | 711 | if (host->f_min > 400000) { |
712 | pr_warning("%s: Minimum clock frequency too high for " | ||
713 | "identification mode\n", mmc_hostname(host)); | ||
714 | host->ios.clock = host->f_min; | ||
715 | } else | ||
716 | host->ios.clock = 400000; | ||
717 | |||
712 | host->ios.power_mode = MMC_POWER_ON; | 718 | host->ios.power_mode = MMC_POWER_ON; |
713 | mmc_set_ios(host); | 719 | mmc_set_ios(host); |
714 | 720 | ||