diff options
author | Pavan Kunapuli <pkunapuli@nvidia.com> | 2011-11-29 19:56:40 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-08 16:53:05 +0530 |
commit | 55ef299db01b89c8e09cd58fbc2ee58cbad09c66 (patch) | |
tree | 810324378c23479eaf6549c8d2711b1f7ad6bac5 /drivers | |
parent | 8b5f5d8d5035974f87ae34d666b4d24c8af7e001 (diff) |
mmc: Add support for non-standard voltage switching
Adding quirk SDHCI_QUIRK_NON_STD_VOLTAGE_SWITCHING and
callback switch_signal_voltage in sdhci_ops to support
non standard signal voltage switching.
Bug 906650
Change-Id: If5538fb3177770ccb103305a7b3f0f7a6a8b92e6
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/67137
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 7 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 760d54b53a20..24713706295c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1528,6 +1528,12 @@ static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, if (host->version < SDHCI_SPEC_300) return 0; + if (host->quirks & SDHCI_QUIRK_NON_STD_VOLTAGE_SWITCHING) { + if (host->ops->switch_signal_voltage) + return host->ops->switch_signal_voltage( + host, ios->signal_voltage); + } + /* * We first check whether the request is to set signalling voltage * to 3.3V. If so, we change the voltage to 3.3V and return quickly. @@ -1570,7 +1576,6 @@ static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc, /* Wait for 5ms */ usleep_range(5000, 5500); - ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (ctrl & SDHCI_CTRL_VDD_180) { /* Provide SDCLK again and wait for 1ms*/ diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 40619b777901..1c12419f9d64 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -273,9 +273,10 @@ struct sdhci_ops { void (*platform_reset_enter)(struct sdhci_host *host, u8 mask); void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); int (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs); - - int (*suspend)(struct sdhci_host *host, pm_message_t state); - int (*resume)(struct sdhci_host *host); + int (*suspend)(struct sdhci_host *host, pm_message_t state); + int (*resume)(struct sdhci_host *host); + int (*switch_signal_voltage)(struct sdhci_host *host, + unsigned int signal_voltage); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS |