2 * Copyright (c) 2013, 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_PLL_H__
15 #define __QCOM_CLK_PLL_H__
17 #include <linux/clk-provider.h>
18 #include "clk-regmap.h"
21 * struct pll_freq_tbl - PLL frequency table
25 * @ibits: internal values
36 * struct clk_pll - phase locked loop (PLL)
40 * @config_reg: config register
41 * @mode_reg: mode register
42 * @status_reg: status register
43 * @status_bit: ANDed with @status_reg to determine if PLL is enabled
44 * @freq_tbl: PLL frequency table
45 * @hw: handle between common and hardware-specific interfaces
58 const struct pll_freq_tbl
*freq_tbl
;
60 struct clk_regmap clkr
;
63 extern const struct clk_ops clk_pll_ops
;
64 extern const struct clk_ops clk_pll_vote_ops
;
66 #define to_clk_pll(_hw) container_of(to_clk_regmap(_hw), struct clk_pll, clkr)
83 void clk_pll_configure_sr(struct clk_pll
*pll
, struct regmap
*regmap
,
84 const struct pll_config
*config
, bool fsm_mode
);
85 void clk_pll_configure_sr_hpm_lp(struct clk_pll
*pll
, struct regmap
*regmap
,
86 const struct pll_config
*config
, bool fsm_mode
);