From: sashiko-bot@kernel.org
To: "Sreeshankar K" <sreeshankar0910@gmail.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v11 2/5] clk: qcom: Add Global Clock Controller (GCC) driver for SM7250
Date: Fri, 16 Oct 2026 04:40:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-173795@kernel.org> (raw)
In-Reply-To: <20261016042432.824-3-sreeshankar0910@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] clk: qcom: Incorrect source enum in freq_tbl causes cpuss_ahb_clk_src rate setting failure
--
commit 457d324324dea631af01284e949d55a40199a579
Author: Sreeshankar K <sreeshankar0910@gmail.com>
clk: qcom: Add Global Clock Controller (GCC) driver for SM7250
Add support for the global clock controller found on SM7250
based devices.
> diff --git a/drivers/clk/qcom/gcc-sm7250.c b/drivers/clk/qcom/gcc-sm7250.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/clk/qcom/gcc-sm7250.c
[ ... ]
> +static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src[] = {
> + F(19200000, DT_BI_TCXO_AO, 1, 0, 0),
> + { }
> +};
> +
> +static struct clk_rcg2 gcc_cpuss_ahb_clk_src = {
> + .cmd_rcgr = 0x48010,
> + .mnd_width = 0,
> + .hid_width = 5,
> + .parent_map = gcc_parent_map_0,
> + .freq_tbl = ftbl_gcc_cpuss_ahb_clk_src,
> + .clkr.hw.init = &(const struct clk_init_data){
> + .name = "gcc_cpuss_ahb_clk_src",
> + .parent_data = gcc_parent_data_0_ao,
> + .num_parents = ARRAY_SIZE(gcc_parent_data_0_ao),
> + .flags = CLK_SET_RATE_PARENT,
> + .ops = &clk_rcg2_ops,
> + },
> +};
[Severity: High]
Will this cause a rate setting failure for gcc_cpuss_ahb_clk_src?
The frequency table ftbl_gcc_cpuss_ahb_clk_src uses the device tree index
DT_BI_TCXO_AO (which evaluates to 1) instead of the internal hardware parent
macro P_BI_TCXO (which evaluates to 0).
The associated clock gcc_cpuss_ahb_clk_src restricts its num_parents to 1
via gcc_parent_data_0_ao, and uses gcc_parent_map_0 as its parent map.
During a rate change, the common clock framework invokes qcom_find_src_index()
which iterates up to num_parents (1) and checks if the requested source
matches map[0].src (P_BI_TCXO = 0).
Since 1 != 0, the lookup fails and returns -ENOENT, preventing rate
configuration on the CPUSS AHB clock. Should the frequency table use
P_BI_TCXO instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016042432.824-1-sreeshankar0910@gmail.com?part=2
next prev parent reply other threads:[~2026-10-16 4:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 4:24 [PATCH v11 0/5] Add initial support for Qualcomm SM7250 SoC Sreeshankar K
2026-10-16 4:24 ` [PATCH v11 1/5] dt-bindings: clock: Add SM7250 global clock controller Sreeshankar K
2026-10-16 4:24 ` [PATCH v11 2/5] clk: qcom: Add Global Clock Controller (GCC) driver for SM7250 Sreeshankar K
2026-10-16 4:40 ` sashiko-bot [this message]
2026-10-16 4:24 ` [PATCH v11 3/5] dt-bindings: firmware: qcom,scm: Document SM7250 SCM Sreeshankar K
2026-10-16 4:24 ` [PATCH v11 4/5] dt-bindings: cpufreq: qcom-hw: Document SM7250 cpufreq hardware Sreeshankar K
2026-10-16 4:32 ` sashiko-bot
2026-10-16 4:24 ` [PATCH v11 5/5] arm64: dts: qcom: Add SM7250 devicetree file Sreeshankar K
2026-10-16 4:41 ` sashiko-bot
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=sashiko-outbox-173795@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sreeshankar0910@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.