aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 6e44025acf01..29a63d2839ec 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -161,6 +161,7 @@ struct omap_hsmmc_host {
161 */ 161 */
162 struct regulator *vcc; 162 struct regulator *vcc;
163 struct regulator *vcc_aux; 163 struct regulator *vcc_aux;
164 int pbias_disable;
164 void __iomem *base; 165 void __iomem *base;
165 resource_size_t mapbase; 166 resource_size_t mapbase;
166 spinlock_t irq_lock; /* Prevent races with irq handler */ 167 spinlock_t irq_lock; /* Prevent races with irq handler */
@@ -255,11 +256,11 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
255 if (!host->vcc) 256 if (!host->vcc)
256 return 0; 257 return 0;
257 /* 258 /*
258 * With DT, never turn OFF the regulator. This is because 259 * With DT, never turn OFF the regulator for MMC1. This is because
259 * the pbias cell programming support is still missing when 260 * the pbias cell programming support is still missing when
260 * booting with Device tree 261 * booting with Device tree
261 */ 262 */
262 if (dev->of_node && !vdd) 263 if (host->pbias_disable && !vdd)
263 return 0; 264 return 0;
264 265
265 if (mmc_slot(host).before_set_reg) 266 if (mmc_slot(host).before_set_reg)
@@ -1520,10 +1521,10 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
1520 (ios->vdd == DUAL_VOLT_OCR_BIT) && 1521 (ios->vdd == DUAL_VOLT_OCR_BIT) &&
1521 /* 1522 /*
1522 * With pbias cell programming missing, this 1523 * With pbias cell programming missing, this
1523 * can't be allowed when booting with device 1524 * can't be allowed on MMC1 when booting with device
1524 * tree. 1525 * tree.
1525 */ 1526 */
1526 !host->dev->of_node) { 1527 !host->pbias_disable) {
1527 /* 1528 /*
1528 * The mmc_select_voltage fn of the core does 1529 * The mmc_select_voltage fn of the core does
1529 * not seem to set the power_mode to 1530 * not seem to set the power_mode to
@@ -1871,6 +1872,10 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
1871 1872
1872 omap_hsmmc_context_save(host); 1873 omap_hsmmc_context_save(host);
1873 1874
1875 /* This can be removed once we support PBIAS with DT */
1876 if (host->dev->of_node && host->mapbase == 0x4809c000)
1877 host->pbias_disable = 1;
1878
1874 host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck"); 1879 host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
1875 /* 1880 /*
1876 * MMC can still work without debounce clock. 1881 * MMC can still work without debounce clock.