Skip to content

Commit b311f5d

Browse files
Imran Shaikandersson
authored andcommitted
clk: qcom: gcc-qdu1000: Fix gcc_pcie_0_pipe_clk_src clock handling
Fix the gcc pcie pipe clock handling as per the clk_regmap_phy_mux_ops implementation to let the clock framework automatically park the clock at XO when the clock is switched off and restore the parent when the clock is switched on. Fixes: 1c9efb0 ("clk: qcom: Add QDU1000 and QRU1000 GCC support") Co-developed-by: Taniya Das <[email protected]> Signed-off-by: Taniya Das <[email protected]> Signed-off-by: Imran Shaik <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent df87324 commit b311f5d

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

drivers/clk/qcom/gcc-qdu1000.c

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
3-
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
3+
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
44
*/
55

66
#include <linux/clk-provider.h>
@@ -370,16 +370,6 @@ static const struct clk_parent_data gcc_parent_data_6[] = {
370370
{ .index = DT_TCXO_IDX },
371371
};
372372

373-
static const struct parent_map gcc_parent_map_7[] = {
374-
{ P_PCIE_0_PIPE_CLK, 0 },
375-
{ P_BI_TCXO, 2 },
376-
};
377-
378-
static const struct clk_parent_data gcc_parent_data_7[] = {
379-
{ .index = DT_PCIE_0_PIPE_CLK_IDX },
380-
{ .index = DT_TCXO_IDX },
381-
};
382-
383373
static const struct parent_map gcc_parent_map_8[] = {
384374
{ P_BI_TCXO, 0 },
385375
{ P_GCC_GPLL0_OUT_MAIN, 1 },
@@ -439,16 +429,15 @@ static struct clk_regmap_mux gcc_pcie_0_phy_aux_clk_src = {
439429
},
440430
};
441431

442-
static struct clk_regmap_mux gcc_pcie_0_pipe_clk_src = {
432+
static struct clk_regmap_phy_mux gcc_pcie_0_pipe_clk_src = {
443433
.reg = 0x9d064,
444-
.shift = 0,
445-
.width = 2,
446-
.parent_map = gcc_parent_map_7,
447434
.clkr = {
448435
.hw.init = &(const struct clk_init_data) {
449436
.name = "gcc_pcie_0_pipe_clk_src",
450-
.parent_data = gcc_parent_data_7,
451-
.num_parents = ARRAY_SIZE(gcc_parent_data_7),
437+
.parent_data = &(const struct clk_parent_data){
438+
.index = DT_PCIE_0_PIPE_CLK_IDX,
439+
},
440+
.num_parents = 1,
452441
.ops = &clk_regmap_phy_mux_ops,
453442
},
454443
},

0 commit comments

Comments
 (0)