From: lintao Date: Mon, 29 Sep 2014 06:39:55 +0000 (+0800) Subject: wifi: tmp workaround 8089 pm for sdk release, will be reverted later X-Git-Tag: firefly_0821_release~4629 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c1b504f2040afd07acf5e40d491224704355f2d;p=firefly-linux-kernel-4.4.55.git wifi: tmp workaround 8089 pm for sdk release, will be reverted later --- diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index cd78befd129a..502ab2ec412a 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -44,7 +44,7 @@ #include #include #include - +#include #include "rk_sdmmc.h" #include "rk_sdmmc_dbg.h" #include @@ -4083,8 +4083,13 @@ EXPORT_SYMBOL(dw_mci_remove); /* * TODO: we should probably disable the clock to the card in the suspend path. */ +extern int get_wifi_chip_type(void); int dw_mci_suspend(struct dw_mci *host) { + if((host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO) && + (get_wifi_chip_type() == WIFI_ESP8089)) + return 0; + if(host->vmmc) regulator_disable(host->vmmc); @@ -4127,6 +4132,12 @@ int dw_mci_resume(struct dw_mci *host) int i, ret, retry_cnt = 0; u32 regs; struct dw_mci_slot *slot; + + if((host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO) && + (get_wifi_chip_type() == WIFI_ESP8089)) + return 0; + + if (host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO) { slot = mmc_priv(host->mmc);