]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
96900315 SM |
2 | #ifndef __MACH_COMMON_CLKDEV_H |
3 | #define __MACH_COMMON_CLKDEV_H | |
4 | ||
5 | #include <linux/clk.h> | |
6 | ||
7 | struct clk_ops { | |
8 | unsigned long (*get_rate)(struct clk *clk); | |
9 | unsigned long (*round_rate)(struct clk *clk, unsigned long rate); | |
10 | int (*set_rate)(struct clk *clk, unsigned long rate); | |
11 | int (*enable)(struct clk *clk); | |
12 | int (*disable)(struct clk *clk); | |
13 | }; | |
14 | ||
15 | struct clk { | |
16 | const char *name; | |
17 | unsigned long rate; | |
18 | spinlock_t lock; | |
19 | u32 flags; | |
20 | const struct clk_ops *ops; | |
21 | const struct params *params; | |
22 | void __iomem *reg; | |
23 | u32 mask; | |
24 | u32 shift; | |
25 | }; | |
26 | ||
27 | #endif | |
28 |