diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 15 |
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; |