From: Chevron Li <chevron.li@bayhubtech.com>
To: adrian.hunter@intel.com, ulf.hansson@linaro.org,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: shaper.liu@bayhubtech.com, chevron.li@bayhubtech.com,
xiaoguang.yu@bayhubtech.com, shirley.her@bayhubtech.com,
fred.ai@bayhubtech.com
Subject: [PATCH V1 1/1] mmc:sdhci-pci-o2micro:fix card detect issue because card detect debouncing isn't done
Date: Thu, 2 Jun 2022 06:25:43 -0700 [thread overview]
Message-ID: <20220602132543.596-1-chevron.li@bayhubtech.com> (raw)
get_cd result is uncorrect during card detect debouncing
we need to wait card detect stable before return get_cd result
Signed-off-by: Chevron Li<chevron.li@bayhubtech.com>
---
change in V1:
add wait card detect stable logical before return card detect result.
---
drivers/mmc/host/sdhci-pci-o2micro.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c
index 92c20cb8074a..0d4d343dbb77 100644
--- a/drivers/mmc/host/sdhci-pci-o2micro.c
+++ b/drivers/mmc/host/sdhci-pci-o2micro.c
@@ -152,6 +152,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);
}
base-commit: d1dc87763f406d4e67caf16dbe438a5647692395
--
2.32.0
next reply other threads:[~2022-06-02 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 13:25 Chevron Li [this message]
2022-06-07 10:43 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220602132543.596-1-chevron.li@bayhubtech.com \
--to=chevron.li@bayhubtech.com \
--cc=adrian.hunter@intel.com \
--cc=fred.ai@bayhubtech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shaper.liu@bayhubtech.com \
--cc=shirley.her@bayhubtech.com \
--cc=ulf.hansson@linaro.org \
--cc=xiaoguang.yu@bayhubtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®