xref: /linux/drivers/clk/qcom/clk-hfpll.h (revision a06c3fad49a50d5d5eb078f93e70f4d3eca5d5a5)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef __QCOM_CLK_HFPLL_H__
4 #define __QCOM_CLK_HFPLL_H__
5 
6 #include <linux/clk-provider.h>
7 #include <linux/spinlock.h>
8 #include "clk-regmap.h"
9 
10 struct hfpll_data {
11 	u32 mode_reg;
12 	u32 l_reg;
13 	u32 m_reg;
14 	u32 n_reg;
15 	u32 user_reg;
16 	u32 droop_reg;
17 	u32 config_reg;
18 	u32 status_reg;
19 	u8  lock_bit;
20 
21 	u32 l_val;
22 	u32 droop_val;
23 	u32 config_val;
24 	u32 user_val;
25 	u32 user_vco_mask;
26 	unsigned long low_vco_max_rate;
27 
28 	unsigned long min_rate;
29 	unsigned long max_rate;
30 };
31 
32 struct clk_hfpll {
33 	struct hfpll_data const *d;
34 	int init_done;
35 
36 	struct clk_regmap clkr;
37 	spinlock_t lock;
38 };
39 
40 #define to_clk_hfpll(_hw) \
41 	container_of(to_clk_regmap(_hw), struct clk_hfpll, clkr)
42 
43 extern const struct clk_ops clk_ops_hfpll;
44 
45 #endif
46