2 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #ifndef __QCOM_CLK_ALPHA_PLL_H__
15 #define __QCOM_CLK_ALPHA_PLL_H__
17 #include <linux/clk-provider.h>
18 #include "clk-regmap.h"
21 unsigned long min_freq
;
22 unsigned long max_freq
;
27 * struct clk_alpha_pll - phase locked loop (PLL)
28 * @offset: base address of registers
29 * @vco_table: array of VCO settings
30 * @clkr: regmap clock handle
32 struct clk_alpha_pll
{
35 const struct pll_vco
*vco_table
;
37 #define SUPPORTS_OFFLINE_REQ BIT(0)
38 #define SUPPORTS_16BIT_ALPHA BIT(1)
39 #define SUPPORTS_FSM_MODE BIT(2)
42 struct clk_regmap clkr
;
46 * struct clk_alpha_pll_postdiv - phase locked loop (PLL) post-divider
47 * @offset: base address of registers
48 * @width: width of post-divider
49 * @clkr: regmap clock handle
51 struct clk_alpha_pll_postdiv
{
55 struct clk_regmap clkr
;
58 struct alpha_pll_config
{
62 u32 config_ctl_hi_val
;
66 u32 early_output_mask
;
75 extern const struct clk_ops clk_alpha_pll_ops
;
76 extern const struct clk_ops clk_alpha_pll_hwfsm_ops
;
77 extern const struct clk_ops clk_alpha_pll_postdiv_ops
;
79 void clk_alpha_pll_configure(struct clk_alpha_pll
*pll
, struct regmap
*regmap
,
80 const struct alpha_pll_config
*config
);