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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



set the callback for signaling voltage for Dual Data Rate.

The controller requires V18_EN be set for DDR to work.  The
bit enables DDR but does not affect any signaling voltages.
no mdelay is needed.

Signed-off-by: Philip Rakity <prakity@xxxxxxxxxxx>
---
 drivers/mmc/host/sdhci-pxa.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

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,
 };
 
 /*****************************************************************************\
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux