summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahesh Mahadevan <Mahesh.Mahadevan@freescale.com>2013-06-26 09:44:59 -0500
committerMahesh Mahadevan <Mahesh.Mahadevan@freescale.com>2013-07-05 12:08:54 -0500
commite27b532fd1a0409547e52bdc397c80eb9a8159b2 (patch)
treefebe61c8a74c32f67d27037833d32929c9eba471
parent56f4be1951c960c976fb820b0cdcb9bc751dba82 (diff)
downloadlinux-e27b532fd1a0409547e52bdc397c80eb9a8159b2.tar.gz
ENGR00269604 Fix the set clock-rate for audio & video
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@gmail.com> Signed-off-by: Mahesh Mahadevan <Mahesh.Mahadevan@freescale.com>
-rw-r--r--arch/arm/mach-mx6/clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-mx6/clock.c b/arch/arm/mach-mx6/clock.c
index ca08d55a5cdc..6269daaf6616 100644
--- a/arch/arm/mach-mx6/clock.c
+++ b/arch/arm/mach-mx6/clock.c
@@ -1024,7 +1024,8 @@ 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;