]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAP: hsmmc: Enable MMC4 and MMC5 on OMAP4 platforms
authorKishore Kadiyala <kishore.kadiyala@ti.com>
Tue, 15 Feb 2011 08:40:36 +0000 (03:40 -0500)
committerTony Lindgren <tony@atomide.com>
Tue, 22 Feb 2011 16:37:03 +0000 (08:37 -0800)
OMAP4 supports up to 5 MMC controllers, but only 3 of these were
initialized. MMC5 is used by wl12xx chip. So initialize MMC4 and MMC5.

Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Panduranga Mallireddy <panduranga_mallireddy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/hsmmc.c
drivers/mmc/host/omap_hsmmc.c

index 34272e4863fd9a15d54cf114152c3202d3b1bbe2..5496bc7d40add4134dcf679c9a85215cc5757727 100644 (file)
@@ -350,6 +350,11 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
                                mmc->slots[0].after_set_reg = NULL;
                        }
                        break;
+               case 4:
+               case 5:
+                       mmc->slots[0].before_set_reg = NULL;
+                       mmc->slots[0].after_set_reg = NULL;
+                       break;
                default:
                        pr_err("MMC%d configuration not supported!\n", c->mmc);
                        kfree(mmc);
index 078fdf11af030a966e117e7b0a0e80bffaf80206..8c42573f42eaef23fe2770b0a6a0b0de1bd0b1f0 100644 (file)
@@ -260,7 +260,7 @@ static int omap_hsmmc_1_set_power(struct device *dev, int slot, int power_on,
        return ret;
 }
 
-static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
+static int omap_hsmmc_235_set_power(struct device *dev, int slot, int power_on,
                                   int vdd)
 {
        struct omap_hsmmc_host *host =
@@ -316,6 +316,12 @@ static int omap_hsmmc_23_set_power(struct device *dev, int slot, int power_on,
        return ret;
 }
 
+static int omap_hsmmc_4_set_power(struct device *dev, int slot, int power_on,
+                                       int vdd)
+{
+       return 0;
+}
+
 static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
                                  int vdd, int cardsleep)
 {
@@ -326,7 +332,7 @@ static int omap_hsmmc_1_set_sleep(struct device *dev, int slot, int sleep,
        return regulator_set_mode(host->vcc, mode);
 }
 
-static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
+static int omap_hsmmc_235_set_sleep(struct device *dev, int slot, int sleep,
                                   int vdd, int cardsleep)
 {
        struct omap_hsmmc_host *host =
@@ -365,6 +371,12 @@ static int omap_hsmmc_23_set_sleep(struct device *dev, int slot, int sleep,
                return regulator_enable(host->vcc_aux);
 }
 
+static int omap_hsmmc_4_set_sleep(struct device *dev, int slot, int sleep,
+                                       int vdd, int cardsleep)
+{
+       return 0;
+}
+
 static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
 {
        struct regulator *reg;
@@ -379,10 +391,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host)
                break;
        case OMAP_MMC2_DEVID:
        case OMAP_MMC3_DEVID:
+       case OMAP_MMC5_DEVID:
                /* Off-chip level shifting, or none */
-               mmc_slot(host).set_power = omap_hsmmc_23_set_power;
-               mmc_slot(host).set_sleep = omap_hsmmc_23_set_sleep;
+               mmc_slot(host).set_power = omap_hsmmc_235_set_power;
+               mmc_slot(host).set_sleep = omap_hsmmc_235_set_sleep;
                break;
+       case OMAP_MMC4_DEVID:
+               mmc_slot(host).set_power = omap_hsmmc_4_set_power;
+               mmc_slot(host).set_sleep = omap_hsmmc_4_set_sleep;
        default:
                pr_err("MMC%d configuration not supported!\n", host->id);
                return -EINVAL;