提交 ffa1e4ed 编写于 作者: G Grazvydas Ignotas 提交者: Tony Lindgren

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: NGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 8ef5d844
...@@ -182,7 +182,7 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) ...@@ -182,7 +182,7 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc)
} }
} }
static void hsmmc23_before_set_reg(struct device *dev, int slot, static void hsmmc2_before_set_reg(struct device *dev, int slot,
int power_on, int vdd) int power_on, int vdd)
{ {
struct omap_mmc_platform_data *mmc = dev->platform_data; 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,14 +407,13 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
c->caps &= ~MMC_CAP_8_BIT_DATA; c->caps &= ~MMC_CAP_8_BIT_DATA;
c->caps |= MMC_CAP_4_BIT_DATA; c->caps |= MMC_CAP_4_BIT_DATA;
} }
/* FALLTHROUGH */
case 3:
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
/* off-chip level shifting, or none */ /* off-chip level shifting, or none */
mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; mmc->slots[0].before_set_reg = hsmmc2_before_set_reg;
mmc->slots[0].after_set_reg = NULL; mmc->slots[0].after_set_reg = NULL;
} }
break; break;
case 3:
case 4: case 4:
case 5: case 5:
mmc->slots[0].before_set_reg = NULL; mmc->slots[0].before_set_reg = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册