Skip to content

Commit e591fcf

Browse files
Chevron Listorulf
authored andcommitted
mmc: sdhci-pci-o2micro: Fix card detect by dealing with debouncing
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<[email protected]> Fixes: 7d44061 ("mmc: sdhci-pci-o2micro: Fix O2 Host data read/write DLL Lock phase shift issue") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] [Ulf: Updated the commit message] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b13bacc commit e591fcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/mmc/host/sdhci-pci-o2micro.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ static int sdhci_o2_get_cd(struct mmc_host *mmc)
152152

153153
if (!(sdhci_readw(host, O2_PLL_DLL_WDT_CONTROL1) & O2_PLL_LOCK_STATUS))
154154
sdhci_o2_enable_internal_clock(host);
155+
else
156+
sdhci_o2_wait_card_detect_stable(host);
155157

156158
return !!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT);
157159
}

0 commit comments

Comments
 (0)