Skip to content

Commit 3414f41

Browse files
lweiss-fairphoneandersson
authored andcommitted
clk: qcom: gcc-sm6350: Fix gpll6* & gpll7 parents
Both gpll6 and gpll7 are parented to CXO at 19.2 MHz and not to GPLL0 which runs at 600 MHz. Also gpll6_out_even should have the parent gpll6 and not gpll0. Adjust the parents of these clocks to make Linux report the correct rate and not absurd numbers like gpll7 at ~25 GHz or gpll6 at 24 GHz. Corrected rates are the following: gpll7 807999902 Hz gpll6 768000000 Hz gpll6_out_even 384000000 Hz gpll0 600000000 Hz gpll0_out_odd 200000000 Hz gpll0_out_even 300000000 Hz And because gpll6 is the parent of gcc_sdcc2_apps_clk_src (at 202 MHz) that clock also reports the correct rate now and avoids this warning: [ 5.984062] mmc0: Card appears overclocked; req 202000000 Hz, actual 6312499237 Hz Fixes: 131abae ("clk: qcom: Add SM6350 GCC driver") Signed-off-by: Luca Weiss <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 1613e60 commit 3414f41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/clk/qcom/gcc-sm6350.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ static struct clk_alpha_pll gpll6 = {
100100
.enable_mask = BIT(6),
101101
.hw.init = &(struct clk_init_data){
102102
.name = "gpll6",
103-
.parent_hws = (const struct clk_hw*[]){
104-
&gpll0.clkr.hw,
103+
.parent_data = &(const struct clk_parent_data){
104+
.fw_name = "bi_tcxo",
105105
},
106106
.num_parents = 1,
107107
.ops = &clk_alpha_pll_fixed_fabia_ops,
@@ -124,7 +124,7 @@ static struct clk_alpha_pll_postdiv gpll6_out_even = {
124124
.clkr.hw.init = &(struct clk_init_data){
125125
.name = "gpll6_out_even",
126126
.parent_hws = (const struct clk_hw*[]){
127-
&gpll0.clkr.hw,
127+
&gpll6.clkr.hw,
128128
},
129129
.num_parents = 1,
130130
.ops = &clk_alpha_pll_postdiv_fabia_ops,
@@ -139,8 +139,8 @@ static struct clk_alpha_pll gpll7 = {
139139
.enable_mask = BIT(7),
140140
.hw.init = &(struct clk_init_data){
141141
.name = "gpll7",
142-
.parent_hws = (const struct clk_hw*[]){
143-
&gpll0.clkr.hw,
142+
.parent_data = &(const struct clk_parent_data){
143+
.fw_name = "bi_tcxo",
144144
},
145145
.num_parents = 1,
146146
.ops = &clk_alpha_pll_fixed_fabia_ops,

0 commit comments

Comments
 (0)