diff mbox

sdhci: add quirk for controllers that don't support write only detect

Message ID 5F58EC42-069D-4469-BF13-F741674BE763@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Philip Rakity Sept. 20, 2010, 4 p.m. UTC
None
diff mbox

Patch

--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -383,7 +383,7 @@  struct sdhci_ops {
 	void		(*platform_set_8_bit)(struct sdhci_host *host);
 	void		(*platform_clear_8_bit)(struct sdhci_host *host);
 	void		(*platform_specific_sdhci_enable_dummy_cmd) (struct sdhci_host *host, int dummycmd);
-	void		(*platform_specific_init_clocks)(struct sdhci_host *host);
+	void		(*platform_generate_initial_74_clocks)(struct sdhci_host *host, u8 power_mode);
 };


--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1279,8 +1279,11 @@  static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 
 	if (ios->power_mode == MMC_POWER_OFF)
 		sdhci_set_power(host, -1);
-	else
+	else {
 		sdhci_set_power(host, ios->vdd);
+		if (host->ops->platform_generate_initial_74_clocks)
+			host->ops->platform_generate_initial_74_clocks(host, ios->power_mode);
+	}

In my adaption layer 
+void generate_init_clocks(struct sdhci_host *host, u8 power_mode)
+{
+	if (slot->power_mode == MMC_POWER_UP 
+	&& power_mode == MMC_POWER_ON) {
		/* slot has old state */