The critical_cbrcrs array will get qcom_branch_set_clk_en() called on
each entry which will set BIT(0) to enable the clock. This is however
wrong for these two PCIE_RSCC clocks which need BIT(20) and BIT(21) set
respectively to enable them.

Fixes: d1919c375f21 ("clk: qcom: Add support for Global clock controller on 
Kaanapali")
Signed-off-by: Luca Weiss <[email protected]>
---
 drivers/clk/qcom/gcc-kaanapali.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/qcom/gcc-kaanapali.c b/drivers/clk/qcom/gcc-kaanapali.c
index 842c1a70c691..5bcbcd178657 100644
--- a/drivers/clk/qcom/gcc-kaanapali.c
+++ b/drivers/clk/qcom/gcc-kaanapali.c
@@ -3464,8 +3464,6 @@ static const u32 gcc_kaanapali_critical_cbcrs[] = {
        0x9f004, /* GCC_EVA_AHB_CLK */
        0x9f024, /* GCC_EVA_XO_CLK */
        0x71004, /* GCC_GPU_CFG_AHB_CLK */
-       0x52010, /* GCC_PCIE_RSCC_CFG_AHB_CLK */
-       0x52010, /* GCC_PCIE_RSCC_XO_CLK */
        0x32004, /* GCC_VIDEO_AHB_CLK */
        0x32040, /* GCC_VIDEO_XO_CLK */
 };
@@ -3480,6 +3478,10 @@ static const struct regmap_config 
gcc_kaanapali_regmap_config = {
 
 static void clk_kaanapali_regs_configure(struct device *dev, struct regmap 
*regmap)
 {
+       /* Keep clocks always enabled */
+       regmap_update_bits(regmap, 0x52010, BIT(20), BIT(20)); /* 
GCC_PCIE_RSCC_CFG_AHB_CLK */
+       regmap_update_bits(regmap, 0x52010, BIT(21), BIT(21)); /* 
GCC_PCIE_RSCC_XO_CLK */
+
        /* FORCE_MEM_CORE_ON for ufs phy ice core clocks */
        qcom_branch_set_force_mem_core(regmap, gcc_ufs_phy_ice_core_clk, true);
 }

-- 
2.55.0


Reply via email to