diff mbox

[4/4] sdhci: sdhci-pxa.c: add callback for signaling for DDR

Message ID 30F8ED01-C591-4D70-BAE1-B96F396E4431@marvell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Philip Rakity Feb. 14, 2011, 7:19 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c
index 3d01f94..8527ac1 100644
--- a/drivers/mmc/host/sdhci-pxa.c
+++ b/drivers/mmc/host/sdhci-pxa.c
@@ -101,8 +101,25 @@  static unsigned int get_f_max_clock(struct sdhci_host *host)
 	return pxa->pdata->max_speed;
 }
 
+static unsigned int set_signaling_voltage(struct sdhci_host *host,
+	unsigned int ddr)
+{
+	u16 con;
+
+	pr_debug("%s:%s\n", __func__, mmc_hostname(host->mmc));
+	/*
+	 * 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 = {
 	.platform_reset_exit = platform_reset_exit,
+	.set_signaling_voltage = set_signaling_voltage,
 	.get_f_max_clock = NULL,
 };