diff options
author | Guoping Yu <guopingy@codeaurora.org> | 2014-08-20 16:56:18 +0800 |
---|---|---|
committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-27 10:29:11 -0700 |
commit | 9ce1e0b186f1efc3afa1db62d66538f2dce57192 (patch) | |
tree | f96edb65cb8c0b130e9765450ea482b49c32e40e | |
parent | eef1739c4479c2ad5a69daf8a4092da630a96136 (diff) |
mmc: sdhci-msm: add nonhotplug support
With some devices like QRD SKUK, SD card could not support
hotplug as there is no cd-gpio, and also could not use polling
way due to power comsumption. So add nonhotplug to meet such
requirement and when SD card lost or removed manually, device
will not crash until next reboot process to detect SD card.
Change-Id: I318d3db72fc09248c5dada2fb6d69ade1bbf85cb
Signed-off-by: Guoping Yu <guopingy@codeaurora.org>
-rw-r--r-- | Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 3 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-msm.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt index 643944fa8565..e46474cc477b 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt @@ -25,6 +25,9 @@ Optional Properties: 1, 4 and 8. - qcom,nonremovable - specifies whether the card in slot is hot pluggable or hard wired. + - qcom,nonhotplug - specifies the card in slot is not hot pluggable. + if card lost or removed manually at runtime, don't retry + to redetect it until next reboot probe. - qcom,bus-speed-mode - specifies supported bus speed modes by host. The supported bus speed modes are : "HS200_1p8v" - indicates that host can support HS200 at 1.8v. diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index e98a2c96c6ab..ddce818e105c 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -257,6 +257,7 @@ struct sdhci_msm_pltfm_data { unsigned long mmc_bus_width; struct sdhci_msm_slot_reg_data *vreg_data; bool nonremovable; + bool nonhotplug; bool pin_cfg_sts; struct sdhci_msm_pin_data *pin_data; struct sdhci_pinctrl_data *pctrl_data; @@ -1504,6 +1505,9 @@ static 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,nonhotplug", NULL)) + pdata->nonhotplug = true; + return pdata; out: return NULL; @@ -3034,6 +3038,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->nonhotplug) + msm_host->mmc->caps2 |= MMC_CAP2_NONHOTPLUG; + host->cpu_dma_latency_us = msm_host->pdata->cpu_dma_latency_us; init_completion(&msm_host->pwr_irq_completion); |