diff mbox

sdhci: seperate out reset so if platform specific helper exists it is called

Message ID 06FF83D7-6C8A-47FE-934B-E1F21E7AB915@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Philip Rakity Sept. 26, 2010, 12:44 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 17f1554..451fad3 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -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)
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index a41ad8c..f8c18cd 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -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);
 };