Loading drivers/clk/qcom/clk-alpha-pll.c +13 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015, 2018-2019, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading Loading @@ -1499,6 +1499,16 @@ static int lucid_pll_is_enabled(struct clk_alpha_pll *pll, (mode_regval & PLL_OUTCTRL)); } static void clk_alpha_pll_custom_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config) { int i; for (i = 0; i < config->num_custom_reg; i++) regmap_write(regmap, pll->offset + config->custom_reg_offset[i], config->custom_reg_val[i]); } void clk_lucid_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config) { Loading Loading @@ -1548,6 +1558,8 @@ void clk_lucid_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, regmap_write(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val); clk_alpha_pll_custom_configure(pll, regmap, config); regmap_update_bits(regmap, PLL_MODE(pll), PLL_UPDATE_BYPASS, PLL_UPDATE_BYPASS); Loading drivers/clk/qcom/clk-alpha-pll.h +4 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved. */ /* Copyright (c) 2015, 2018-2019, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_ALPHA_PLL_H__ #define __QCOM_CLK_ALPHA_PLL_H__ Loading Loading @@ -114,6 +114,9 @@ struct alpha_pll_config { u32 post_div_mask; u32 vco_val; u32 vco_mask; const u32 *custom_reg_offset; const u32 *custom_reg_val; size_t num_custom_reg; }; extern const struct clk_ops clk_alpha_pll_ops; Loading Loading
drivers/clk/qcom/clk-alpha-pll.c +13 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015, 2018-2019, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading Loading @@ -1499,6 +1499,16 @@ static int lucid_pll_is_enabled(struct clk_alpha_pll *pll, (mode_regval & PLL_OUTCTRL)); } static void clk_alpha_pll_custom_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config) { int i; for (i = 0; i < config->num_custom_reg; i++) regmap_write(regmap, pll->offset + config->custom_reg_offset[i], config->custom_reg_val[i]); } void clk_lucid_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config) { Loading Loading @@ -1548,6 +1558,8 @@ void clk_lucid_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, regmap_write(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val); clk_alpha_pll_custom_configure(pll, regmap, config); regmap_update_bits(regmap, PLL_MODE(pll), PLL_UPDATE_BYPASS, PLL_UPDATE_BYPASS); Loading
drivers/clk/qcom/clk-alpha-pll.h +4 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved. */ /* Copyright (c) 2015, 2018-2019, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_ALPHA_PLL_H__ #define __QCOM_CLK_ALPHA_PLL_H__ Loading Loading @@ -114,6 +114,9 @@ struct alpha_pll_config { u32 post_div_mask; u32 vco_val; u32 vco_mask; const u32 *custom_reg_offset; const u32 *custom_reg_val; size_t num_custom_reg; }; extern const struct clk_ops clk_alpha_pll_ops; Loading