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

clk: qcom: gcc-msm8996: start getting rid of xo clk

The "xo" fixed_factor clock is a leftover/hack from a time when we
couldn't make rpmhcc the root of all clocks. It is going to be removed
once all users of this clock are converted to use clocks specified
through the DTS. Replace internal usage of the xo clock with the cxo
(RPM_SMD_BB_CLK1) parent, specifying xo_board as a fallback.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211228045415.20543-17-dmitry.baryshkov@linaro.org

authored by

Dmitry Baryshkov and committed by
Bjorn Andersson
fb470130 b3867679

+11 -11
+11 -11
drivers/clk/qcom/gcc-msm8996.c
··· 54 54 .enable_mask = BIT(0), 55 55 .hw.init = &(struct clk_init_data){ 56 56 .name = "gpll0_early", 57 - .parent_hws = (const struct clk_hw*[]){ 58 - &xo.hw, 57 + .parent_data = &(const struct clk_parent_data){ 58 + .fw_name = "cxo", .name = "xo_board", 59 59 }, 60 60 .num_parents = 1, 61 61 .ops = &clk_alpha_pll_ops, ··· 131 131 .enable_mask = BIT(4), 132 132 .hw.init = &(struct clk_init_data){ 133 133 .name = "gpll4_early", 134 - .parent_hws = (const struct clk_hw*[]){ 135 - &xo.hw, 134 + .parent_data = &(const struct clk_parent_data){ 135 + .fw_name = "cxo", .name = "xo_board", 136 136 }, 137 137 .num_parents = 1, 138 138 .ops = &clk_alpha_pll_ops, ··· 167 167 }; 168 168 169 169 static const struct clk_parent_data gcc_xo_gpll0[] = { 170 - { .hw = &xo.hw }, 170 + { .fw_name = "cxo", .name = "xo_board" }, 171 171 { .hw = &gpll0.clkr.hw } 172 172 }; 173 173 ··· 177 177 }; 178 178 179 179 static const struct clk_parent_data gcc_xo_sleep_clk[] = { 180 - { .hw = &xo.hw }, 180 + { .fw_name = "cxo", .name = "xo_board" }, 181 181 { .fw_name = "sleep_clk", .name = "sleep_clk" } 182 182 }; 183 183 ··· 188 188 }; 189 189 190 190 static const struct clk_parent_data gcc_xo_gpll0_gpll0_early_div[] = { 191 - { .hw = &xo.hw }, 191 + { .fw_name = "cxo", .name = "xo_board" }, 192 192 { .hw = &gpll0.clkr.hw }, 193 193 { .hw = &gpll0_early_div.hw } 194 194 }; ··· 200 200 }; 201 201 202 202 static const struct clk_parent_data gcc_xo_gpll0_gpll4[] = { 203 - { .hw = &xo.hw }, 203 + { .fw_name = "cxo", .name = "xo_board" }, 204 204 { .hw = &gpll0.clkr.hw }, 205 205 { .hw = &gpll4.clkr.hw } 206 206 }; ··· 212 212 }; 213 213 214 214 static const struct clk_parent_data gcc_xo_gpll0_aud_ref_clk[] = { 215 - { .hw = &xo.hw }, 215 + { .fw_name = "cxo", .name = "xo_board" }, 216 216 { .hw = &gpll0.clkr.hw }, 217 217 { .fw_name = "aud_ref_clk", .name = "aud_ref_clk" } 218 218 }; ··· 225 225 }; 226 226 227 227 static const struct clk_parent_data gcc_xo_gpll0_sleep_clk_gpll0_early_div[] = { 228 - { .hw = &xo.hw }, 228 + { .fw_name = "cxo", .name = "xo_board" }, 229 229 { .hw = &gpll0.clkr.hw }, 230 230 { .fw_name = "sleep_clk", .name = "sleep_clk" }, 231 231 { .hw = &gpll0_early_div.hw } ··· 239 239 }; 240 240 241 241 static const struct clk_parent_data gcc_xo_gpll0_gpll4_gpll0_early_div[] = { 242 - { .hw = &xo.hw }, 242 + { .fw_name = "cxo", .name = "xo_board" }, 243 243 { .hw = &gpll0.clkr.hw }, 244 244 { .hw = &gpll4.clkr.hw }, 245 245 { .hw = &gpll0_early_div.hw }