diff options
author | Rajendra Nayak <rnayak@ti.com> | 2012-03-07 09:55:31 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-03-27 12:20:01 -0400 |
commit | 1cb9af49a1ba2d7fc1c7236df5513449dda30a12 (patch) | |
tree | d657d936c1ab37c0adb5c9308498100b3105c5cd /drivers/mmc/host/omap_hsmmc.c | |
parent | 69b07ecee936c49f8b7a2099b4276fec7dff6827 (diff) |
mmc: omap_hsmmc: Get rid of omap_hsmmc_4_set_power function
Now that omap_hsmmc_set_power() already has a check to return 0
if !host->vcc, it seems like it can be used even on MMC4 instead
of the dummy omap_hsmmc_4_set_power().
This also helps get rid of all the host->id based check to
populate the right function for on-chip/external level
shifting and use omap_hsmmc_set_power() for all MMC modules.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Tested-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/omap_hsmmc.c')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 11e8c8fe46dc..e9215c264988 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -297,32 +297,13 @@ static int omap_hsmmc_set_power(struct device *dev, int slot, int power_on, | |||
297 | return ret; | 297 | return ret; |
298 | } | 298 | } |
299 | 299 | ||
300 | static int omap_hsmmc_4_set_power(struct device *dev, int slot, int power_on, | ||
301 | int vdd) | ||
302 | { | ||
303 | return 0; | ||
304 | } | ||
305 | |||
306 | static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | 300 | static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) |
307 | { | 301 | { |
308 | struct regulator *reg; | 302 | struct regulator *reg; |
309 | int ret = 0; | 303 | int ret = 0; |
310 | int ocr_value = 0; | 304 | int ocr_value = 0; |
311 | 305 | ||
312 | switch (host->id) { | 306 | mmc_slot(host).set_power = omap_hsmmc_set_power; |
313 | case OMAP_MMC1_DEVID: | ||
314 | case OMAP_MMC2_DEVID: | ||
315 | case OMAP_MMC3_DEVID: | ||
316 | case OMAP_MMC5_DEVID: | ||
317 | /* On-chip level shifting via PBIAS0/PBIAS1 */ | ||
318 | mmc_slot(host).set_power = omap_hsmmc_set_power; | ||
319 | break; | ||
320 | case OMAP_MMC4_DEVID: | ||
321 | mmc_slot(host).set_power = omap_hsmmc_4_set_power; | ||
322 | default: | ||
323 | pr_err("MMC%d configuration not supported!\n", host->id); | ||
324 | return -EINVAL; | ||
325 | } | ||
326 | 307 | ||
327 | reg = regulator_get(host->dev, "vmmc"); | 308 | reg = regulator_get(host->dev, "vmmc"); |
328 | if (IS_ERR(reg)) { | 309 | if (IS_ERR(reg)) { |