diff options
author | Pavan Kunapuli <pkunapuli@nvidia.com> | 2012-02-20 18:16:12 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-21 17:59:29 -0800 |
commit | eb54a1679f0b342f4f8d91ee3f71e12bf28ee252 (patch) | |
tree | 14cb6593814247767a2033abfa7a0769fbd9684d /drivers/mmc | |
parent | 63cf7a5d8e6a0229cc31826112129ae5d4a09430 (diff) |
mmc: host: Do not enable preset value by default
In case of non standard clock, preset value
should not be enabled from sdhci driver as
it would make clock divider programming in-
effective.
Bug 937318
Change-Id: I5eaeab538a4978dd8c03501c3dcba2e8a92eea59
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/84807
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 50a268ea26d5..5bce6c238e9d 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1813,6 +1813,16 @@ static void sdhci_enable_preset_value(struct mmc_host *mmc, bool enable) if (host->version < SDHCI_SPEC_300) return; + /* + * Enabling preset value would make programming clock + * divider ineffective. The controller would use the + * values present in the preset value registers. In + * case of non-standard clock, let the platform driver + * decide whether to enable preset or not. + */ + if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK) + return; + spin_lock_irqsave(&host->lock, flags); ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); |