linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: dw_mmc: poll if CD is broken
@ 2014-04-30 13:44 Sebastian Andrzej Siewior
  2014-04-30 13:44 ` [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level Sebastian Andrzej Siewior
       [not found] ` <CAELcNGT7Ei35tmZzAJ4iCdwMCamd5tC-onRmNG3JL+78_6B0-w@mail.gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-04-30 13:44 UTC (permalink / raw)
  To: Seungwon Jeon, Jaehoon Chung
  Cc: Chris Ball, Ulf Hansson, linux-mmc, Sebastian Andrzej Siewior

My CD pin is not available at all (DW_MCI_QUIRK_BROKEN_CARD_DETECTION is
set). The result was in v3.12 that if MMC card was inserted at load
time, then the MMC card was detected. If it wasn't, it wasn't detected
since nobody polled for it and I no irq was wired up.
I haven't noticed any change in that area, therefore I'm adding the
MMC_CAP_NEEDS_POLL flag in case the detection is broken so the core will
check for the MMC card.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/mmc/host/dw_mmc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index cced599..82f5ea2 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2227,6 +2227,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	}
 
 	slot->wp_gpio = dw_mci_of_get_wp_gpio(host->dev, slot->id);
+
+	if (host->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
+		mmc->caps |= MMC_CAP_NEEDS_POLL;
 	dw_mci_of_get_cd_gpio(host->dev, slot->id, mmc);
 
 	ret = mmc_add_host(mmc);
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-01  8:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 13:44 [PATCH 1/2] mmc: dw_mmc: poll if CD is broken Sebastian Andrzej Siewior
2014-04-30 13:44 ` [PATCH 2/2] mmc: dw_mmc: print card frequency in debug level Sebastian Andrzej Siewior
2014-05-01  8:42   ` Jaehoon Chung
     [not found] ` <CAELcNGT7Ei35tmZzAJ4iCdwMCamd5tC-onRmNG3JL+78_6B0-w@mail.gmail.com>
2014-04-30 15:17   ` [PATCH 1/2] mmc: dw_mmc: poll if CD is broken Sebastian Andrzej Siewior
2014-05-01  8:38     ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).