linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 3/3] ARM: imx6: Fix procedure to switch the parent of, LDB_DI_CLK
@ 2016-02-25 19:49 Akshay Bhat
  2016-02-26  8:48 ` Philipp Zabel
  0 siblings, 1 reply; 3+ messages in thread
From: Akshay Bhat @ 2016-02-25 19:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabio, Phillip,

Philipp Zabel <p.zabel <at> pengutronix.de> writes:

 >
 > From: Fabio Estevam <fabio.estevam <at> freescale.com>
 >

<snip>
 > +		sel[i][2] = sel[i][3] | 4;
 > +
 > +		pr_debug("ccm: switching ldb_di0_sel: %d->%d->%d->%d\n",
 > +			 sel[i][0], sel[i][1], sel[i][2], sel[i][3]);

Change ldb_di0_sel to ldb_di%d_sel

<snip>

 > +	if (sel[0][0] == sel[0][3] && sel[1][0] == sel[1][3])
 > +		return;
 > +
 > +	mmdc_ch1_disable(ccm_base);
 > +
 > +	for (i = 1; i < 4; i++) {
 > +		reg = readl_relaxed(ccm_base + CCM_CS2CDR);
 > +		reg &= ~((7 << CS2CDR_LDB_DI0_CLK_SEL_SHIFT) |
 > +			 (7 << CS2CDR_LDB_DI1_CLK_SEL_SHIFT));
 > +		reg |= ((sel[0][i] << CS2CDR_LDB_DI0_CLK_SEL_SHIFT) |
 > +			(sel[1][i] << CS2CDR_LDB_DI0_CLK_SEL_SHIFT));

Needs to be CS2CDR_LDB_DI1_CLK_SEL_SHIFT in the last line; otherwise the 
ldb_di1_clock is set to have incorrect source.

With the above change the patch works great for me. Without this patch 
we were having an issue on some boards where the LVDS would lockup 
sometimes when the clock source was being changed. This patch fixes our 
issue.

Thanks,
Akshay

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v3 0/3] i.MX6 LDB mux/divider glitch workaround
@ 2016-01-22 11:11 Philipp Zabel
  2016-01-22 11:11 ` [PATCH v3 3/3] ARM: imx6: Fix procedure to switch the parent of LDB_DI_CLK Philipp Zabel
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2016-01-22 11:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

The previous version was broken for i.MX6S/DL since
disable_anatop_clocks() would try to check the parent of clk_periph_pre,
but it was called before clk_periph_pre was registered.
disable_anatop_clocks() then went on and failed to not disable the
memory clock.

So it appears there is a yet unreleased ERR009219, which I have not yet
seen, that supposedly describes the LDB mux glitch issue, and a draft
engineering bulletin EB821 that describes the clock switching procedure.
Shawn, do you have access to these documents?

Especially the comment explaining init_ldb_clks() should be double checked
against the erratum once available, as that contains my interpretation of
the original patch comment.

regards
Philipp

Changes since v2:
 - Fix DL/S support. disable_anatop_clocks() checks whether pll2_pfd2_396m
   is the parent of clk_periph_pre to avoid disabling the memory clock.
   For this to work, disable_anatop_clocks() must be called only after
   clk_periph_pre is registered.
 - Replace magic numbers with #defines
 - Improve the comment describing init_ldb_di_clks()
 - Improve selection checking and error messages

Fabio Estevam (1):
  ARM: imx6: Fix procedure to switch the parent of LDB_DI_CLK

Philipp Zabel (2):
  ARM: imx6: Mask mmdc_ch1 handshake for periph2_sel and
    mmdc_ch1_axi_podf
  ARM: imx6: Make the LDB_DI0 and LDB_DI1 clocks read-only.

 drivers/clk/imx/clk-imx6q.c | 294 ++++++++++++++++++++++++++++++++++++++++++--
 drivers/clk/imx/clk.h       |   8 ++
 2 files changed, 292 insertions(+), 10 deletions(-)

-- 
2.7.0.rc3

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-26  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 19:49 [PATCH v3 3/3] ARM: imx6: Fix procedure to switch the parent of, LDB_DI_CLK Akshay Bhat
2016-02-26  8:48 ` Philipp Zabel
  -- strict thread matches above, loose matches on Subject: below --
2016-01-22 11:11 [PATCH v3 0/3] i.MX6 LDB mux/divider glitch workaround Philipp Zabel
2016-01-22 11:11 ` [PATCH v3 3/3] ARM: imx6: Fix procedure to switch the parent of LDB_DI_CLK Philipp Zabel

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).