If I run ST60/SU60 module SDIO mode in TI AM437x, what is the setting need to check first?

ST60/SU60 SDIO mode need clock to send the card interrupt to the host. By default it's NOT enabled. Please check the following setting and enable it in sdhci.c

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c

index 9c1a099afbbec..63bc33a54d0dd 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1830,6 +1830,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)
struct sdhci_host *host = mmc_priv(mmc);
unsigned long flags;
+ if (enable)
+ pm_runtime_get_noresume(host->mmc->parent);
+
spin_lock_irqsave(&host->lock, flags);
if (enable)
host->flags |= SDHCI_SDIO_IRQ_ENABLED;
@@ -1838,6 +1841,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)
sdhci_enable_sdio_irq_nolock(host, enable);
spin_unlock_irqrestore(&host->lock, flags);
+
+ if (!enable)
+ pm_runtime_put_noidle(host->mmc->parent);
}

Categories

Products