summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2015-04-09 16:16:09 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2015-05-08 17:26:19 +0800
commit23845c3527c616c8df80b6f051ee2adefc010385 (patch)
tree1bb6d90646e58ae6b380b16d82fcfae3340a199d /drivers
parented949f3840e0604aa39f5c4ba4cb14433a96ff5d (diff)
MLK-10629-2 mmc: sdhci-esdhc-imx: implement wifi_card_detect function
WiFi driver could call wifi_card_detect function to re-detect card, this is required by some special WiFi cards like broadcom WiFi. To use this function, a new property is introduced to indicate a wifi host. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit bb95c03f7c576cdf20367875c19764ebb3eea4b2)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 712e49329338..708308db4ef7 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -134,6 +134,14 @@
/* the IP supports eMMC HS400 */
#define ESDHC_FLAG_SUP_HS400 BIT(9)
+static struct mmc_host *wifi_mmc_host;
+void wifi_card_detect(void)
+{
+ WARN_ON(!wifi_mmc_host);
+ mmc_detect_change(wifi_mmc_host, 0);
+}
+EXPORT_SYMBOL(wifi_card_detect);
+
struct esdhc_soc_data {
u32 flags;
};
@@ -1036,6 +1044,11 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
if (of_find_property(np, "enable-sdio-wakeup", NULL))
host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
+ if (of_get_property(np, "wifi-host", NULL)) {
+ wifi_mmc_host = host->mmc;
+ dev_info(mmc_dev(host->mmc), "assigned as wifi host\n");
+ }
+
return 0;
}
#else