Message ID | 1398865484-527-1-git-send-email-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/30/2014 04:57 PM, Jae hoon Chung wrote: > Hi, Sebastian. Hi Jaehoon, > I didn't know which Soc you used. Altera socfpa. > Do you use the Device-tree? if you use the device-tree, just add the > "broken-cd" property. and with this property the code will rescan the card every few secs? I didn't see this in v3.12. I do have "broken-cd" set. And the card will not be detected if it is inserted after the driver probed. But now that you pointed me at it. You say that "broken-cd" will be scanned by the core, right? Shouldn't the driver then call mmc_of_parse() or am I missing something? > Best Regards, > Jaehoon Chung Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, Sebastian. Your patch didn't base on latest mmc-next repository. You can refer to below git. http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc.git/ I think you made the patch on v3.12. Best Regards, Jaehoon Chung On 05/01/2014 12:17 AM, Sebastian Andrzej Siewior wrote: > On 04/30/2014 04:57 PM, Jae hoon Chung wrote: >> Hi, Sebastian. > > Hi Jaehoon, > >> I didn't know which Soc you used. > > Altera socfpa. > >> Do you use the Device-tree? if you use the device-tree, just add the >> "broken-cd" property. > > and with this property the code will rescan the card every few secs? I > didn't see this in v3.12. I do have "broken-cd" set. And the card will > not be detected if it is inserted after the driver probed. > > But now that you pointed me at it. You say that "broken-cd" will be > scanned by the core, right? Shouldn't the driver then call > mmc_of_parse() or am I missing something? > >> Best Regards, >> Jaehoon Chung > > Sebastian > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);
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(+)