diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2013-07-04 17:57:17 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-16 13:11:25 +0800 |
commit | dfd871442e37d8563d2fe16fe65e6507fd3071fa (patch) | |
tree | 3e8f2f90399bfa786f638291d763ff3a30bd1d93 /arch/arm/mach-imx/clk.c | |
parent | a49e6c4b820488b79ada6da9ce609fa8611d3e00 (diff) | |
download | blackbird-obmc-linux-dfd871442e37d8563d2fe16fe65e6507fd3071fa.tar.gz blackbird-obmc-linux-dfd871442e37d8563d2fe16fe65e6507fd3071fa.zip |
ARM: imx6: change some clocks to fixup clocks
All the clocks controlled by the register 'CCM Serial Clock
Multiplexer Register 1' should be fixup clocks. This patch
changes those clocks from basic multiplexer or divider clocks
to fixup clocks.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/clk.c')
-rw-r--r-- | arch/arm/mach-imx/clk.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk.c b/arch/arm/mach-imx/clk.c index 55bc80a00666..edc35df7bed4 100644 --- a/arch/arm/mach-imx/clk.c +++ b/arch/arm/mach-imx/clk.c @@ -37,3 +37,29 @@ struct clk * __init imx_obtain_fixed_clock( clk = imx_clk_fixed(name, rate); return clk; } + +/* + * This fixups the register CCM_CSCMR1 write value. + * The write/read/divider values of the aclk_podf field + * of that register have the relationship described by + * the following table: + * + * write value read value divider + * 3b'000 3b'110 7 + * 3b'001 3b'111 8 + * 3b'010 3b'100 5 + * 3b'011 3b'101 6 + * 3b'100 3b'010 3 + * 3b'101 3b'011 4 + * 3b'110 3b'000 1 + * 3b'111 3b'001 2(default) + * + * That's why we do the xor operation below. + */ +#define CSCMR1_FIXUP 0x00600000 + +void imx_cscmr1_fixup(u32 *val) +{ + *val ^= CSCMR1_FIXUP; + return; +} |