diff options
| -rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 27 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/mmc.h | 4 |
2 files changed, 25 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 9ad229594b46..2d36f3afbd4e 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
| @@ -139,6 +139,12 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot, | |||
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | ||
| 143 | int vdd) | ||
| 144 | { | ||
| 145 | return 0; | ||
| 146 | } | ||
| 147 | |||
| 142 | static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; | 148 | static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; |
| 143 | 149 | ||
| 144 | void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | 150 | void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) |
| @@ -216,11 +222,18 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
| 216 | */ | 222 | */ |
| 217 | mmc->slots[0].ocr_mask = c->ocr_mask; | 223 | mmc->slots[0].ocr_mask = c->ocr_mask; |
| 218 | 224 | ||
| 225 | if (cpu_is_omap3517() || cpu_is_omap3505()) | ||
| 226 | mmc->slots[0].set_power = nop_mmc_set_power; | ||
| 227 | else | ||
| 228 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; | ||
| 229 | |||
| 219 | switch (c->mmc) { | 230 | switch (c->mmc) { |
| 220 | case 1: | 231 | case 1: |
| 221 | /* on-chip level shifting via PBIAS0/PBIAS1 */ | 232 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { |
| 222 | mmc->slots[0].before_set_reg = hsmmc1_before_set_reg; | 233 | /* on-chip level shifting via PBIAS0/PBIAS1 */ |
| 223 | mmc->slots[0].after_set_reg = hsmmc1_after_set_reg; | 234 | mmc->slots[0].before_set_reg = hsmmc1_before_set_reg; |
| 235 | mmc->slots[0].after_set_reg = hsmmc1_after_set_reg; | ||
| 236 | } | ||
| 224 | 237 | ||
| 225 | /* Omap3630 HSMMC1 supports only 4-bit */ | 238 | /* Omap3630 HSMMC1 supports only 4-bit */ |
| 226 | if (cpu_is_omap3630() && c->wires > 4) { | 239 | if (cpu_is_omap3630() && c->wires > 4) { |
| @@ -235,9 +248,11 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
| 235 | c->wires = 4; | 248 | c->wires = 4; |
| 236 | /* FALLTHROUGH */ | 249 | /* FALLTHROUGH */ |
| 237 | case 3: | 250 | case 3: |
| 238 | /* off-chip level shifting, or none */ | 251 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { |
| 239 | mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; | 252 | /* off-chip level shifting, or none */ |
| 240 | mmc->slots[0].after_set_reg = NULL; | 253 | mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; |
| 254 | mmc->slots[0].after_set_reg = NULL; | ||
| 255 | } | ||
| 241 | break; | 256 | break; |
| 242 | default: | 257 | default: |
| 243 | pr_err("MMC%d configuration not supported!\n", c->mmc); | 258 | pr_err("MMC%d configuration not supported!\n", c->mmc); |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index a1bac07c89eb..c835f1e994c6 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
| @@ -102,6 +102,10 @@ struct omap_mmc_platform_data { | |||
| 102 | /* Regulator off remapped to sleep */ | 102 | /* Regulator off remapped to sleep */ |
| 103 | unsigned vcc_aux_disable_is_sleep:1; | 103 | unsigned vcc_aux_disable_is_sleep:1; |
| 104 | 104 | ||
| 105 | /* we can put the features above into this variable */ | ||
| 106 | #define HSMMC_HAS_PBIAS (1 << 0) | ||
| 107 | unsigned features; | ||
| 108 | |||
| 105 | int switch_pin; /* gpio (card detect) */ | 109 | int switch_pin; /* gpio (card detect) */ |
| 106 | int gpio_wp; /* gpio (write protect) */ | 110 | int gpio_wp; /* gpio (write protect) */ |
| 107 | 111 | ||
