[PATCH] ARM: OMAP: fix MMC2 loopback clock handling
Igor Grinberg
grinberg at compulab.co.il
Thu Jan 12 10:22:41 EST 2012
On 01/12/12 16:26, Grazvydas Ignotas wrote:
> 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 at gmail.com>
Acked-by: Igor Grinberg <grinberg at compulab.co.il>
> ---
> depends on "ARM: OMAP: fix erroneous mmc2 clock change on mmc3 setup"
> http://marc.info/?l=linux-omap&m=132416866125291&w=2
>
> 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 8658bd7..ad0adb5 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,
--
Regards,
Igor.
More information about the linux-arm-kernel
mailing list