Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: qcom: alpha-pll: add support for power off mode for lucid evo PLL

PLLs can be kept in standby (default configuration) or in off mode
when disabled during power collapse. Hence add support for pll
disable off mode for lucid evo PLL.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220908222850.3552050-3-dmitry.baryshkov@linaro.org

authored by

Dmitry Baryshkov and committed by
Bjorn Andersson
9d062edd a7edd291

+38 -3
+37 -3
drivers/clk/qcom/clk-alpha-pll.c
··· 2088 2088 return ret; 2089 2089 } 2090 2090 2091 - static void alpha_pll_lucid_evo_disable(struct clk_hw *hw) 2091 + static void _alpha_pll_lucid_evo_disable(struct clk_hw *hw, bool reset) 2092 2092 { 2093 2093 struct clk_alpha_pll *pll = to_clk_alpha_pll(hw); 2094 2094 struct regmap *regmap = pll->clkr.regmap; ··· 2117 2117 2118 2118 /* Place the PLL mode in STANDBY */ 2119 2119 regmap_write(regmap, PLL_OPMODE(pll), PLL_STANDBY); 2120 + 2121 + if (reset) 2122 + regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, 0); 2120 2123 } 2121 2124 2122 - static int alpha_pll_lucid_evo_prepare(struct clk_hw *hw) 2125 + static int _alpha_pll_lucid_evo_prepare(struct clk_hw *hw, bool reset) 2123 2126 { 2124 2127 struct clk_alpha_pll *pll = to_clk_alpha_pll(hw); 2125 2128 struct clk_hw *p; ··· 2142 2139 if (ret) 2143 2140 return ret; 2144 2141 2145 - alpha_pll_lucid_evo_disable(hw); 2142 + _alpha_pll_lucid_evo_disable(hw, reset); 2146 2143 2147 2144 return 0; 2145 + } 2146 + 2147 + static void alpha_pll_lucid_evo_disable(struct clk_hw *hw) 2148 + { 2149 + _alpha_pll_lucid_evo_disable(hw, false); 2150 + } 2151 + 2152 + static int alpha_pll_lucid_evo_prepare(struct clk_hw *hw) 2153 + { 2154 + return _alpha_pll_lucid_evo_prepare(hw, false); 2155 + } 2156 + 2157 + static void alpha_pll_reset_lucid_evo_disable(struct clk_hw *hw) 2158 + { 2159 + _alpha_pll_lucid_evo_disable(hw, true); 2160 + } 2161 + 2162 + static int alpha_pll_reset_lucid_evo_prepare(struct clk_hw *hw) 2163 + { 2164 + return _alpha_pll_lucid_evo_prepare(hw, true); 2148 2165 } 2149 2166 2150 2167 static unsigned long alpha_pll_lucid_evo_recalc_rate(struct clk_hw *hw, ··· 2213 2190 .set_rate = alpha_pll_lucid_5lpe_set_rate, 2214 2191 }; 2215 2192 EXPORT_SYMBOL_GPL(clk_alpha_pll_lucid_evo_ops); 2193 + 2194 + const struct clk_ops clk_alpha_pll_reset_lucid_evo_ops = { 2195 + .prepare = alpha_pll_reset_lucid_evo_prepare, 2196 + .enable = alpha_pll_lucid_evo_enable, 2197 + .disable = alpha_pll_reset_lucid_evo_disable, 2198 + .is_enabled = clk_trion_pll_is_enabled, 2199 + .recalc_rate = alpha_pll_lucid_evo_recalc_rate, 2200 + .round_rate = clk_alpha_pll_round_rate, 2201 + .set_rate = alpha_pll_lucid_5lpe_set_rate, 2202 + }; 2203 + EXPORT_SYMBOL_GPL(clk_alpha_pll_reset_lucid_evo_ops); 2216 2204 2217 2205 void clk_rivian_evo_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, 2218 2206 const struct alpha_pll_config *config)
+1
drivers/clk/qcom/clk-alpha-pll.h
··· 155 155 #define clk_alpha_pll_postdiv_zonda_ops clk_alpha_pll_postdiv_fabia_ops 156 156 157 157 extern const struct clk_ops clk_alpha_pll_lucid_evo_ops; 158 + extern const struct clk_ops clk_alpha_pll_reset_lucid_evo_ops; 158 159 extern const struct clk_ops clk_alpha_pll_fixed_lucid_evo_ops; 159 160 extern const struct clk_ops clk_alpha_pll_postdiv_lucid_evo_ops; 160 161