diff mbox

sdhci-pci: CaFe has broken card detection

Message ID 20120703221340.221729D401E@zog.reactivated.net (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Drake July 3, 2012, 10:13 p.m. UTC
At http://dev.laptop.org/ticket/11980 we have determined that the
Marvell CaFe SDHCI controller reports bad card presence during
resume. It reports that no card is present even when it is.

Around 400ms after resuming, a "card inserted" interrupt is generated,
at which point it starts reporting presence.

Work around this hardware oddity by setting the
SDHCI_QUIRK_BROKEN_CARD_DETECTION flag. Thanks to Chris Ball for helping
with diagnosis.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 drivers/mmc/host/sdhci-pci.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Chris Ball July 4, 2012, 12:32 a.m. UTC | #1
Hi Dan,

On Tue, Jul 03 2012, Daniel Drake wrote:
> At http://dev.laptop.org/ticket/11980 we have determined that the
> Marvell CaFe SDHCI controller reports bad card presence during
> resume. It reports that no card is present even when it is.
>
> Around 400ms after resuming, a "card inserted" interrupt is generated,
> at which point it starts reporting presence.
>
> Work around this hardware oddity by setting the
> SDHCI_QUIRK_BROKEN_CARD_DETECTION flag. Thanks to Chris Ball for helping
> with diagnosis.
>
> Signed-off-by: Daniel Drake <dsd@laptop.org>
> ---
>  drivers/mmc/host/sdhci-pci.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
> index 69ef0be..504da71 100644
> --- a/drivers/mmc/host/sdhci-pci.c
> +++ b/drivers/mmc/host/sdhci-pci.c
> @@ -157,6 +157,7 @@ static const struct sdhci_pci_fixes sdhci_ene_714 = {
>  static const struct sdhci_pci_fixes sdhci_cafe = {
>  	.quirks		= SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
>  			  SDHCI_QUIRK_NO_BUSY_IRQ |
> +			  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
>  			  SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
>  };

Thanks, pushed to mmc-next for 3.6 with a stable@ tag to fix the regression.

- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 69ef0be..504da71 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -157,6 +157,7 @@  static const struct sdhci_pci_fixes sdhci_ene_714 = {
 static const struct sdhci_pci_fixes sdhci_cafe = {
 	.quirks		= SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
 			  SDHCI_QUIRK_NO_BUSY_IRQ |
+			  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
 			  SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
 };