mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
mmc: host:rk_sdmmc:
wifi: SDIO use flags to detect card-in or card-remove.If tagged up wifi and off, then go into deep suspend and resume, we do not judge if wifi is on or off, this will crash pm.resume for drivers cannot access register without hclk_mmc. [ 357.835059] 1192..dw_mci_set_ios: no card. [mmc1] [ 358.322686] dwmmc_rockchip ff0d0000.rksdmmc: Timeout resetting block (ctrl reset 0x1) [ 358.322792] dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -19 [ 358.322813] PM: Device ff0d0000.rksdmmc failed to resume: error -19 Fix it by default return success state to pm.resume if wifi off in SDIO slot
This commit is contained in:
@@ -3089,13 +3089,13 @@ static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset)
|
||||
do {
|
||||
ctrl = mci_readl(host, CTRL);
|
||||
if (!(ctrl & reset))
|
||||
return true;
|
||||
return true;
|
||||
} while (time_before(jiffies, timeout));
|
||||
|
||||
dev_err(host->dev,
|
||||
"Timeout resetting block (ctrl reset %#x)\n",
|
||||
ctrl & reset);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3517,7 +3517,15 @@ int dw_mci_resume(struct dw_mci *host)
|
||||
{
|
||||
int i, ret;
|
||||
u32 regs;
|
||||
struct dw_mci_slot *slot;
|
||||
|
||||
if (host->mmc->restrict_caps & RESTRICT_CARD_TYPE_SDIO){
|
||||
slot = mmc_priv(host->mmc);
|
||||
|
||||
if(!test_bit(DW_MMC_CARD_PRESENT, &slot->flags))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (host->vmmc) {
|
||||
ret = regulator_enable(host->vmmc);
|
||||
if (ret) {
|
||||
@@ -3526,7 +3534,7 @@ int dw_mci_resume(struct dw_mci *host)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!dw_mci_ctrl_all_reset(host)) {
|
||||
ret = -ENODEV;
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user