aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorstanley.miao <stanley.miao@windriver.com>2010-05-13 08:39:31 -0400
committerTony Lindgren <tony@atomide.com>2010-05-20 14:17:51 -0400
commit03e7e170d6fdc5b6f75d1ab2cc1a6cb4f2b6b8c4 (patch)
tree43ec8348bdd5d8ad0f940c4b688b083b9c871e9f /arch/arm/mach-omap2
parented8303fc111e58530e22bd29b0d7e08dced75999 (diff)
omap: hsmmc: fix the hsmmc driver for am3517
AM3517 don't have the register OMAP343X_CONTROL_PBIAS_LITE and the regulators like "vmmc", so we set a noop "set_power" function for it. Signed-off-by: Stanley.Miao <stanley.miao@windriver.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/hsmmc.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 9ad229594b4..2d36f3afbd4 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
142static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
143 int vdd)
144{
145 return 0;
146}
147
142static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; 148static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata;
143 149
144void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) 150void __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);