Skip to content

Commit

Permalink
clk: qcom: gcc-sm8450: use new clk_regmap_mux_safe_ops for PCIe pipe …
Browse files Browse the repository at this point in the history
…clocks

Use newly defined clk_regmap_mux_safe_ops for PCIe pipe clocks to let
the clock framework automatically park the clock when the clock is
switched off and restore the parent when the clock is switched on.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220323085010.1753493-3-dmitry.baryshkov@linaro.org
  • Loading branch information
Dmitry Baryshkov authored and Bjorn Andersson committed Apr 12, 2022
1 parent e9a4c7f commit fa5ad5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/clk/qcom/gcc-sm8450.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ static struct clk_regmap_mux gcc_pcie_0_pipe_clk_src = {
.reg = 0x7b060,
.shift = 0,
.width = 2,
.safe_src_parent = P_BI_TCXO,
.parent_map = gcc_parent_map_4,
.clkr = {
.hw.init = &(struct clk_init_data){
.name = "gcc_pcie_0_pipe_clk_src",
.parent_data = gcc_parent_data_4,
.num_parents = ARRAY_SIZE(gcc_parent_data_4),
.ops = &clk_regmap_mux_closest_ops,
.ops = &clk_regmap_mux_safe_ops,
},
},
};
Expand All @@ -273,13 +274,14 @@ static struct clk_regmap_mux gcc_pcie_1_pipe_clk_src = {
.reg = 0x9d064,
.shift = 0,
.width = 2,
.safe_src_parent = P_BI_TCXO,
.parent_map = gcc_parent_map_6,
.clkr = {
.hw.init = &(struct clk_init_data){
.name = "gcc_pcie_1_pipe_clk_src",
.parent_data = gcc_parent_data_6,
.num_parents = ARRAY_SIZE(gcc_parent_data_6),
.ops = &clk_regmap_mux_closest_ops,
.ops = &clk_regmap_mux_safe_ops,
},
},
};
Expand Down

0 comments on commit fa5ad5c

Please sign in to comment.