* [PATCH V1 1/1] mmc:sdhci-pci-o2micro:fix card detect issue because card detect debouncing isn't done
@ 2022-06-02 13:25 Chevron Li
2022-06-07 10:43 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Chevron Li @ 2022-06-02 13:25 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson, linux-mmc, linux-kernel
Cc: shaper.liu, chevron.li, xiaoguang.yu, shirley.her, fred.ai
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V1 1/1] mmc:sdhci-pci-o2micro:fix card detect issue because card detect debouncing isn't done
2022-06-02 13:25 [PATCH V1 1/1] mmc:sdhci-pci-o2micro:fix card detect issue because card detect debouncing isn't done Chevron Li
@ 2022-06-07 10:43 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2022-06-07 10:43 UTC (permalink / raw)
To: Chevron Li
Cc: adrian.hunter, linux-mmc, linux-kernel, shaper.liu, xiaoguang.yu,
shirley.her, fred.ai
On Thu, 2 Jun 2022 at 15:26, Chevron Li <chevron.li@bayhubtech.com> wrote:
>
> 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>
Applied for fixes, by adding a fixes+stable tag, thanks!
Kind regards
Uffe
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-07 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 13:25 [PATCH V1 1/1] mmc:sdhci-pci-o2micro:fix card detect issue because card detect debouncing isn't done Chevron Li
2022-06-07 10:43 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.