diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-03-17 00:13:59 +0300 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2009-03-24 21:30:09 +0100 |
commit | 8114634ccb54d67a8c01e5825d95bff4e7f7b357 (patch) | |
tree | e80edf6881a8366fadbd4ec06574af8ab6306c24 /drivers/mmc/host/sdhci.c | |
parent | 4240ff0a02cb52f7d10dc1df6d82ba9c27dba07b (diff) | |
download | blackbird-op-linux-8114634ccb54d67a8c01e5825d95bff4e7f7b357.tar.gz blackbird-op-linux-8114634ccb54d67a8c01e5825d95bff4e7f7b357.zip |
sdhci: Add set_clock callback and a quirk for nonstandard clocks
FSL eSDHC hosts have incompatible register map to manage the SDCLK.
This patch adds set_clock callback so that drivers could overwrite
set_clock behaviour.
Similar patch[1] was posted by Ben Dooks, though in Ben's version the
callback is named change_clock, plus the patch has some unrelated bits
that makes the patch difficult to reuse.
[1] http://lkml.org/lkml/2008/12/2/160
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 34ab77bd12ae..75d0ecbce10c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -949,6 +949,12 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) if (clock == host->clock) return; + if (host->ops->set_clock) { + host->ops->set_clock(host, clock); + if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK) + return; + } + sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); if (clock == 0) |