xref: /openbmc/linux/drivers/clk/qcom/clk-hfpll.h (revision 2f164822)
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 droop_val;
22 	u32 config_val;
23 	u32 user_val;
24 	u32 user_vco_mask;
25 	unsigned long low_vco_max_rate;
26 
27 	unsigned long min_rate;
28 	unsigned long max_rate;
29 };
30 
31 struct clk_hfpll {
32 	struct hfpll_data const *d;
33 	int init_done;
34 
35 	struct clk_regmap clkr;
36 	spinlock_t lock;
37 };
38 
39 #define to_clk_hfpll(_hw) \
40 	container_of(to_clk_regmap(_hw), struct clk_hfpll, clkr)
41 
42 extern const struct clk_ops clk_ops_hfpll;
43 
44 #endif
45