mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Joonwoo Park <joonwoop@codeaurora.org>,
	Imran Khan <kimran@codeaurora.org>,
	Rajendra Nayak <quic_rjendra@quicinc.com>,
	Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
	Maxime Ripard <mripard@kernel.org>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Ilia Lin <ilialin@codeaurora.org>,
	Loic Poulain <loic.poulain@oss.qualcomm.com>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Yassine Oudjana <y.oudjana@protonmail.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: [PATCH 02/10] clk: qcom: gcc-msm8998: leave the MMSS QM clocks on
Date: Mon, 19 Oct 2026 16:41:01 +0300	[thread overview]
Message-ID: <20261019-msm8998-fix-clocks-v1-2-370949e4d8a0@oss.qualcomm.com> (raw)
In-Reply-To: <20261019-msm8998-fix-clocks-v1-0-370949e4d8a0@oss.qualcomm.com>

Booting MSM8998 without clk_ignore_unused, the SoC resets while the
modem is being started: restarting it in a loop takes the board down
within a few dozen cycles. Nothing references gcc_mmss_qm_core_clk, so
it gets gated, and keeping just that clock on is enough to survive.

Downstream never registered gcc_mmss_qm_core_clk, and dropped
gcc_mmss_qm_ahb_clk because XBL controls it ("clk: msm: clock: Remove
support for the gcc_mmss_qm_ahb_clk clock"). Treat both like the GPU
BIMC source and SNOC DVM clocks: stop registering them and enable them
at probe.

Fixes: b5f5f525c547 ("clk: qcom: Add MSM8998 Global Clock Control (GCC) driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/clk/qcom/gcc-msm8998.c | 30 ++----------------------------
 1 file changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
index 97d4968c5bdd..f07868b35da9 100644
--- a/drivers/clk/qcom/gcc-msm8998.c
+++ b/drivers/clk/qcom/gcc-msm8998.c
@@ -2254,32 +2254,6 @@ static struct clk_branch gcc_mmss_noc_cfg_ahb_clk = {
 	},
 };
 
-static struct clk_branch gcc_mmss_qm_ahb_clk = {
-	.halt_reg = 0x9030,
-	.halt_check = BRANCH_HALT,
-	.clkr = {
-		.enable_reg = 0x9030,
-		.enable_mask = BIT(0),
-		.hw.init = &(struct clk_init_data){
-			.name = "gcc_mmss_qm_ahb_clk",
-			.ops = &clk_branch2_ops,
-		},
-	},
-};
-
-static struct clk_branch gcc_mmss_qm_core_clk = {
-	.halt_reg = 0x900c,
-	.halt_check = BRANCH_HALT,
-	.clkr = {
-		.enable_reg = 0x900c,
-		.enable_mask = BIT(0),
-		.hw.init = &(struct clk_init_data){
-			.name = "gcc_mmss_qm_core_clk",
-			.ops = &clk_branch2_ops,
-		},
-	},
-};
-
 static struct clk_branch gcc_mmss_sys_noc_axi_clk = {
 	.halt_reg = 0x9000,
 	.halt_check = BRANCH_HALT,
@@ -3068,8 +3042,6 @@ static struct clk_regmap *gcc_msm8998_clocks[] = {
 	[GCC_HMSS_RBCPR_CLK] = &gcc_hmss_rbcpr_clk.clkr,
 	[GCC_HMSS_TRIG_CLK] = &gcc_hmss_trig_clk.clkr,
 	[GCC_MMSS_NOC_CFG_AHB_CLK] = &gcc_mmss_noc_cfg_ahb_clk.clkr,
-	[GCC_MMSS_QM_AHB_CLK] = &gcc_mmss_qm_ahb_clk.clkr,
-	[GCC_MMSS_QM_CORE_CLK] = &gcc_mmss_qm_core_clk.clkr,
 	[GCC_MMSS_SYS_NOC_AXI_CLK] = &gcc_mmss_sys_noc_axi_clk.clkr,
 	[GCC_MSS_AT_CLK] = &gcc_mss_at_clk.clkr,
 	[GCC_PCIE_0_AUX_CLK] = &gcc_pcie_0_aux_clk.clkr,
@@ -3298,6 +3270,8 @@ static const struct regmap_config gcc_msm8998_regmap_config = {
 static const u32 gcc_msm8998_critical_cbcrs[] = {
 	0x7100c, /* GCC_GPU_BIMC_GFX_SRC_CLK */
 	0x71018, /* GCC_GPU_SNOC_DVM_GFX_CLK */
+	0x9030, /* GCC_MMSS_QM_AHB_CLK */
+	0x900c, /* GCC_MMSS_QM_CORE_CLK */
 };
 
 static const struct qcom_cc_driver_data gcc_msm8998_driver_data = {

-- 
2.47.3


  parent reply	other threads:[~2026-10-19 13:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 13:40 [PATCH 00/10] clk: qcom: several fixes for stability on MSM8996/98 platforms Dmitry Baryshkov
2026-10-19 13:41 ` [PATCH 01/10] clk: qcom: gcc-msm8998: leave the GPU BIMC source and SNOC DVM clocks on Dmitry Baryshkov
2026-10-20  6:30   ` Konrad Dybcio
2026-10-19 13:41 ` Dmitry Baryshkov [this message]
2026-10-20  6:31   ` [PATCH 02/10] clk: qcom: gcc-msm8998: leave the MMSS QM " Konrad Dybcio
2026-10-19 13:41 ` [PATCH 03/10] clk: qcom: gpucc-msm8998: set the droop detector bit in the right register Dmitry Baryshkov
2026-10-20  6:32   ` Konrad Dybcio
2026-10-19 13:41 ` [PATCH 04/10] clk: qcom: clk-rcg2: forward the gfx3d rate request to the parent Dmitry Baryshkov
2026-10-19 14:33   ` johannes.goede
2026-10-19 14:34     ` Hans de Goede
2026-10-20  8:33   ` Konrad Dybcio
2026-10-19 13:41 ` [PATCH 05/10] clk: qcom: cpu-8996: move off the ACD leg while the PLL speeds up Dmitry Baryshkov
2026-10-20  6:52   ` Konrad Dybcio
2026-10-20 10:10     ` Dmitry Baryshkov
2026-10-21  8:04       ` Konrad Dybcio
2026-10-19 13:41 ` [PATCH 06/10] clk: qcom: mmcc-msm8996: keep mmss_mmagic_maxi_clk always enabled Dmitry Baryshkov
2026-10-20  8:35   ` Konrad Dybcio
2026-10-20  9:04     ` Dmitry Baryshkov
2026-10-19 13:41 ` [PATCH 07/10] clk: qcom: cbf-msm8996: program the MSM8996 Pro post-divider Dmitry Baryshkov
2026-10-20  6:57   ` Konrad Dybcio
2026-10-19 13:41 ` [PATCH 08/10] dt-bindings: clock: qcom,msm8996-apcc: add the MSM8996 Pro compatible Dmitry Baryshkov
2026-10-20  8:15   ` Krzysztof Kozlowski
2026-10-19 13:41 ` [PATCH 09/10] clk: qcom: cpu-8996: program the MSM8996 Pro droop code register Dmitry Baryshkov
2026-10-20  6:55   ` Konrad Dybcio
2026-10-19 13:41 ` [PATCH 10/10] arm64: dts: qcom: msm8996pro: use the MSM8996 Pro CPU clock compatible Dmitry Baryshkov
2026-10-20  6:55   ` Konrad Dybcio
2026-11-08 20:19 ` (subset) [PATCH 00/10] clk: qcom: several fixes for stability on MSM8996/98 platforms Bjorn Andersson
2026-11-17  1:04 ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261019-msm8998-fix-clocks-v1-2-370949e4d8a0@oss.qualcomm.com \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bmasney+clk@redhat.com \
    --cc=bod@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=ilialin@codeaurora.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jeffrey.l.hugo@gmail.com \
    --cc=joonwoop@codeaurora.org \
    --cc=kimran@codeaurora.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=lumag@kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=quic_rjendra@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vikash.garodia@oss.qualcomm.com \
    --cc=y.oudjana@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®