When kernel booting for the first time, pcl may cause incorrect
state for bus timing which cause detect failure from bus porbe, and been
recoginzed well from driver probe. Check cd state, and avoid this action.
.
[ 5.112563] dwmmc_rockchip
10214000.rksdmmc: data_over interrupt timeout!
[ 5.112704] mmc1: error -84 whilst initialising SD card
...
[ 5.201691] mmc1: new high speed SDHC card at address 0007
[ 5.202583] mmcblk1: mmc1:0007 SD32G 29.3 GiB
Tested-and-acked-by: heyun <heyun@rock-chips.com>
Signed-off-by: lintao <lintao@rock-chips.com>
dev_warn(host->dev, "%s: No udbg pinctrl found!\n",
mmc_hostname(host->mmc));
} else {
- if (pinctrl_select_state(host->pinctrl, host->pins_udbg) < 0)
- dev_err(host->dev, "%s: Udbg pinctrl setting failed!\n",
- mmc_hostname(host->mmc));
+ if (!dw_mci_get_cd(host->mmc))
+ if (pinctrl_select_state(host->pinctrl, host->pins_udbg) < 0)
+ dev_err(host->dev, "%s: Udbg pinctrl setting failed!\n",
+ mmc_hostname(host->mmc));
}
}
}