• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __MACH_COMMON_CLKDEV_H
2 #define __MACH_COMMON_CLKDEV_H
3 
4 #include <linux/clk.h>
5 
6 struct clk_ops {
7 	unsigned long (*get_rate)(struct clk *clk);
8 	unsigned long (*round_rate)(struct clk *clk, unsigned long rate);
9 	int (*set_rate)(struct clk *clk, unsigned long rate);
10 	int (*enable)(struct clk *clk);
11 	int (*disable)(struct clk *clk);
12 };
13 
14 struct clk {
15 	const char		*name;
16 	unsigned long           rate;
17 	spinlock_t 		lock;
18 	u32			flags;
19 	const struct clk_ops    *ops;
20 	const struct params 	*params;
21 	void __iomem            *reg;
22 	u32			mask;
23 	u32			shift;
24 };
25 
26 #endif
27 
28