@@ -138,7 +138,7 @@ static void sdhci_disable_card_detection(struct sdhci_host *host)
sdhci_set_card_detection(host, false);
}
-static void sdhci_reset(struct sdhci_host *host, u8 mask)
+void sdhci_reset_helper(struct sdhci_host *host, u8 mask)
{
unsigned long timeout;
u32 uninitialized_var(ier);
@@ -176,6 +176,14 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier);
}
+static void sdhci_reset(struct sdhci_host *host, u8 mask)
+{
+ if (host->ops->sdhci_reset)
+ return host->ops->sdhci_reset(host, mask);
+ else
+ return sdhci_reset_helper(host, mask);
+}
+
static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios);
static void sdhci_init(struct sdhci_host *host, int soft)
@@ -323,6 +323,7 @@ struct sdhci_ops {
unsigned int (*get_max_clock)(struct sdhci_host *host);
unsigned int (*get_min_clock)(struct sdhci_host *host);
unsigned int (*get_timeout_clock)(struct sdhci_host *host);
+ void (*sdhci_reset)(struct sdhci_host *host, u8 mask);
int (*get_ro)(struct mmc_host *mmc);
};