mmc: sdhci: add eMMC hardware reset support
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 29 Aug 2011 13:42:12 +0000 (16:42 +0300)
committerChris Ball <cjb@laptop.org>
Wed, 26 Oct 2011 20:32:06 +0000 (16:32 -0400)
Add an SDHCI operation for hardware reset and connect it to the
host controller operation.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index 0e02cc1df12e40b66b4302ee9af6d69a5f9947fe..d66a7a11a4fc4644aa9c066542d9333946bd2b09 100644 (file)
@@ -1471,6 +1471,14 @@ static int sdhci_get_ro(struct mmc_host *mmc)
        return 0;
 }
 
+static void sdhci_hw_reset(struct mmc_host *mmc)
+{
+       struct sdhci_host *host = mmc_priv(mmc);
+
+       if (host->ops && host->ops->hw_reset)
+               host->ops->hw_reset(host);
+}
+
 static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 {
        struct sdhci_host *host;
@@ -1805,6 +1813,7 @@ static const struct mmc_host_ops sdhci_ops = {
        .request        = sdhci_request,
        .set_ios        = sdhci_set_ios,
        .get_ro         = sdhci_get_ro,
+       .hw_reset       = sdhci_hw_reset,
        .enable_sdio_irq = sdhci_enable_sdio_irq,
        .start_signal_voltage_switch    = sdhci_start_signal_voltage_switch,
        .execute_tuning                 = sdhci_execute_tuning,
index 745c42fa41ed5fb85cfc45ff9238e37b222ae2b1..7bd919c33cc29ef7d2d17781824783a4c58ad86d 100644 (file)
@@ -273,7 +273,7 @@ struct sdhci_ops {
        void    (*platform_reset_enter)(struct sdhci_host *host, u8 mask);
        void    (*platform_reset_exit)(struct sdhci_host *host, u8 mask);
        int     (*set_uhs_signaling)(struct sdhci_host *host, unsigned int uhs);
-
+       void    (*hw_reset)(struct sdhci_host *host);
 };
 
 #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS