diff mbox

[3/3] sdhci: add support for DDR to platform code

Message ID 673349E8-F326-4620-AF2C-CCBF11645B71@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Philip Rakity Jan. 21, 2011, 4:29 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
index 5a61208..8f9a04e 100644
--- a/drivers/mmc/host/sdhci-pxa.c
+++ b/drivers/mmc/host/sdhci-pxa.c
@@ -69,8 +69,23 @@  static void set_clock(struct sdhci_host *host, unsigned int clock)
 	}
 }
 
+static unsigned int set_signaling_voltage(struct sdhci_host *host,
+	unsigned int ddr)
+{
+	u16 con;
+	/*
+	 * Set V18_EN -- DDR does not work without this.
+	 * does not change signaling voltage
+	 */
+	con = readw(host->ioaddr + SDHCI_HOST_CONTROL_2);
+	con |= SDCTRL_2_SDH_V18_EN;
+	writew(con, host->ioaddr + SDHCI_HOST_CONTROL_2);
+	return 0;
+}
+
 static struct sdhci_ops sdhci_pxa_ops = {
 	.set_clock = set_clock,
+	.set_signaling_voltage = set_signaling_voltage,
 };
 
 /*****************************************************************************\