From: sashiko-bot@kernel.org
To: "Muzaffer Kadir" <muzafferkadir@mainlining.org>
Cc: conor+dt@kernel.org, linux-clk@vger.kernel.org,
linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
devicetree@vger.kernel.org, mfd@lists.linux.dev, lee@kernel.org,
robh@kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 02/19] clk: qcom: Add global clock controller driver for MSM8952
Date: Wed, 16 Sep 2026 14:44:37 +0000 [thread overview]
Message-ID: <20260916144437.8A18D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916-msm8952-initial-support-v2-2-798c2602dde1@mainlining.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] clk: qcom: gp1/2/3_clk_src CCF parent incorrectly mapped to gpll0_vote instead of xo
- [High] clk: qcom: reset map targets CBCR enable bits instead of BCR reset registers
--
commit f6425874e2d9adc87ee0fd906bb71cd217405222
Author: Muzaffer Kadir <muzafferkadir@mainlining.org>
clk: qcom: Add global clock controller driver for MSM8952
This commit adds the global clock controller (GCC) driver for the Qualcomm
MSM8952 SoC. It provides clocks, resets, and power domains needed for various
hardware components on the device.
Link: https://android.googlesource.com/kernel/msm.git/+/refs/tags/android-wear-7.0.0_r0.3/drivers/clk/qcom/clock-gcc-8952.c
diff --git a/drivers/clk/qcom/gcc-msm8952.c b/drivers/clk/qcom/gcc-msm8952.c
--- a/drivers/clk/qcom/gcc-msm8952.c
+++ b/drivers/clk/qcom/gcc-msm8952.c
[ ... ]
> static struct clk_rcg2 gp1_clk_src = {
> .cmd_rcgr = 0x08004,
> .mnd_width = 8,
> .hid_width = 5,
> .parent_map = gcc_xo_map,
> .freq_tbl = ftbl_gcc_gp1_3_clk,
> .clkr.hw.init = &(struct clk_init_data){
> .name = "gp1_clk_src",
> .parent_hws = (const struct clk_hw *[]) {
> &gpll0_vote.hw,
> },
[Severity: High]
Does this code map to the wrong parent hardware clock? The parent_map is set
to gcc_xo_map (which implies hardware source 0, typically XO), but the CCF
parent_hws array points to &gpll0_vote.hw (800MHz) instead of the XO
reference.
This causes the Common Clock Framework to report the parent rate as 800MHz
while the hardware operates at 19.2MHz. Consequently, downstream drivers
configuring these clocks may compute incorrect hardware dividers, leading to
severe underclocking, and it will keep gpll0_vote enabled unnecessarily.
> .num_parents = 1,
> .ops = &clk_rcg2_ops,
> },
> };
>
> static struct clk_rcg2 gp2_clk_src = {
> .cmd_rcgr = 0x09004,
> .mnd_width = 8,
> .hid_width = 5,
> .parent_map = gcc_xo_map,
> .freq_tbl = ftbl_gcc_gp1_3_clk,
> .clkr.hw.init = &(struct clk_init_data){
> .name = "gp2_clk_src",
> .parent_hws = (const struct clk_hw *[]) {
> &gpll0_vote.hw,
> },
[Severity: High]
Does the same parent mismatch apply here to gp2_clk_src as well?
> .num_parents = 1,
> .ops = &clk_rcg2_ops,
> },
> };
>
> static struct clk_rcg2 gp3_clk_src = {
> .cmd_rcgr = 0x0a004,
> .mnd_width = 8,
> .hid_width = 5,
> .parent_map = gcc_xo_map,
> .freq_tbl = ftbl_gcc_gp1_3_clk,
> .clkr.hw.init = &(struct clk_init_data){
> .name = "gp3_clk_src",
> .parent_hws = (const struct clk_hw *[]) {
> &gpll0_vote.hw,
> },
[Severity: High]
And similarly, does gp3_clk_src also point to gpll0_vote.hw instead of xo?
[ ... ]
> static const struct qcom_reset_map gcc_msm8952_resets[] = {
> [RST_CAMSS_MICRO_BCR] = { 0x56008 },
> [RST_USB_HS_BCR] = { 0x41000 },
> [RST_QUSB2_PHY_BCR] = { 0x4103c },
> [RST_USB_HS_PHY_CFG_AHB_CBCR] = { 0x41030 },
[Severity: High]
Are we targeting the Clock Branch Control Register (CBCR) here instead of the
Block Control Register (BCR)?
By omitting .bit, the reset framework defaults to bit 0, which is the clock
enable bit for CBCRs. When a subsystem requests a block reset, the driver
will toggle the clock enable bit instead of actually resetting the hardware
block. This corrupts the clock's enabled/disabled state behind the
framework's back and fails to reset the hardware.
> [RST_USB2_HS_PHY_ONLY_BCR] = { 0x41034 },
> [RST_USB_FS_BCR] = { 0x3f000 },
> [RST_CAMSS_CSI1PIX_CBCR] = { 0x4f058 },
> [RST_CAMSS_CSI_VFE1_CBCR] = { 0x58074 },
> [RST_CAMSS_VFE1_CBCR] = { 0x5805c },
> [RST_CAMSS_CPP_CBCR] = { 0x5803c },
[Severity: High]
Do these CAMSS entries also incorrectly target CBCR registers instead of their
respective BCR hardware reset registers? Similar to the USB reset above, this
could break hardware state recovery for fundamental blocks by toggling clock
enablements instead.
> [RST_MSS_BCR] = { 0x71000 },
> [RST_MDSS_BCR] = { 0x4d074 },
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916-msm8952-initial-support-v2-0-798c2602dde1@mainlining.org?part=2
next prev parent reply other threads:[~2026-09-16 14:44 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 14:22 [PATCH v2 00/19] Add Initial Support For MSM8952, Add General Mobile Shamrock Muzaffer Kadir via B4 Relay
2026-09-16 14:22 ` [PATCH v2 01/19] dt-bindings: clock: qcom: Add MSM8952 global clock controller Muzaffer Kadir via B4 Relay
2026-09-16 14:31 ` sashiko-bot
2026-09-18 10:02 ` Krzysztof Kozlowski
2026-09-18 13:01 ` Muzaffer Kadir
2026-09-18 13:26 ` Krzysztof Kozlowski
2026-09-18 13:38 ` Muzaffer Kadir
2026-09-16 14:22 ` [PATCH v2 02/19] clk: qcom: Add global clock controller driver for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-16 14:44 ` sashiko-bot [this message]
2026-09-17 4:19 ` Taniya Das
2026-09-17 12:25 ` Muzaffer Kadir
2026-09-21 8:46 ` Konrad Dybcio
2026-09-16 14:22 ` [PATCH v2 03/19] dt-bindings: nvmem: Add compatible " Muzaffer Kadir via B4 Relay
2026-09-16 14:27 ` sashiko-bot
2026-09-18 10:09 ` Krzysztof Kozlowski
2026-09-16 14:22 ` [PATCH v2 04/19] dt-bindings: power: rpmpd: Add MSM8952 power domains Muzaffer Kadir via B4 Relay
2026-09-16 14:27 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 05/19] dt-bindings: mmc: sdhci-msm: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-16 14:27 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 06/19] dt-bindings: vendor-prefixes: Add General Mobile Muzaffer Kadir via B4 Relay
2026-09-16 14:25 ` sashiko-bot
2026-09-18 10:02 ` Krzysztof Kozlowski
2026-09-16 14:22 ` [PATCH v2 07/19] dt-bindings: arm: qcom: Document MSM8952 SoC binding Muzaffer Kadir via B4 Relay
2026-09-16 14:29 ` sashiko-bot
2026-09-18 10:03 ` Krzysztof Kozlowski
2026-09-16 14:22 ` [PATCH v2 08/19] dt-bindings: iommu: qcom,iommu: Add MSM8952 IOMMU to SMMUv2 compatibles Muzaffer Kadir via B4 Relay
2026-09-16 14:28 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 09/19] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-16 14:26 ` sashiko-bot
2026-09-24 14:28 ` (subset) " Lee Jones
2026-09-16 14:22 ` [PATCH v2 10/19] dt-bindings: display/msm: qcom, mdp5: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-16 14:30 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 11/19] dt-bindings: firmware: qcom,scm: Document MSM8952 SCM Muzaffer Kadir via B4 Relay
2026-09-16 14:27 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 12/19] dt-bindings: clock: qcom,rpmcc: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-16 14:31 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 13/19] drm: msm: mdp5: Add MDP5 configuration for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-16 14:43 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 14/19] soc: qcom: ubwc: Add UBWC config " Muzaffer Kadir via B4 Relay
2026-09-16 14:27 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 15/19] dt-bindings: thermal: tsens: Add MSM8952 Muzaffer Kadir via B4 Relay
2026-09-16 14:31 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 16/19] thermal: qcom: tsens: Add support for MSM8952 tsens Muzaffer Kadir via B4 Relay
2026-09-16 14:34 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 17/19] arm64: dts: qcom: Add initial support for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-16 14:49 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 18/19] dt-bindings: input: touchscreen: goodix: Add binding for GT970 Muzaffer Kadir via B4 Relay
2026-09-16 14:29 ` sashiko-bot
2026-09-16 14:22 ` [PATCH v2 19/19] arm64: dts: qcom: generalmobile-shamrock: new device Muzaffer Kadir via B4 Relay
2026-09-16 14:37 ` sashiko-bot
2026-09-18 10:06 ` Krzysztof Kozlowski
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=20260916144437.8A18D1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lee@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=muzafferkadir@mainlining.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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