diff options
author | Chao Xie <chao.xie@marvell.com> | 2014-10-31 10:13:44 +0800 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2014-11-12 16:33:48 -0800 |
commit | 3a2b2f84957d3c1e380640e23e438c40c730cfd1 (patch) | |
tree | eb11616d1fcde1adaaf96bf65a4eb4f99a5152bd /drivers/clk/mmp/clk.h | |
parent | 0c4c11f3556b244469af32a7bc13485ecbbc77f9 (diff) | |
download | talos-obmc-linux-3a2b2f84957d3c1e380640e23e438c40c730cfd1.tar.gz talos-obmc-linux-3a2b2f84957d3c1e380640e23e438c40c730cfd1.zip |
clk: mmp: move definiton of mmp_clk_frac to clk.h
Move the definition of structure of mmp_clk_frac to
clk.h.
So device tree support can use this structure.
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/mmp/clk.h')
-rw-r--r-- | drivers/clk/mmp/clk.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/drivers/clk/mmp/clk.h b/drivers/clk/mmp/clk.h index b71b717cdb24..d267639ece2b 100644 --- a/drivers/clk/mmp/clk.h +++ b/drivers/clk/mmp/clk.h @@ -7,12 +7,14 @@ #define APBC_NO_BUS_CTRL BIT(0) #define APBC_POWER_CTRL BIT(1) + +/* Clock type "factor" */ struct mmp_clk_factor_masks { - unsigned int factor; - unsigned int num_mask; - unsigned int den_mask; - unsigned int num_shift; - unsigned int den_shift; + unsigned int factor; + unsigned int num_mask; + unsigned int den_mask; + unsigned int num_shift; + unsigned int den_shift; }; struct mmp_clk_factor_tbl { @@ -20,6 +22,21 @@ struct mmp_clk_factor_tbl { unsigned int den; }; +struct mmp_clk_factor { + struct clk_hw hw; + void __iomem *base; + struct mmp_clk_factor_masks *masks; + struct mmp_clk_factor_tbl *ftbl; + unsigned int ftbl_cnt; + spinlock_t *lock; +}; + +extern struct clk *mmp_clk_register_factor(const char *name, + const char *parent_name, unsigned long flags, + void __iomem *base, struct mmp_clk_factor_masks *masks, + struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt, + spinlock_t *lock); + extern struct clk *mmp_clk_register_pll2(const char *name, const char *parent_name, unsigned long flags); extern struct clk *mmp_clk_register_apbc(const char *name, @@ -28,9 +45,4 @@ extern struct clk *mmp_clk_register_apbc(const char *name, extern struct clk *mmp_clk_register_apmu(const char *name, const char *parent_name, void __iomem *base, u32 enable_mask, spinlock_t *lock); -extern struct clk *mmp_clk_register_factor(const char *name, - const char *parent_name, unsigned long flags, - void __iomem *base, struct mmp_clk_factor_masks *masks, - struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt, - spinlock_t *lock); #endif |