diff options
author | Dong Aisheng <b29396@freescale.com> | 2013-09-13 19:11:37 +0800 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-09-27 10:31:48 -0400 |
commit | e76b855956383d58232cfcf367f0ce34f149161b (patch) | |
tree | 987f6e1be14a55b961d71ff6f9e353778d4772b9 /drivers/mmc/host/sdhci-esdhc-imx.c | |
parent | 5f7886c5ef40c79b5811f23219167096ab578a91 (diff) | |
download | op-kernel-dev-e76b855956383d58232cfcf367f0ce34f149161b.zip op-kernel-dev-e76b855956383d58232cfcf367f0ce34f149161b.tar.gz |
mmc: sdhci-esdhc-imx: set actual_clock in clock setting
This enables access the actual_clock via sys.
root@imx6qsabreauto:~# cat /sys/kernel/debug/mmc0/ios
clock: 198000000 Hz
actual clock: 198000000 Hz
vdd: 17 (2.9 ~ 3.0 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 6 (sd uhs SDR104)
signal voltage: 0 (1.80 V)
Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-esdhc-imx.c')
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index fe48ec3..b9899e9 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -524,8 +524,9 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host, while (host_clock / pre_div / div > clock && div < 16) div++; + host->mmc->actual_clock = host_clock / pre_div / div; dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n", - clock, host_clock / pre_div / div); + clock, host->mmc->actual_clock); pre_div >>= 1; div--; |