From: sashiko-bot@kernel.org
To: "Muzaffer Kadir" <muzafferkadir@mainlining.org>
Cc: robh@kernel.org, conor+dt@kernel.org, lee@kernel.org,
dri-devel@lists.freedesktop.org, dmitry.torokhov@gmail.com,
linux-clk@vger.kernel.org, linux-input@vger.kernel.org,
mfd@lists.linux.dev, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC 02/20] clk: qcom: Add global clock controller driver for MSM8952
Date: Sat, 12 Sep 2026 08:54:47 +0000 [thread overview]
Message-ID: <20260912085447.C2EA91F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260912-msm8952-initial-support-v1-2-0e742578b524@mainlining.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Duplicate CCF clock branches are registered for the same physical hardware registers (`0x58044` and `0x58048`), leading to state desynchronization.
- [High] Incorrect parent map for `gp1_clk_src`, `gp2_clk_src`, and `gp3_clk_src` causes rate setting to unconditionally fail.
- [High] Hardware resets are improperly mapped to Clock Branch Control Registers (CBCR) instead of Block Control Registers (BCR), causing them to toggle clock enablement instead of performing a hardware reset.
--
commit b4dadd423234c197ee41263628a67b773be1b25f
Author: Muzaffer Kadir <muzafferkadir@mainlining.org>
clk: qcom: Add global clock controller driver for MSM8952
This commit adds the global clock controller driver for MSM8952, providing
clocks, resets, and power domains for various SoC components. It ports the
GCC driver for the 8952 based on a downstream reference.
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
> new file mode 100644
> index 0000000000000..e75bf51ad4087
> --- /dev/null
> +++ b/drivers/clk/qcom/gcc-msm8952.c
[ ... ]
> +static const struct freq_tbl ftbl_gcc_gp1_3_clk[] = {
> + F(19200000, P_XO, 1, 0, 0),
> + { }
> +};
> +
> +static struct clk_rcg2 gp1_clk_src = {
> + .cmd_rcgr = 0x08004,
> + .mnd_width = 8,
> + .hid_width = 5,
> + .parent_map = gcc_gpll0_map,
[Severity: High]
Will this cause rate setting to fail for the general-purpose clocks?
The frequency table ftbl_gcc_gp1_3_clk requests P_XO as the parent source,
but the parent map gcc_gpll0_map does not contain an entry for P_XO. When the
clock framework attempts to configure the parent, it will search for P_XO and
return -ENOENT. Does this parent map need to be updated to one that includes
P_XO?
> + .freq_tbl = ftbl_gcc_gp1_3_clk,
[ ... ]
> +static struct clk_rcg2 gp2_clk_src = {
> + .cmd_rcgr = 0x09004,
> + .mnd_width = 8,
> + .hid_width = 5,
> + .parent_map = gcc_gpll0_map,
[Severity: High]
Does this have the same parent map issue as gp1_clk_src?
> + .freq_tbl = ftbl_gcc_gp1_3_clk,
[ ... ]
> +static struct clk_rcg2 gp3_clk_src = {
> + .cmd_rcgr = 0x0a004,
> + .mnd_width = 8,
> + .hid_width = 5,
> + .parent_map = gcc_gpll0_map,
[Severity: High]
Does this also need to be updated to a parent map containing P_XO?
> + .freq_tbl = ftbl_gcc_gp1_3_clk,
[ ... ]
> +static struct clk_branch gcc_camss_vfe0_ahb_clk = {
> + .halt_reg = 0x58044,
[ ... ]
> +static struct clk_branch gcc_camss_vfe0_axi_clk = {
> + .halt_reg = 0x58048,
[ ... ]
> +static struct clk_branch gcc_camss_vfe_ahb_clk = {
> + .halt_reg = 0x58044,
[Severity: High]
Are these duplicate clock branches intentional? Both gcc_camss_vfe0_ahb_clk
and gcc_camss_vfe_ahb_clk map to the exact same physical hardware register
(0x58044). If different consumer drivers request these two different clock
abstractions for the same hardware bit, couldn't one driver disable the
clock while the other expects it to be on, causing unexpected hardware
failures?
> + .clkr = {
> + .enable_reg = 0x58044,
[ ... ]
> +static struct clk_branch gcc_camss_vfe_axi_clk = {
> + .halt_reg = 0x58048,
[Severity: High]
Similarly, does this duplicate the gcc_camss_vfe0_axi_clk definition for
register 0x58048? This might lead to the same state desynchronization and
reference counting issues in the clock framework.
> + .clkr = {
> + .enable_reg = 0x58048,
[ ... ]
> +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]
Could this reset mapping cause unintended behavior? It maps to a Clock
Branch Control Register (CBCR) instead of a Block Control Register (BCR).
Without specifying a bit, it defaults to bit 0, which is the CLK_ENABLE bit
for the CBCR. When a peripheral driver triggers this reset, will it
accidentally toggle the clock enable state rather than performing a true
hardware reset?
> + [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 entries also incorrectly map to CBCR registers rather than BCR
registers, potentially toggling clock enablement instead of performing a
hardware reset?
> + [RST_MSS_BCR] = { 0x71000 },
> + [RST_MDSS_BCR] = { 0x4d074 },
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260912-msm8952-initial-support-v1-0-0e742578b524@mainlining.org?part=2
next prev parent reply other threads:[~2026-09-12 8:54 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 8:39 [PATCH RFC 00/20] Add Initial Support For MSM8952, Add General Mobile Shamrock Muzaffer Kadir via B4 Relay
2026-09-12 8:39 ` [PATCH RFC 01/20] dt-bindings: clock: qcom: Add MSM8952 global clock controller Muzaffer Kadir via B4 Relay
2026-09-12 8:45 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 02/20] clk: qcom: Add global clock controller driver for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:54 ` sashiko-bot [this message]
2026-09-12 8:39 ` [PATCH RFC 03/20] dt-bindings: nvmem: Add compatible " Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 04/20] dt-bindings: power: rpmpd: Add MSM8952 power domains Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 05/20] dt-bindings: mmc: sdhci-msm: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-12 8:43 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 06/20] dt-bindings: vendor-prefixes: Add General Mobile Muzaffer Kadir via B4 Relay
2026-09-12 8:41 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 07/20] dt-bindings: arm: qcom: Document MSM8952 SoC binding Muzaffer Kadir via B4 Relay
2026-09-12 8:48 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 08/20] dt-bindings: iommu: qcom,iommu: Add MSM8952 IOMMU to SMMUv2 compatibles Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 09/20] dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:42 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 10/20] dt-bindings: display/msm: qcom, mdp5: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-12 8:47 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 11/20] dt-bindings: firmware: qcom,scm: Document MSM8952 SCM Muzaffer Kadir via B4 Relay
2026-09-12 8:44 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 12/20] dt-bindings: clock: qcom,rpmcc: Add MSM8952 compatible Muzaffer Kadir via B4 Relay
2026-09-12 8:46 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 13/20] clk: qcom: smd-rpm: Add clocks for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:46 ` sashiko-bot
2026-09-14 11:18 ` Konrad Dybcio
2026-09-12 8:39 ` [PATCH RFC 14/20] drm: msm: mdp5: Add MDP5 configuration " Muzaffer Kadir via B4 Relay
2026-09-12 9:19 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 15/20] soc: qcom: ubwc: Add UBWC config " Muzaffer Kadir via B4 Relay
2026-09-12 8:43 ` sashiko-bot
2026-09-14 11:23 ` Konrad Dybcio
2026-09-14 14:21 ` Abel Vesa
2026-09-12 8:39 ` [PATCH RFC 16/20] dt-bindings: thermal: tsens: Add MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:51 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 17/20] thermal: qcom: tsens: Add support for MSM8952 tsens Muzaffer Kadir via B4 Relay
2026-09-12 8:51 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 18/20] arm64: dts: qcom: Add initial support for MSM8952 Muzaffer Kadir via B4 Relay
2026-09-12 8:56 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 19/20] dt-bindings: input: touchscreen: goodix: Add binding for GT970 Muzaffer Kadir via B4 Relay
2026-09-12 8:50 ` sashiko-bot
2026-09-12 8:39 ` [PATCH RFC 20/20] arm64: dts: qcom: generalmobile-shamrock: new device Muzaffer Kadir via B4 Relay
2026-09-12 8:58 ` sashiko-bot
2026-09-12 15:47 ` David Heidelberg
2026-09-12 17:42 ` Muzaffer Kadir
2026-09-14 11:22 ` Konrad Dybcio
2026-09-14 11:58 ` Muzaffer Kadir
2026-09-14 12:01 ` Konrad Dybcio
2026-09-14 12:03 ` David Heidelberg
2026-09-14 12:05 ` David Heidelberg
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=20260912085447.C2EA91F00893@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;
as well as URLs for NNTP newsgroup(s).