mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
mmc: sdhci-pci-o2micro: Fix card detect by dealing with debouncing
commite591fcf6b4
upstream. The result from ->get_cd() may be incorrect as the card detect debouncing isn't managed correctly. Let's fix it. Signed-off-by: Chevron Li<chevron.li@bayhubtech.com> Fixes:7d44061704
("mmc: sdhci-pci-o2micro: Fix O2 Host data read/write DLL Lock phase shift issue") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220602132543.596-1-chevron.li@bayhubtech.com [Ulf: Updated the commit message] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
161ec2a080
commit
7df8c49721
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,8 @@ static int sdhci_o2_get_cd(struct mmc_host *mmc)
|
|||
|
||||
if (!(sdhci_readw(host, O2_PLL_DLL_WDT_CONTROL1) & O2_PLL_LOCK_STATUS))
|
||||
sdhci_o2_enable_internal_clock(host);
|
||||
else
|
||||
sdhci_o2_wait_card_detect_stable(host);
|
||||
|
||||
return !!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue