summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorAnton Vorontsov2010-05-26 23:41:53 +0200
committerLinus Torvalds2010-05-27 18:12:39 +0200
commitf27f47ef5b67106ff1cdeebf061387a7b30c12bc (patch)
tree0238bc989cefa0df4e64eaa3c21c182c66c294c4 /drivers/mmc/host/sdhci.c
parentmmc-omap: add support for 16-bit and 32-bit registers (diff)
downloadkernel-qcow2-linux-f27f47ef5b67106ff1cdeebf061387a7b30c12bc.tar.gz
kernel-qcow2-linux-f27f47ef5b67106ff1cdeebf061387a7b30c12bc.tar.xz
kernel-qcow2-linux-f27f47ef5b67106ff1cdeebf061387a7b30c12bc.zip
sdhci: implement CAP_CLOCK_BASE_BROKEN quirk
Some hosts (e.g. as found in CNS3xxx SOCs) report wrong value in CLOCK_BASE capability field, and currently there is no way to force the SDHCI core to use the platform-provided base clock value. This patch implements CAP_CLOCK_BASE_BROKEN quirk. When enabled, the SDHCI core will always use base clock frequency provided by the platform. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Richard Röjfors <richard.rojfors@pelagicore.com> Cc: David Vrabel <david.vrabel@csr.com> Cc: Pierre Ossman <pierre@ossman.eu> Cc: Ben Dooks <ben@simtec.co.uk> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9d4fdfa685e5..02b365f5a4be 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1744,7 +1744,8 @@ int sdhci_add_host(struct sdhci_host *host)
host->max_clk =
(caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
host->max_clk *= 1000000;
- if (host->max_clk == 0) {
+ if (host->max_clk == 0 || host->quirks &
+ SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN) {
if (!host->ops->get_max_clock) {
printk(KERN_ERR
"%s: Hardware doesn't specify base clock "