summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc_pio.c
diff options
context:
space:
mode:
authorShinobu Uehara <shinobu.uehara.xc@renesas.com>2014-08-24 20:03:00 -0700
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 13:59:16 +0200
commitda29fe2bf573f0ae56fdc2e790387cb73fc8c6f8 (patch)
tree9b23d1f9cffd10788e492ef4e5ecec452b7e4d7d /drivers/mmc/host/tmio_mmc_pio.c
parentb30d6958a014812158d9729a3e0b6d448f6e8968 (diff)
downloadtalos-obmc-linux-da29fe2bf573f0ae56fdc2e790387cb73fc8c6f8.tar.gz
talos-obmc-linux-da29fe2bf573f0ae56fdc2e790387cb73fc8c6f8.zip
mmc: tmio: add actual clock support as option
Some controller is supporting actual clock on SD_CLK_CTRL :: DIV[7:0]. Renesas SH-Mobile SDHI doesn't support, but, Renesas R-Car SDHI supports it. This patch adds new TMIO_MMC_CLK_ACTUAL flag for it. [Kuninori Morimoto: tidyuped for upstreaming] Tested-by: Nguyen Xuan Nui <nx-nui@jinso.co.jp> Tested-by: Hiep Cao Minh <cm-hiep@jinso.co.jp> Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_pio.c')
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 7cfe939992de..ba454131f9a8 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -159,6 +159,11 @@ static void tmio_mmc_set_clock(struct tmio_mmc_host *host,
for (clock = host->mmc->f_min, clk = 0x80000080;
new_clock >= (clock<<1); clk >>= 1)
clock <<= 1;
+
+ /* 1/1 clock is option */
+ if ((host->pdata->flags & TMIO_MMC_CLK_ACTUAL) &&
+ ((clk >> 22) & 0x1))
+ clk |= 0xff;
}
if (host->set_clk_div)
OpenPOWER on IntegriCloud