Re: [PATCH 2/6] clk: qcom: ipq5018: mark XO clock as critical

From: George Moussalem
Date: Sun May 04 2025 - 02:59:24 EST




On 5/2/25 16:45, George Moussalem wrote:


On 5/2/25 14:29, Konrad Dybcio wrote:
On 5/2/25 12:15 PM, George Moussalem via B4 Relay wrote:
From: George Moussalem <george.moussalem@xxxxxxxxxxx>

The XO clock must not be disabled, so let's add the CLK_IS_CRITICAL
flag to avoid the kernel trying to disable the XO clock (when parenting
it under the CMN PLL reference clock), else the kernel will panic and
the following message will appear in the kernel logs:

Remove the struct definition for this clock (and the assignment in
blah_blah_clks[]) and replace it with:

qcom_branch_set_clk_en(regmap, 0x30030); /* GCC_XO_CLK */

understood, thanks for the quick turnaround!

Tested it, but then then the issue is still there. This time fixable by setting the CLK_IS_CRITICAL flag on gcc_xo_clk_src. I was looking at removing the struct for gcc_xo_clk_src too and use qcom_branch_set_clk_en, but there are clocks that refer to the gcc_xo_clk_src as their parent. I'm a bit hesitant to tinker with the GCC driver without access to the datasheet. The downstream driver actually has the CLK_IS_CRITICAL flag set too on gcc_xo_clk as initially proposed in this patch:

https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.5/drivers/clk/qcom/gcc-ipq5018.c#L1457

Are you okay with this suggested approach?



Konrad

Best regards,
George

Best regards,
George