1 #ifndef __MACH_MMP_CLK_H
2 #define __MACH_MMP_CLK_H
4 #include <linux/clk-provider.h>
5 #include <linux/clkdev.h>
7 #define APBC_NO_BUS_CTRL BIT(0)
8 #define APBC_POWER_CTRL BIT(1)
10 struct clk_factor_masks
{
12 unsigned int num_mask
;
13 unsigned int den_mask
;
14 unsigned int num_shift
;
15 unsigned int den_shift
;
18 struct clk_factor_tbl
{
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
,
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
);