diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2013-07-04 05:22:26 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-16 01:11:24 -0400 |
commit | cbe7fc8aaeefc71a75c2688602ba5bb570c0a265 (patch) | |
tree | fbe1e589b95e361002b0f481a4b013c4f30b2d39 /arch/arm/mach-imx/clk.h | |
parent | f025569322b899a723990774bbe7a625a7e7da2c (diff) |
ARM: imx: add common clock support for fixup div
One register may have several fields to control some clocks. It
is possible that the read/write values of some fields may map to
different real functional values, so writing to the other fields
in the same register may break a working clock tree. A real case
is the aclk_podf field in the register 'CCM Serial Clock Multiplexer
Register 1' of i.MX6Q/SDL SoC. This patch introduces a fixup hook
for divider clock which is called before writing a value to clock
registers to support this kind of divider 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.h')
-rw-r--r-- | arch/arm/mach-imx/clk.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index 0e4e8bb261b9..51eb38538cc4 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h | |||
@@ -49,6 +49,10 @@ struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, | |||
49 | u8 width, void __iomem *busy_reg, u8 busy_shift, | 49 | u8 width, void __iomem *busy_reg, u8 busy_shift, |
50 | const char **parent_names, int num_parents); | 50 | const char **parent_names, int num_parents); |
51 | 51 | ||
52 | struct clk *imx_clk_fixup_divider(const char *name, const char *parent, | ||
53 | void __iomem *reg, u8 shift, u8 width, | ||
54 | void (*fixup)(u32 *val)); | ||
55 | |||
52 | static inline struct clk *imx_clk_fixed(const char *name, int rate) | 56 | static inline struct clk *imx_clk_fixed(const char *name, int rate) |
53 | { | 57 | { |
54 | return clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate); | 58 | return clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate); |