Commit 770e31d3 authored by Juha Yrjölä's avatar Juha Yrjölä Committed by Tony Lindgren

[PATCH] ARM: OMAP: Reduce MMC clock frequency

Reduce the MMC clock frequency slightly to make all cards work.
Otherwise weird CRC errors seem to happen with many RS-MMC
cards.

Signed-off-by: Juha Yrjölä <juha.yrjola at nokia.com>
parent 39418952
...@@ -845,15 +845,18 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -845,15 +845,18 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (ios->clock == 0) { if (ios->clock == 0) {
dsor = 0; dsor = 0;
} else { } else {
dsor = 48000000 / realclock; int func_clk_rate = clk_get_rate(host->clk);
dsor = func_clk_rate / realclock;
if (dsor < 1) if (dsor < 1)
dsor = 1; dsor = 1;
if (48000000 / dsor > realclock) if (func_clk_rate / dsor > realclock)
dsor++; dsor++;
if (dsor > 250) if (dsor > 250)
dsor = 250; dsor = 250;
dsor++;
} }
/* REVISIT: if (ios->bus_width == MMC_BUS_WIDTH_4) dsor |= 1 << 15; */ /* REVISIT: if (ios->bus_width == MMC_BUS_WIDTH_4) dsor |= 1 << 15; */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment