diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2011-12-17 19:35:47 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-01-26 18:54:12 -0500 |
commit | ffa1e4ede453cf92cfcd9f96f9140c21aeb319f7 (patch) | |
tree | 137acb23e4ee97ea1c6b8f8882c3a66b46e7ce04 /arch/arm/mach-omap2/hsmmc.c | |
parent | 8ef5d844cc3a644ea6f7665932a4307e9fad01fa (diff) |
ARM: OMAP: fix erroneous mmc2 clock change on mmc3 setup
hsmmc23_before_set_reg() can set MMCSDIO2ADPCLKISEL bit, which
enables internal clock for MMC2. Currently this function is also called
by code handling MMC3, and if .internal_clock is set in platform data
(by default it currently is), it will set MMCSDIO2ADPCLKISEL for MMC2
instead of MMC3 (MMC3 doesn't have such bit so nothing actually needs to
be done). This breaks 2nd SD slot on pandora.
Fix this by changing hsmmc23_before_set_reg() to only handle MMC2.
Note that this removes .remux() call for MMC3, but no board currently
needs it and it's also not called for MMC4 and MMC5.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/hsmmc.c')
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index bd844af13af5..8658bd77763c 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -182,7 +182,7 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) | |||
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | static void hsmmc23_before_set_reg(struct device *dev, int slot, | 185 | static void hsmmc2_before_set_reg(struct device *dev, int slot, |
186 | int power_on, int vdd) | 186 | int power_on, int vdd) |
187 | { | 187 | { |
188 | struct omap_mmc_platform_data *mmc = dev->platform_data; | 188 | struct omap_mmc_platform_data *mmc = dev->platform_data; |
@@ -407,14 +407,13 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
407 | c->caps &= ~MMC_CAP_8_BIT_DATA; | 407 | c->caps &= ~MMC_CAP_8_BIT_DATA; |
408 | c->caps |= MMC_CAP_4_BIT_DATA; | 408 | c->caps |= MMC_CAP_4_BIT_DATA; |
409 | } | 409 | } |
410 | /* FALLTHROUGH */ | ||
411 | case 3: | ||
412 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | 410 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { |
413 | /* off-chip level shifting, or none */ | 411 | /* off-chip level shifting, or none */ |
414 | mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; | 412 | mmc->slots[0].before_set_reg = hsmmc2_before_set_reg; |
415 | mmc->slots[0].after_set_reg = NULL; | 413 | mmc->slots[0].after_set_reg = NULL; |
416 | } | 414 | } |
417 | break; | 415 | break; |
416 | case 3: | ||
418 | case 4: | 417 | case 4: |
419 | case 5: | 418 | case 5: |
420 | mmc->slots[0].before_set_reg = NULL; | 419 | mmc->slots[0].before_set_reg = NULL; |