diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-msm.c')
| -rw-r--r-- | drivers/mmc/host/sdhci-msm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 3fb7d2eec93f..c283291db705 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c | |||
| @@ -29,6 +29,9 @@ | |||
| 29 | #define CORE_VERSION_MAJOR_MASK (0xf << CORE_VERSION_MAJOR_SHIFT) | 29 | #define CORE_VERSION_MAJOR_MASK (0xf << CORE_VERSION_MAJOR_SHIFT) |
| 30 | #define CORE_VERSION_MINOR_MASK 0xff | 30 | #define CORE_VERSION_MINOR_MASK 0xff |
| 31 | 31 | ||
| 32 | #define CORE_MCI_GENERICS 0x70 | ||
| 33 | #define SWITCHABLE_SIGNALING_VOLTAGE BIT(29) | ||
| 34 | |||
| 32 | #define CORE_HC_MODE 0x78 | 35 | #define CORE_HC_MODE 0x78 |
| 33 | #define HC_MODE_EN 0x1 | 36 | #define HC_MODE_EN 0x1 |
| 34 | #define CORE_POWER 0x0 | 37 | #define CORE_POWER 0x0 |
| @@ -1028,12 +1031,23 @@ static void sdhci_msm_check_power_status(struct sdhci_host *host, u32 req_type) | |||
| 1028 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); | 1031 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); |
| 1029 | struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); | 1032 | struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); |
| 1030 | bool done = false; | 1033 | bool done = false; |
| 1034 | u32 val; | ||
| 1031 | 1035 | ||
| 1032 | pr_debug("%s: %s: request %d curr_pwr_state %x curr_io_level %x\n", | 1036 | pr_debug("%s: %s: request %d curr_pwr_state %x curr_io_level %x\n", |
| 1033 | mmc_hostname(host->mmc), __func__, req_type, | 1037 | mmc_hostname(host->mmc), __func__, req_type, |
| 1034 | msm_host->curr_pwr_state, msm_host->curr_io_level); | 1038 | msm_host->curr_pwr_state, msm_host->curr_io_level); |
| 1035 | 1039 | ||
| 1036 | /* | 1040 | /* |
| 1041 | * The power interrupt will not be generated for signal voltage | ||
| 1042 | * switches if SWITCHABLE_SIGNALING_VOLTAGE in MCI_GENERICS is not set. | ||
| 1043 | */ | ||
| 1044 | val = readl(msm_host->core_mem + CORE_MCI_GENERICS); | ||
| 1045 | if ((req_type & REQ_IO_HIGH || req_type & REQ_IO_LOW) && | ||
| 1046 | !(val & SWITCHABLE_SIGNALING_VOLTAGE)) { | ||
| 1047 | return; | ||
| 1048 | } | ||
| 1049 | |||
| 1050 | /* | ||
| 1037 | * The IRQ for request type IO High/LOW will be generated when - | 1051 | * The IRQ for request type IO High/LOW will be generated when - |
| 1038 | * there is a state change in 1.8V enable bit (bit 3) of | 1052 | * there is a state change in 1.8V enable bit (bit 3) of |
| 1039 | * SDHCI_HOST_CONTROL2 register. The reset state of that bit is 0 | 1053 | * SDHCI_HOST_CONTROL2 register. The reset state of that bit is 0 |
