blob: 645ff460a1f24bd003ee76f68953222e12d7c3ac [file] [log] [blame]
Steven Miao96900312012-05-16 17:49:52 +08001#ifndef __MACH_COMMON_CLKDEV_H
2#define __MACH_COMMON_CLKDEV_H
3
4#include <linux/clk.h>
5
6struct 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
14struct 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