* [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs
@ 2024-08-23 12:58 Bryan O'Donoghue
2024-08-26 13:44 ` Konrad Dybcio
2024-08-27 18:02 ` Stephen Boyd
0 siblings, 2 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2024-08-23 12:58 UTC (permalink / raw)
To: Bjorn Andersson, Michael Turquette, Stephen Boyd, Rajendra Nayak,
Sibi Sankar, Abel Vesa, Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, Neil Armstrong,
Bryan O'Donoghue
Per Stephen Boyd's explanation in the link below, QUP RCG clocks do not
need to be parked when switching frequency. A side-effect in parking to a
lower frequency can be a momentary invalid clock driven on an in-use serial
peripheral.
This can cause "junk" to spewed out of a UART as a low-impact example. On
the x1e80100-crd this serial port junk can be observed on linux-next.
Apply a similar fix to the x1e80100 Global Clock controller to remediate.
Link: https://lore.kernel.org/all/20240819233628.2074654-3-swboyd@chromium.org/
Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable")
Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
I ran into some junk on the x1e80100 serial port and asked around to see if
someone had already found and fixed.
Neil pointed me at Stephen's fix for sm8550 which I found is also required
to fix the same thing x1e80100.
---
drivers/clk/qcom/gcc-x1e80100.c | 48 ++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
index 6ffb3ddcae086..f17f8a1fcf414 100644
--- a/drivers/clk/qcom/gcc-x1e80100.c
+++ b/drivers/clk/qcom/gcc-x1e80100.c
@@ -670,7 +670,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s0_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s0_clk_src = {
@@ -687,7 +687,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s1_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s1_clk_src = {
@@ -719,7 +719,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s2_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s2_clk_src = {
@@ -736,7 +736,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s3_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s3_clk_src = {
@@ -768,7 +768,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s4_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s4_clk_src = {
@@ -785,7 +785,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s5_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s5_clk_src = {
@@ -802,7 +802,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s6_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s6_clk_src = {
@@ -819,7 +819,7 @@ static struct clk_init_data gcc_qupv3_wrap0_s7_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap0_s7_clk_src = {
@@ -836,7 +836,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s0_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s0_clk_src = {
@@ -853,7 +853,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s1_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s1_clk_src = {
@@ -870,7 +870,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s2_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s2_clk_src = {
@@ -887,7 +887,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s3_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s3_clk_src = {
@@ -904,7 +904,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s4_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s4_clk_src = {
@@ -921,7 +921,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s5_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s5_clk_src = {
@@ -938,7 +938,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s6_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s6_clk_src = {
@@ -955,7 +955,7 @@ static struct clk_init_data gcc_qupv3_wrap1_s7_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap1_s7_clk_src = {
@@ -972,7 +972,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s0_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s0_clk_src = {
@@ -989,7 +989,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s1_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s1_clk_src = {
@@ -1006,7 +1006,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s2_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s2_clk_src = {
@@ -1023,7 +1023,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s3_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s3_clk_src = {
@@ -1040,7 +1040,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s4_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s4_clk_src = {
@@ -1057,7 +1057,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s5_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s5_clk_src = {
@@ -1074,7 +1074,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s6_clk_src_init = {
.parent_data = gcc_parent_data_8,
.num_parents = ARRAY_SIZE(gcc_parent_data_8),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s6_clk_src = {
@@ -1091,7 +1091,7 @@ static struct clk_init_data gcc_qupv3_wrap2_s7_clk_src_init = {
.parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_ops,
};
static struct clk_rcg2 gcc_qupv3_wrap2_s7_clk_src = {
---
base-commit: 826d8eb42d2a7192c2c8e2103a4d07fb6006f409
change-id: 20240823-x1e80100-clk-fix-62712d890290
Best regards,
--
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs
2024-08-23 12:58 [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs Bryan O'Donoghue
@ 2024-08-26 13:44 ` Konrad Dybcio
2024-08-27 13:13 ` Bryan O'Donoghue
2024-08-27 18:02 ` Stephen Boyd
1 sibling, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2024-08-26 13:44 UTC (permalink / raw)
To: Bryan O'Donoghue, Bjorn Andersson, Michael Turquette,
Stephen Boyd, Rajendra Nayak, Sibi Sankar, Abel Vesa,
Konrad Dybcio
Cc: linux-arm-msm, linux-clk, linux-kernel, Neil Armstrong
On 23.08.2024 2:58 PM, Bryan O'Donoghue wrote:
> Per Stephen Boyd's explanation in the link below, QUP RCG clocks do not
> need to be parked when switching frequency. A side-effect in parking to a
> lower frequency can be a momentary invalid clock driven on an in-use serial
> peripheral.
>
> This can cause "junk" to spewed out of a UART as a low-impact example. On
> the x1e80100-crd this serial port junk can be observed on linux-next.
>
> Apply a similar fix to the x1e80100 Global Clock controller to remediate.
>
> Link: https://lore.kernel.org/all/20240819233628.2074654-3-swboyd@chromium.org/
> Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
> Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable")
> Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> I ran into some junk on the x1e80100 serial port and asked around to see if
> someone had already found and fixed.
>
> Neil pointed me at Stephen's fix for sm8550 which I found is also required
> to fix the same thing x1e80100.
> ---
Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>
Mind also fixing up 8650 that seems to have this issue?
Konrad
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs
2024-08-26 13:44 ` Konrad Dybcio
@ 2024-08-27 13:13 ` Bryan O'Donoghue
0 siblings, 0 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2024-08-27 13:13 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Michael Turquette, Stephen Boyd,
Rajendra Nayak, Sibi Sankar, Abel Vesa
Cc: linux-arm-msm, linux-clk, linux-kernel, Neil Armstrong
On 26/08/2024 14:44, Konrad Dybcio wrote:
> On 23.08.2024 2:58 PM, Bryan O'Donoghue wrote:
>> Per Stephen Boyd's explanation in the link below, QUP RCG clocks do not
>> need to be parked when switching frequency. A side-effect in parking to a
>> lower frequency can be a momentary invalid clock driven on an in-use serial
>> peripheral.
>>
>> This can cause "junk" to spewed out of a UART as a low-impact example. On
>> the x1e80100-crd this serial port junk can be observed on linux-next.
>>
>> Apply a similar fix to the x1e80100 Global Clock controller to remediate.
>>
>> Link: https://lore.kernel.org/all/20240819233628.2074654-3-swboyd@chromium.org/
>> Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
>> Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable")
>> Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>> I ran into some junk on the x1e80100 serial port and asked around to see if
>> someone had already found and fixed.
>>
>> Neil pointed me at Stephen's fix for sm8550 which I found is also required
>> to fix the same thing x1e80100.
>> ---
>
> Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>
>
> Mind also fixing up 8650 that seems to have this issue?
>
> Konrad
np
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs
2024-08-23 12:58 [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs Bryan O'Donoghue
2024-08-26 13:44 ` Konrad Dybcio
@ 2024-08-27 18:02 ` Stephen Boyd
2024-08-27 18:16 ` Stephen Boyd
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2024-08-27 18:02 UTC (permalink / raw)
To: Abel Vesa, Bjorn Andersson, Bryan O'Donoghue, Konrad Dybcio,
Michael Turquette, Rajendra Nayak, Sibi Sankar
Cc: linux-arm-msm, linux-clk, linux-kernel, Neil Armstrong,
Bryan O'Donoghue
Quoting Bryan O'Donoghue (2024-08-23 05:58:56)
> Per Stephen Boyd's explanation in the link below, QUP RCG clocks do not
> need to be parked when switching frequency. A side-effect in parking to a
> lower frequency can be a momentary invalid clock driven on an in-use serial
> peripheral.
>
> This can cause "junk" to spewed out of a UART as a low-impact example. On
> the x1e80100-crd this serial port junk can be observed on linux-next.
>
> Apply a similar fix to the x1e80100 Global Clock controller to remediate.
>
> Link: https://lore.kernel.org/all/20240819233628.2074654-3-swboyd@chromium.org/
> Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
> Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable")
> Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Applied to clk-fixes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs
2024-08-27 18:02 ` Stephen Boyd
@ 2024-08-27 18:16 ` Stephen Boyd
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2024-08-27 18:16 UTC (permalink / raw)
To: Abel Vesa, Bjorn Andersson, Bryan O'Donoghue, Konrad Dybcio,
Michael Turquette, Rajendra Nayak, Sibi Sankar
Cc: linux-arm-msm, linux-clk, linux-kernel, Neil Armstrong,
Bryan O'Donoghue
Quoting Stephen Boyd (2024-08-27 11:02:48)
> Quoting Bryan O'Donoghue (2024-08-23 05:58:56)
> > Per Stephen Boyd's explanation in the link below, QUP RCG clocks do not
> > need to be parked when switching frequency. A side-effect in parking to a
> > lower frequency can be a momentary invalid clock driven on an in-use serial
> > peripheral.
> >
> > This can cause "junk" to spewed out of a UART as a low-impact example. On
> > the x1e80100-crd this serial port junk can be observed on linux-next.
> >
> > Apply a similar fix to the x1e80100 Global Clock controller to remediate.
> >
> > Link: https://lore.kernel.org/all/20240819233628.2074654-3-swboyd@chromium.org/
> > Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
> > Fixes: 929c75d57566 ("clk: qcom: gcc-sm8550: Mark RCGs shared where applicable")
> > Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > ---
>
> Applied to clk-fixes
>
Unapplied :( See this email[1] for more info. I'm thinking that this can
be applied to clk-next instead, by qcom maintainers.
[1] https://lore.kernel.org/all/CAE-0n52rYVs81jtnFHyfc+K4wECvyCKmnHu2w9JhPNqvMYEeOA@mail.gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-27 18:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 12:58 [PATCH] clk: qcom: gcc-x1e80100: Don't use parking clk_ops for QUPs Bryan O'Donoghue
2024-08-26 13:44 ` Konrad Dybcio
2024-08-27 13:13 ` Bryan O'Donoghue
2024-08-27 18:02 ` Stephen Boyd
2024-08-27 18:16 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox