diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2012-01-12 16:26:45 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-01-26 16:38:47 -0800 |
commit | d82e5190da9057e31d6f0fe5771dfbe55ff9125f (patch) | |
tree | cc6f7137ff927f2ed9a1d2a71e0454652a6dc5e7 /arch | |
parent | ffa1e4ede453cf92cfcd9f96f9140c21aeb319f7 (diff) | |
download | blackbird-op-linux-d82e5190da9057e31d6f0fe5771dfbe55ff9125f.tar.gz blackbird-op-linux-d82e5190da9057e31d6f0fe5771dfbe55ff9125f.zip |
ARM: OMAP: fix MMC2 loopback clock handling
Currently MMC2 setup code can only enable loopback clock and
relies on reset value for boards that need to have it disabled.
This causes a problem with certain bootloaders that always enable
that clock, resulting with unwanted bootloader dependencies.
Fix this by making it disable the clock if board data says so.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 8658bd77763c..ad0adb5a1e0e 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -175,11 +175,12 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) { u32 reg; - if (mmc->slots[0].internal_clock) { - reg = omap_ctrl_readl(control_devconf1_offset); + reg = omap_ctrl_readl(control_devconf1_offset); + if (mmc->slots[0].internal_clock) reg |= OMAP2_MMCSDIO2ADPCLKISEL; - omap_ctrl_writel(reg, control_devconf1_offset); - } + else + reg &= ~OMAP2_MMCSDIO2ADPCLKISEL; + omap_ctrl_writel(reg, control_devconf1_offset); } static void hsmmc2_before_set_reg(struct device *dev, int slot, |