1 #ifndef __MACH_MMP_CLK_H 2 #define __MACH_MMP_CLK_H 3 4 #include <linux/clk-provider.h> 5 #include <linux/clkdev.h> 6 7 #define APBC_NO_BUS_CTRL BIT(0) 8 #define APBC_POWER_CTRL BIT(1) 9 10 struct clk_factor_masks { 11 unsigned int factor; 12 unsigned int num_mask; 13 unsigned int den_mask; 14 unsigned int num_shift; 15 unsigned int den_shift; 16 }; 17 18 struct clk_factor_tbl { 19 unsigned int num; 20 unsigned int den; 21 }; 22 23 extern struct clk *mmp_clk_register_pll2(const char *name, 24 const char *parent_name, unsigned long flags); 25 extern struct clk *mmp_clk_register_apbc(const char *name, 26 const char *parent_name, void __iomem *base, 27 unsigned int delay, unsigned int apbc_flags, spinlock_t *lock); 28 extern struct clk *mmp_clk_register_apmu(const char *name, 29 const char *parent_name, void __iomem *base, u32 enable_mask, 30 spinlock_t *lock); 31 extern struct clk *mmp_clk_register_factor(const char *name, 32 const char *parent_name, unsigned long flags, 33 void __iomem *base, struct clk_factor_masks *masks, 34 struct clk_factor_tbl *ftbl, unsigned int ftbl_cnt); 35 #endif 36