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 <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to