diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-04-11 08:34:23 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-05-12 15:19:27 -0400 |
commit | a45896bd3a4b7beb571fa704efa7c2782b791093 (patch) | |
tree | abbcf23625304e123839af8af6e5ba278d20797e /drivers/clk/spear/clk.h | |
parent | 270b9f421e66ee5d135c99ba1c2b883c7750ab6c (diff) |
SPEAr: clk: Add General Purpose Timer Synthesizer clock
All SPEAr SoC's contain GPT Synthesizers. Their Fout is derived from
following equations:
Fout= Fin/((2 ^ (N+1)) * (M+1))
This patch adds in support for this type of clock.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/spear/clk.h')
-rw-r--r-- | drivers/clk/spear/clk.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/clk/spear/clk.h b/drivers/clk/spear/clk.h index ac9030bbd6ce..3321c46a071c 100644 --- a/drivers/clk/spear/clk.h +++ b/drivers/clk/spear/clk.h | |||
@@ -68,6 +68,20 @@ struct clk_frac { | |||
68 | spinlock_t *lock; | 68 | spinlock_t *lock; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | /* GPT clk */ | ||
72 | struct gpt_rate_tbl { | ||
73 | u16 mscale; | ||
74 | u16 nscale; | ||
75 | }; | ||
76 | |||
77 | struct clk_gpt { | ||
78 | struct clk_hw hw; | ||
79 | void __iomem *reg; | ||
80 | struct gpt_rate_tbl *rtbl; | ||
81 | u8 rtbl_cnt; | ||
82 | spinlock_t *lock; | ||
83 | }; | ||
84 | |||
71 | /* VCO-PLL clk */ | 85 | /* VCO-PLL clk */ |
72 | struct pll_rate_tbl { | 86 | struct pll_rate_tbl { |
73 | u8 mode; | 87 | u8 mode; |
@@ -103,6 +117,9 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name, | |||
103 | struct clk *clk_register_frac(const char *name, const char *parent_name, | 117 | struct clk *clk_register_frac(const char *name, const char *parent_name, |
104 | unsigned long flags, void __iomem *reg, | 118 | unsigned long flags, void __iomem *reg, |
105 | struct frac_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock); | 119 | struct frac_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock); |
120 | struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned | ||
121 | long flags, void __iomem *reg, struct gpt_rate_tbl *rtbl, u8 | ||
122 | rtbl_cnt, spinlock_t *lock); | ||
106 | struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name, | 123 | struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name, |
107 | const char *vco_gate_name, const char *parent_name, | 124 | const char *vco_gate_name, const char *parent_name, |
108 | unsigned long flags, void __iomem *mode_reg, void __iomem | 125 | unsigned long flags, void __iomem *mode_reg, void __iomem |