diff options
Diffstat (limited to 'arch/arm/mach-omap2/mmc-twl4030.c')
-rw-r--r-- | arch/arm/mach-omap2/mmc-twl4030.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index c9c59a2db4e2..0c3c72d934bf 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c | |||
@@ -20,9 +20,9 @@ | |||
20 | #include <linux/regulator/consumer.h> | 20 | #include <linux/regulator/consumer.h> |
21 | 21 | ||
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <mach/control.h> | 23 | #include <plat/control.h> |
24 | #include <mach/mmc.h> | 24 | #include <plat/mmc.h> |
25 | #include <mach/board.h> | 25 | #include <plat/board.h> |
26 | 26 | ||
27 | #include "mmc-twl4030.h" | 27 | #include "mmc-twl4030.h" |
28 | 28 | ||
@@ -213,7 +213,7 @@ static int twl4030_mmc_get_context_loss(struct device *dev) | |||
213 | static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, | 213 | static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, |
214 | int vdd) | 214 | int vdd) |
215 | { | 215 | { |
216 | u32 reg; | 216 | u32 reg, prog_io; |
217 | int ret = 0; | 217 | int ret = 0; |
218 | struct twl_mmc_controller *c = &hsmmc[0]; | 218 | struct twl_mmc_controller *c = &hsmmc[0]; |
219 | struct omap_mmc_platform_data *mmc = dev->platform_data; | 219 | struct omap_mmc_platform_data *mmc = dev->platform_data; |
@@ -245,7 +245,14 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, | |||
245 | } | 245 | } |
246 | 246 | ||
247 | reg = omap_ctrl_readl(control_pbias_offset); | 247 | reg = omap_ctrl_readl(control_pbias_offset); |
248 | reg |= OMAP2_PBIASSPEEDCTRL0; | 248 | if (cpu_is_omap3630()) { |
249 | /* Set MMC I/O to 52Mhz */ | ||
250 | prog_io = omap_ctrl_readl(OMAP343X_CONTROL_PROG_IO1); | ||
251 | prog_io |= OMAP3630_PRG_SDMMC1_SPEEDCTRL; | ||
252 | omap_ctrl_writel(prog_io, OMAP343X_CONTROL_PROG_IO1); | ||
253 | } else { | ||
254 | reg |= OMAP2_PBIASSPEEDCTRL0; | ||
255 | } | ||
249 | reg &= ~OMAP2_PBIASLITEPWRDNZ0; | 256 | reg &= ~OMAP2_PBIASLITEPWRDNZ0; |
250 | omap_ctrl_writel(reg, control_pbias_offset); | 257 | omap_ctrl_writel(reg, control_pbias_offset); |
251 | 258 | ||
@@ -489,6 +496,12 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
489 | /* on-chip level shifting via PBIAS0/PBIAS1 */ | 496 | /* on-chip level shifting via PBIAS0/PBIAS1 */ |
490 | mmc->slots[0].set_power = twl_mmc1_set_power; | 497 | mmc->slots[0].set_power = twl_mmc1_set_power; |
491 | mmc->slots[0].set_sleep = twl_mmc1_set_sleep; | 498 | mmc->slots[0].set_sleep = twl_mmc1_set_sleep; |
499 | |||
500 | /* Omap3630 HSMMC1 supports only 4-bit */ | ||
501 | if (cpu_is_omap3630() && c->wires > 4) { | ||
502 | c->wires = 4; | ||
503 | mmc->slots[0].wires = c->wires; | ||
504 | } | ||
492 | break; | 505 | break; |
493 | case 2: | 506 | case 2: |
494 | if (c->ext_clock) | 507 | if (c->ext_clock) |