mmc: sdhci-msm:Add qcom,broken_pwr_cycle_host capability using DT

Specifies if SDIO host and card  requires complete
power_restore (mmc_sdio_power_restore) while resuming.
This is in cases where card cannot go through complete
pwr_cycle in suspend/resume like in case of
QCA9377 & QCA6574.

Change-Id: I41976752aff28d1e86746d16298c9de5bf071519
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
Ritesh Harjani 2016-04-01 16:57:04 +05:30 committed by Gerrit - the friendly Code Review server
parent 226b74c3d2
commit f1f29fb369
3 changed files with 11 additions and 0 deletions

View File

@ -82,6 +82,10 @@ Optional Properties:
during clock scaling. If this property is not
defined, then it falls back to the default HS
bus speed mode to maintain backward compatibility.
- qcom,broken-pwr-cycle-host: Specifies if SDIO host and card requires complete
power_restore (mmc_sdio_power_restore) while resuming.
This is in cases where card cannot go through
complete pwr_cycle in suspend/resume.
In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
- qcom,<supply>-always-on - specifies whether supply should be kept "on" always.

View File

@ -1768,6 +1768,9 @@ struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
if (of_get_property(np, "qcom,nonremovable", NULL))
pdata->nonremovable = true;
if (of_get_property(np, "qcom,broken-pwr-cycle-host", NULL))
pdata->broken_pwr_cycle_host = true;
if (of_get_property(np, "qcom,modified-dynamic-qos", NULL))
pdata->use_mod_dynamic_qos = true;
@ -3831,6 +3834,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)
if (msm_host->pdata->nonremovable)
msm_host->mmc->caps |= MMC_CAP_NONREMOVABLE;
if (msm_host->pdata->broken_pwr_cycle_host)
msm_host->mmc->caps2 |= MMC_CAP2_BROKEN_PWR_CYCLE;
if (msm_host->pdata->nonhotplug)
msm_host->mmc->caps2 |= MMC_CAP2_NONHOTPLUG;

View File

@ -95,6 +95,7 @@ struct sdhci_msm_pltfm_data {
bool nonremovable;
bool use_mod_dynamic_qos;
bool nonhotplug;
bool broken_pwr_cycle_host;
bool no_1p8v;
bool pin_cfg_sts;
struct sdhci_msm_pin_data *pin_data;