Commit 3fe32651 authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

mmc-twl4030 uses regulator framework

Finish decoupling the HSMMC glue from the twl4030 as the only
regulator provider, using the regulator framework instead.
This makes the glue's "mmc-twl4030" name become a complete
misnomer ... this code could probably all migrate into the
HSMMC driver now.

Tested on 3430SDP (SD and low-voltage MMC) and Beagle (SD),
plus some other boards (including Overo) after they were
converted to set up MMC regulators properly.

Eventually all boards should just associate a regulator with
each MMC controller they use.  In some cases (Overo MMC2 and
Pandora MMC3, at least) that would be a fixed-voltage regulator
with no real software control.  As a temporary hack (pending
regulator-next updates to make the "fixed.c" regulator become
usable) there's a new ocr_mask field for those boards.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 4e1f2b82
This diff is collapsed.
...@@ -16,9 +16,10 @@ struct twl4030_hsmmc_info { ...@@ -16,9 +16,10 @@ struct twl4030_hsmmc_info {
int gpio_wp; /* or -EINVAL */ int gpio_wp; /* or -EINVAL */
char *name; /* or NULL for default */ char *name; /* or NULL for default */
struct device *dev; /* returned: pointer to mmc adapter */ struct device *dev; /* returned: pointer to mmc adapter */
int ocr_mask; /* temporary HACK */
}; };
#if defined(CONFIG_TWL4030_CORE) && \ #if defined(CONFIG_REGULATOR) && \
(defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)) defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE))
......
...@@ -1005,7 +1005,6 @@ static int __init omap_mmc_probe(struct platform_device *pdev) ...@@ -1005,7 +1005,6 @@ static int __init omap_mmc_probe(struct platform_device *pdev)
mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
mmc->max_seg_size = mmc->max_req_size; mmc->max_seg_size = mmc->max_req_size;
mmc->ocr_avail = mmc_slot(host).ocr_mask;
mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED;
if (pdata->slots[host->slot_id].wires >= 4) if (pdata->slots[host->slot_id].wires >= 4)
...@@ -1042,13 +1041,14 @@ static int __init omap_mmc_probe(struct platform_device *pdev) ...@@ -1042,13 +1041,14 @@ static int __init omap_mmc_probe(struct platform_device *pdev)
goto err_irq; goto err_irq;
} }
/* initialize power supplies, gpios, etc */
if (pdata->init != NULL) { if (pdata->init != NULL) {
if (pdata->init(&pdev->dev) != 0) { if (pdata->init(&pdev->dev) != 0) {
dev_dbg(mmc_dev(host->mmc), dev_dbg(mmc_dev(host->mmc), "late init error\n");
"Unable to configure MMC IRQs\n");
goto err_irq_cd_init; goto err_irq_cd_init;
} }
} }
mmc->ocr_avail = mmc_slot(host).ocr_mask;
/* Request IRQ for card detect */ /* Request IRQ for card detect */
if ((mmc_slot(host).card_detect_irq) && (mmc_slot(host).card_detect)) { if ((mmc_slot(host).card_detect_irq) && (mmc_slot(host).card_detect)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment