Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297337
b: refs/heads/master
c: e3f1adb
h: refs/heads/master
i:
  297335: 8a34c35
v: v3
  • Loading branch information
Rajendra Nayak authored and Chris Ball committed Mar 27, 2012
1 parent 4351412 commit 272baa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cb9af49a1ba2d7fc1c7236df5513449dda30a12
refs/heads/master: e3f1adb63cfa6f6ef6b4e63a546e13210c5f3cb2
31 changes: 2 additions & 29 deletions trunk/drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,6 @@
#define SOFTRESET (1 << 1)
#define RESETDONE (1 << 0)

/*
* FIXME: Most likely all the data using these _DEVID defines should come
* from the platform_data, or implemented in controller and slot specific
* functions.
*/
#define OMAP_MMC1_DEVID 0
#define OMAP_MMC2_DEVID 1
#define OMAP_MMC3_DEVID 2
#define OMAP_MMC4_DEVID 3
#define OMAP_MMC5_DEVID 4

#define MMC_AUTOSUSPEND_DELAY 100
#define MMC_TIMEOUT_MS 20
#define OMAP_MMC_MIN_CLOCK 400000
Expand Down Expand Up @@ -164,7 +153,6 @@ struct omap_hsmmc_host {
void __iomem *base;
resource_size_t mapbase;
spinlock_t irq_lock; /* Prevent races with irq handler */
unsigned int id;
unsigned int dma_len;
unsigned int dma_sg_idx;
unsigned char bus_mode;
Expand Down Expand Up @@ -300,32 +288,22 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on,
static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
{
struct regulator *reg;
int ret = 0;
int ocr_value = 0;

mmc_slot(host).set_power = omap_hsmmc_set_power;

reg = regulator_get(host->dev, "vmmc");
if (IS_ERR(reg)) {
dev_dbg(host->dev, "vmmc regulator missing\n");
/*
* HACK: until fixed.c regulator is usable,
* we don't require a main regulator
* for MMC2 or MMC3
*/
if (host->id == OMAP_MMC1_DEVID) {
ret = PTR_ERR(reg);
goto err;
}
} else {
host->vcc = reg;
ocr_value = mmc_regulator_get_ocrmask(reg);
if (!mmc_slot(host).ocr_mask) {
mmc_slot(host).ocr_mask = ocr_value;
} else {
if (!(mmc_slot(host).ocr_mask & ocr_value)) {
pr_err("MMC%d ocrmask %x is not supported\n",
host->id, mmc_slot(host).ocr_mask);
pr_err("MMC ocrmask %x is not supported\n",
mmc_slot(host).ocr_mask);
mmc_slot(host).ocr_mask = 0;
return -EINVAL;
}
Expand Down Expand Up @@ -358,10 +336,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
}

return 0;

err:
mmc_slot(host).set_power = NULL;
return ret;
}

static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host)
Expand Down Expand Up @@ -1791,7 +1765,6 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
host->dev->dma_mask = &pdata->dma_mask;
host->dma_ch = -1;
host->irq = irq;
host->id = pdev->id;
host->slot_id = 0;
host->mapbase = res->start;
host->base = ioremap(host->mapbase, SZ_4K);
Expand Down

0 comments on commit 272baa5

Please sign in to comment.