1
2
3
4 #ifndef __QCOM_CLK_BRANCH_H__
5 #define __QCOM_CLK_BRANCH_H__
6
7 #include <linux/clk-provider.h>
8
9 #include "clk-regmap.h"
10
11
12
13
14
15
16
17
18
19
20
21
22
23 struct clk_branch {
24 u32 hwcg_reg;
25 u32 halt_reg;
26 u8 hwcg_bit;
27 u8 halt_bit;
28 u8 halt_check;
29 #define BRANCH_VOTED BIT(7)
30 #define BRANCH_HALT 0
31 #define BRANCH_HALT_VOTED (BRANCH_HALT | BRANCH_VOTED)
32 #define BRANCH_HALT_ENABLE 1
33 #define BRANCH_HALT_ENABLE_VOTED (BRANCH_HALT_ENABLE | BRANCH_VOTED)
34 #define BRANCH_HALT_DELAY 2
35 #define BRANCH_HALT_SKIP 3
36
37 struct clk_regmap clkr;
38 };
39
40 extern const struct clk_ops clk_branch_ops;
41 extern const struct clk_ops clk_branch2_ops;
42 extern const struct clk_ops clk_branch_simple_ops;
43 extern const struct clk_ops clk_branch2_aon_ops;
44
45 #define to_clk_branch(_hw) \
46 container_of(to_clk_regmap(_hw), struct clk_branch, clkr)
47
48 #endif