linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dirk.behme@gmail.com (Dirk Behme)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: imx6: Fix procedure to switch the parent of LDB_DI_CLK
Date: Wed, 04 Jun 2014 18:37:23 +0200	[thread overview]
Message-ID: <538F4B43.6070804@gmail.com> (raw)
In-Reply-To: <1397044538-12676-1-git-send-email-festevam@gmail.com>

On 09.04.2014 13:55, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Due to incorrect placement of the clock gate cell in the ldb_di[x]_clk tree,
> the glitchy parent mux of ldb_di[x]_clk can cause a glitch to enter the
> ldb_di_ipu_div divider. If the divider gets locked up, no ldb_di[x]_clk is
> generated, and the LVDS display will hang when the ipu_di_clk is sourced from
> ldb_di_clk.
>
> To fix the problem, both the new and current parent of the ldb_di_clk should
> be disabled before the switch. This patch ensures that correct steps are
> followed when ldb_di_clk parent is switched in the beginning of boot.
>
> Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>   arch/arm/mach-imx/clk-imx6q.c | 125 ++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 121 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
> index 20ad0d1..3ee45f4 100644
> --- a/arch/arm/mach-imx/clk-imx6q.c
> +++ b/arch/arm/mach-imx/clk-imx6q.c
....
> +static void disable_anatop_clocks(void __iomem *anatop_base)
> +{
> +	unsigned int reg;
> +
> +	/* Make sure PFDs are disabled at boot. */
> +	reg = readl_relaxed(anatop_base + 0x100);
> +	/* Cannot disable pll2_pfd2_396M, as it is the MMDC clock in iMX6DL */
> +	if (cpu_is_imx6dl())
> +		reg |= 0x80008080;
> +	else
> +		reg |= 0x80808080;

There are two issues with this code section:

1) You want to know here if pll2_pfd2_396M is used as MMDC clock. This 
is independent of IMX6DL. Even a Quad/Dual could use pll2_pfd2_396M as 
MMDC clock. You better should check what you are really looking for:

if (MMDC clock == pll2_pfd2_396M)
...

2) Why is bit 31, i.e. the uppermost '8' in 0x80808080, set here? It 
looks like the TRM marks bit 31 - 24 as reserved?

Best regards

Dirk

  parent reply	other threads:[~2014-06-04 16:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 11:55 [PATCH] ARM: imx6: Fix procedure to switch the parent of LDB_DI_CLK Fabio Estevam
2014-04-09 13:34 ` Shawn Guo
2014-04-09 14:20   ` Fabio Estevam
2014-04-09 14:59     ` Shawn Guo
2014-04-09 15:28       ` Fabio Estevam
2014-04-10  1:21         ` Shawn Guo
2014-04-10  1:55           ` Fabio Estevam
2014-04-10  2:44             ` Shawn Guo
2014-04-09 13:35 ` Christian Gmeiner
2014-05-19  7:22 ` Dirk Behme
2014-05-19 17:07   ` Ranjani.Vaidyanathan at freescale.com
2014-05-19  9:25 ` Lothar Waßmann
2014-06-04 16:37 ` Dirk Behme [this message]
2014-06-04 17:29   ` Ranjani.Vaidyanathan at freescale.com
2014-06-04 17:49     ` Dirk Behme
2014-06-05 16:26       ` Ranjani.Vaidyanathan at freescale.com
2014-06-05 15:56     ` Dirk Behme

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=538F4B43.6070804@gmail.com \
    --to=dirk.behme@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).