summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-tegra.c
diff options
context:
space:
mode:
authorPavan Kunapuli <pkunapuli@nvidia.com>2011-01-28 19:17:33 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-04-26 15:50:33 -0700
commitd38c354fb1f9d50f12ad84fd2fda363ab48a515f (patch)
tree5673b396c8ea06d5eae32d0b241382ac1ca4bbc7 /drivers/mmc/host/sdhci-tegra.c
parent5fd8978470e162a1630b5bf99d2b068743b6d2a4 (diff)
sdhci-tegra:Enabling LVL2_CLK_OVR for sdmmc1
Enabling LVL2 CLK OVR bit for sdmmc1. Disabling cd and wp gpios for sdmmc1. Enabling vddio_sdmmc1 using regulator and setting the voltage to 3.3V. Using clk_m for sdmmc1. Original-Change-Id: Id38e2357c5cafe103b7607ef5adb4e7e9bc228d4 Reviewed-on: http://git-master/r/17212 Tested-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Change-Id: I89e4ab5b4cc501cf02eb800bc3acb49b0dba2519
Diffstat (limited to 'drivers/mmc/host/sdhci-tegra.c')
-rw-r--r--drivers/mmc/host/sdhci-tegra.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 4e4ce5a5e532..83988f2f9103 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/bitops.h>
#include <linux/mmc/card.h>
+#include <linux/regulator/consumer.h>
#include <mach/sdhci.h>
@@ -167,7 +168,9 @@ static int __devinit tegra_sdhci_probe(struct platform_device *pdev)
int irq;
void __iomem *ioaddr;
void __iomem *ioaddr_clk_rst;
+ void __iomem *ioaddr_pinmux;
unsigned int val = 0;
+ struct regulator *vsd;
plat = pdev->dev.platform_data;
if (plat == NULL)
@@ -188,7 +191,7 @@ static int __devinit tegra_sdhci_probe(struct platform_device *pdev)
/* Fix ME: Enable the LVL2 CLK OVR bit */
ioaddr_clk_rst = ioremap(0x60006300, 0x400);
val = readl(ioaddr_clk_rst + 0xa0);
- val |= 0x60;
+ val |= 0x68;
writel(val, ioaddr_clk_rst + 0xa0);
sdhci = sdhci_alloc_host(&pdev->dev, sizeof(struct tegra_sdhci_host));
@@ -211,6 +214,16 @@ static int __devinit tegra_sdhci_probe(struct platform_device *pdev)
if (rc != 0)
goto err_clkput;
+ if (pdev->id == 0) {
+ vsd = regulator_get(NULL, "vddio_sdmmc1");
+ if (IS_ERR(vsd))
+ printk("failed to sdmmc1 regulator\n");
+ else {
+ regulator_enable(vsd);
+ regulator_set_voltage(vsd, 3300000, 3300000);
+ }
+ }
+
host->clk_enabled = 1;
sdhci->hw_name = "tegra";
sdhci->ops = &tegra_sdhci_ops;