From: Dong Aisheng <b29396@freescale.com>
To: linux-mmc@vger.kernel.org
Cc: cjb@laptop.org, anton@enomsg.org, shawn.guo@linaro.org,
linux-arm-kernel@lists.infradead.org, s.hauer@pengutronix.de,
b29396@freescale.com
Subject: [PATCH 6/8] mmc: sdhci-esdhc: correct pre_div for imx6q
Date: Wed, 4 Sep 2013 20:54:15 +0800 [thread overview]
Message-ID: <1378299257-2980-7-git-send-email-b29396@freescale.com> (raw)
In-Reply-To: <1378299257-2980-1-git-send-email-b29396@freescale.com>
According to spec, the pre_div for imx6q should be 1, or the biggest clock
rate we can get is a half of host clock rate.
This may cause we can not get the proper clock rate as we want.
e.g. if the desired clock is 200Mhz, however, the host clock is 200Mhz too,
then it causes the actual clock we get is 100Mhz due to pre_div is 2.
Signed-off-by: Dong Aisheng <b29396@freescale.com>
---
drivers/mmc/host/sdhci-esdhc.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h
index 86fcd5b..c8a773b 100644
--- a/drivers/mmc/host/sdhci-esdhc.h
+++ b/drivers/mmc/host/sdhci-esdhc.h
@@ -66,6 +66,9 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock,
u32 temp, val;
dev = mmc_dev(host->mmc);
+ if (of_device_is_compatible(dev->of_node, "fsl,imx6q-usdhc"))
+ pre_div = 1;
+
if (clock == 0) {
if (of_device_is_compatible(dev->of_node, "fsl,imx6q-usdhc")) {
val = readl(host->ioaddr + ESDHC_VENDOR_SPEC);
--
1.7.1
next prev parent reply other threads:[~2013-09-04 13:01 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 12:54 [PATCH 0/8] mmc: sdhci-esdhc-imx: add SD3.0 support Dong Aisheng
2013-09-04 12:54 ` [PATCH 1/8] mmc: sdhci: add hooks for platform specific tuning Dong Aisheng
2013-09-05 3:14 ` Shawn Guo
2013-09-05 14:53 ` Dong Aisheng
2013-09-04 12:54 ` [PATCH 2/8] mmc: sdhci: allow platform access of sdhci_send_command Dong Aisheng
2013-09-04 12:54 ` [PATCH 3/8] sdhci: sdhci-esdhc-imx: support real clock on and off for imx6q Dong Aisheng
2013-09-05 4:32 ` Shawn Guo
2013-09-05 14:59 ` Dong Aisheng
2013-09-04 12:54 ` [PATCH 4/8] sdhci: sdhci-esdhci-imx: add sd3.0 clock tuning support Dong Aisheng
2013-09-05 6:00 ` Shawn Guo
2013-09-05 15:02 ` Dong Aisheng
2013-09-05 7:33 ` Ulf Hansson
2013-09-05 17:52 ` Dong Aisheng
2013-09-16 7:48 ` Ulf Hansson
2013-09-04 12:54 ` [PATCH 5/8] sdhci: sdhci-esdhc-imx: change pinctrl state according to uhs mode Dong Aisheng
2013-09-05 6:34 ` Shawn Guo
2013-09-05 15:06 ` Dong Aisheng
2013-09-05 7:38 ` Ulf Hansson
2013-09-05 16:04 ` Dong Aisheng
2013-09-13 14:01 ` Ulf Hansson
2013-09-13 16:38 ` Dong Aisheng
2013-09-05 18:40 ` Matt Sealey
2013-09-11 9:26 ` Dong Aisheng
2013-09-27 0:28 ` Matt Sealey
2013-09-04 12:54 ` Dong Aisheng [this message]
2013-09-04 12:54 ` [PATCH 7/8] mmc: sdhci-esdhc: set actual_clock in clock setting Dong Aisheng
2013-09-04 12:54 ` [PATCH 8/8] ARM: dts: imx6qdl: add uhs pinctrl state for usdhc3 Dong Aisheng
2013-09-05 6:43 ` Shawn Guo
2013-09-05 15:09 ` Dong Aisheng
2013-09-05 8:03 ` Sascha Hauer
2013-09-05 15:29 ` Dong Aisheng
2013-09-05 7:42 ` [PATCH 0/8] mmc: sdhci-esdhc-imx: add SD3.0 support Ulf Hansson
2013-09-05 18:01 ` Dong Aisheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378299257-2980-7-git-send-email-b29396@freescale.com \
--to=b29396@freescale.com \
--cc=anton@enomsg.org \
--cc=cjb@laptop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).