aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/hsmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r--arch/arm/mach-omap2/hsmmc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index c8f647b6205e..87ce6ffccefc 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -258,7 +258,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
258 "mmc%islot%i", c->mmc, 1); 258 "mmc%islot%i", c->mmc, 1);
259 mmc->slots[0].name = hc->name; 259 mmc->slots[0].name = hc->name;
260 mmc->nr_slots = 1; 260 mmc->nr_slots = 1;
261 mmc->slots[0].wires = c->wires; 261 mmc->slots[0].caps = c->caps;
262 mmc->slots[0].internal_clock = !c->ext_clock; 262 mmc->slots[0].internal_clock = !c->ext_clock;
263 mmc->dma_mask = 0xffffffff; 263 mmc->dma_mask = 0xffffffff;
264 264
@@ -316,16 +316,20 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
316 } 316 }
317 317
318 /* Omap3630 HSMMC1 supports only 4-bit */ 318 /* Omap3630 HSMMC1 supports only 4-bit */
319 if (cpu_is_omap3630() && c->wires > 4) { 319 if (cpu_is_omap3630() &&
320 c->wires = 4; 320 (c->caps & MMC_CAP_8_BIT_DATA)) {
321 mmc->slots[0].wires = c->wires; 321 c->caps &= ~MMC_CAP_8_BIT_DATA;
322 c->caps |= MMC_CAP_4_BIT_DATA;
323 mmc->slots[0].caps = c->caps;
322 } 324 }
323 break; 325 break;
324 case 2: 326 case 2:
325 if (c->ext_clock) 327 if (c->ext_clock)
326 c->transceiver = 1; 328 c->transceiver = 1;
327 if (c->transceiver && c->wires > 4) 329 if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) {
328 c->wires = 4; 330 c->caps &= ~MMC_CAP_8_BIT_DATA;
331 c->caps |= MMC_CAP_4_BIT_DATA;
332 }
329 /* FALLTHROUGH */ 333 /* FALLTHROUGH */
330 case 3: 334 case 3:
331 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { 335 if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {