Skip to content

Commit

Permalink
MMC core: limit minimum initialization frequency to 400kHz
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sascha Hauer authored and Pierre Ossman committed Jun 13, 2009
1 parent ae62890 commit 8dfd037
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8dfd037

Please sign in to comment.