aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-05-13 10:40:03 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-05-22 19:07:01 -0400
commitc58a85090c8fbf7274af5ed0fe30828320c40ad6 (patch)
tree82570a7b85f0ef642977a05479be2e1c9deab628 /drivers/mmc
parent665ba56fdab1670ef686ec35569aa1de0ec4ef4d (diff)
ARM: 7718/1: mmc: mmci: Set actual clock for debug purpose
Update cclk to the acutal used value and copy it to the actual_clock variable in the mmc host for debug purpose. Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index d57ce4332f83..5f53cf8b8f5a 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -196,6 +196,9 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired)
196 struct variant_data *variant = host->variant; 196 struct variant_data *variant = host->variant;
197 u32 clk = variant->clkreg; 197 u32 clk = variant->clkreg;
198 198
199 /* Make sure cclk reflects the current calculated clock */
200 host->cclk = 0;
201
199 if (desired) { 202 if (desired) {
200 if (desired >= host->mclk) { 203 if (desired >= host->mclk) {
201 clk = MCI_CLK_BYPASS; 204 clk = MCI_CLK_BYPASS;
@@ -230,6 +233,9 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired)
230 /* clk |= MCI_CLK_PWRSAVE; */ 233 /* clk |= MCI_CLK_PWRSAVE; */
231 } 234 }
232 235
236 /* Set actual clock for debug */
237 host->mmc->actual_clock = host->cclk;
238
233 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) 239 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4)
234 clk |= MCI_4BIT_BUS; 240 clk |= MCI_4BIT_BUS;
235 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_8) 241 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_8)