* [PATCH V2] clk: qcom: ipq5332: mark GPLL4 as critical temporarily
@ 2023-02-06 7:31 Kathiravan T
2023-02-10 22:14 ` Stephen Boyd
0 siblings, 1 reply; 3+ messages in thread
From: Kathiravan T @ 2023-02-06 7:31 UTC (permalink / raw)
To: andersson, agross, konrad.dybcio, mturquette, sboyd,
linux-arm-msm, linux-clk, linux-kernel
Cc: quic_varada, quic_srichara, Kathiravan T
Clock framework disables the GPLL4 source since there are no active users
for this source currently. Some of the clocks initialized by the
bootloaders uses the GPLL4 as the source. Due to this, when the GPLL4 is
disabled by the clock framework, system is going for the reboot.
To avoid this, mark the GPLL4 as CRITICAL so that clock framework
doesn't disable it. Once the users of this source is enabled, we can get
rid of this flag.
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
---
Changes in V2:
- Added a comment in driver explaining the need of the flag
drivers/clk/qcom/gcc-ipq5332.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c
index c8a5fa1bafca..2e043d2d0598 100644
--- a/drivers/clk/qcom/gcc-ipq5332.c
+++ b/drivers/clk/qcom/gcc-ipq5332.c
@@ -127,6 +127,16 @@ static struct clk_alpha_pll gpll4_main = {
.parent_data = &gcc_parent_data_xo,
.num_parents = 1,
.ops = &clk_alpha_pll_stromer_ops,
+ /*
+ * There are no consumers for this GPLL in kernel yet,
+ * (will be added soon), so the clock framework
+ * disables this source. But some of the clocks
+ * initialized by boot loaders uses this source. So we
+ * need to keep this clock ON. Add the CRITICAL flag
+ * so the clock will not be disabled. Once the consumer
+ * in kernel is added, we can get rid off this flag.
+ */
+ .flags = CLK_IS_CRITICAL,
},
},
};
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] clk: qcom: ipq5332: mark GPLL4 as critical temporarily
2023-02-06 7:31 [PATCH V2] clk: qcom: ipq5332: mark GPLL4 as critical temporarily Kathiravan T
@ 2023-02-10 22:14 ` Stephen Boyd
2023-02-14 16:19 ` Kathiravan T
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2023-02-10 22:14 UTC (permalink / raw)
To: Kathiravan T, agross, andersson, konrad.dybcio, linux-arm-msm,
linux-clk, linux-kernel, mturquette
Cc: quic_varada, quic_srichara, Kathiravan T
Quoting Kathiravan T (2023-02-05 23:31:01)
> diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c
> index c8a5fa1bafca..2e043d2d0598 100644
> --- a/drivers/clk/qcom/gcc-ipq5332.c
> +++ b/drivers/clk/qcom/gcc-ipq5332.c
> @@ -127,6 +127,16 @@ static struct clk_alpha_pll gpll4_main = {
> .parent_data = &gcc_parent_data_xo,
> .num_parents = 1,
> .ops = &clk_alpha_pll_stromer_ops,
> + /*
> + * There are no consumers for this GPLL in kernel yet,
> + * (will be added soon), so the clock framework
> + * disables this source. But some of the clocks
> + * initialized by boot loaders uses this source. So we
> + * need to keep this clock ON. Add the CRITICAL flag
> + * so the clock will not be disabled. Once the consumer
> + * in kernel is added, we can get rid off this flag.
s/off/of/
Does CLK_IGNORE_UNUSED work the same? It doesn't sound like a critical
clk from the description of the comment.
> + */
> + .flags = CLK_IS_CRITICAL,
> },
> },
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] clk: qcom: ipq5332: mark GPLL4 as critical temporarily
2023-02-10 22:14 ` Stephen Boyd
@ 2023-02-14 16:19 ` Kathiravan T
0 siblings, 0 replies; 3+ messages in thread
From: Kathiravan T @ 2023-02-14 16:19 UTC (permalink / raw)
To: Stephen Boyd, agross, andersson, konrad.dybcio, linux-arm-msm,
linux-clk, linux-kernel, mturquette
Cc: quic_varada, quic_srichara
On 2/11/2023 3:44 AM, Stephen Boyd wrote:
> Quoting Kathiravan T (2023-02-05 23:31:01)
>> diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c
>> index c8a5fa1bafca..2e043d2d0598 100644
>> --- a/drivers/clk/qcom/gcc-ipq5332.c
>> +++ b/drivers/clk/qcom/gcc-ipq5332.c
>> @@ -127,6 +127,16 @@ static struct clk_alpha_pll gpll4_main = {
>> .parent_data = &gcc_parent_data_xo,
>> .num_parents = 1,
>> .ops = &clk_alpha_pll_stromer_ops,
>> + /*
>> + * There are no consumers for this GPLL in kernel yet,
>> + * (will be added soon), so the clock framework
>> + * disables this source. But some of the clocks
>> + * initialized by boot loaders uses this source. So we
>> + * need to keep this clock ON. Add the CRITICAL flag
>> + * so the clock will not be disabled. Once the consumer
>> + * in kernel is added, we can get rid off this flag.
> s/off/of/
>
> Does CLK_IGNORE_UNUSED work the same? It doesn't sound like a critical
> clk from the description of the comment.
Sorry, somehow I missed this response. Will update to CLK_IGNORE_UNUSED
in V3.
>> + */
>> + .flags = CLK_IS_CRITICAL,
>> },
>> },
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-14 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 7:31 [PATCH V2] clk: qcom: ipq5332: mark GPLL4 as critical temporarily Kathiravan T
2023-02-10 22:14 ` Stephen Boyd
2023-02-14 16:19 ` Kathiravan T
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox