diff mbox series

[V3] clk: qcom: ipq5332: mark GPLL4 as critical temporarily

Message ID 20230217080720.5206-1-quic_kathirav@quicinc.com (mailing list archive)
State Changes Requested, archived
Headers show
Series [V3] clk: qcom: ipq5332: mark GPLL4 as critical temporarily | expand

Commit Message

Kathiravan Thirumoorthy Feb. 17, 2023, 8:07 a.m. UTC
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 V3:
	- Fixed the typo in the comment
	- Used CLK_IGNORE_UNUSED instead of CLK_IS_CRITICAL

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(+)

Comments

Stephen Boyd Feb. 17, 2023, 10:36 p.m. UTC | #1
Quoting Kathiravan T (2023-02-17 00:07:20)
> 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

s/CRITICAL/ignore unused/

> 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>
diff mbox series

Patch

diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c
index 9e4baea33937..bea1194b666a 100644
--- a/drivers/clk/qcom/gcc-ipq5332.c
+++ b/drivers/clk/qcom/gcc-ipq5332.c
@@ -128,6 +128,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 of this flag.
+			 */
+			.flags = CLK_IGNORE_UNUSED,
 		},
 	},
 };