diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-06-28 11:23:59 -0700 |
---|---|---|
committer | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-06-28 11:23:59 -0700 |
commit | c38a24542ba582af2d7852c0e6b61ac9f0313a72 (patch) | |
tree | 52b61966a24c541bd707efc45a9b4ffeb871a3cd | |
parent | f8c8b07abf2cd986e52b6a3cfa482a1c68f75409 (diff) |
i.MX6: Add fix pll4 set_rate callback
There is single method to set clock-rate for both audio and video pll-s
in i.MX6q clock system implementation. That's possible due to they have
similar set of registers with a different bases. But there is also one
common register: CCM_ANALOG_MISC2, which contains post-dividers.
In current implementation, independently of whether audio or video clock
is going to be set, the mask 0xc0000000 is applied to MISC2 register.
This means, that if the audio clock rate is changed, the video clock
post-dividers possibly will be corrupted.
This patch fixes the issue described above.
Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov at gmail.com>
See this post for background:
https://lists.yoctoproject.org/pipermail/meta-freescale/2013-June/003376.html
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
-rw-r--r-- | arch/arm/mach-mx6/clock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-mx6/clock.c b/arch/arm/mach-mx6/clock.c index 6cd46d8f9415..8b8c95395e92 100644 --- a/arch/arm/mach-mx6/clock.c +++ b/arch/arm/mach-mx6/clock.c @@ -1024,7 +1024,9 @@ static int _clk_audio_video_set_rate(struct clk *clk, unsigned long rate) __raw_writel(mfn, pllbase + PLL_NUM_DIV_OFFSET); __raw_writel(mfd, pllbase + PLL_DENOM_DIV_OFFSET); - if (rev >= IMX_CHIP_REVISION_1_1) { + if ((rev >= IMX_CHIP_REVISION_1_1) + && + (pllbase == PLL5_VIDEO_BASE_ADDR)) { reg = __raw_readl(ANA_MISC2_BASE_ADDR) & ~ANADIG_ANA_MISC2_CONTROL3_MASK; reg |= control3 << ANADIG_ANA_MISC2_CONTROL3_OFFSET; |