public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: grinberg@compulab•co.il (Igor Grinberg)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: OMAP: fix MMC2 loopback clock handling
Date: Thu, 12 Jan 2012 17:22:41 +0200	[thread overview]
Message-ID: <4F0EFAC1.2080003@compulab.co.il> (raw)
In-Reply-To: <1326378405-27632-1-git-send-email-notasas@gmail.com>

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@gmail•com>

Acked-by: Igor Grinberg <grinberg@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.

  reply	other threads:[~2012-01-12 15:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 14:26 [PATCH] ARM: OMAP: fix MMC2 loopback clock handling Grazvydas Ignotas
2012-01-12 15:22 ` Igor Grinberg [this message]
2012-01-27  0:16   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F0EFAC1.2080003@compulab.co.il \
    --to=grinberg@compulab$(echo .)co.il \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox