Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Imran Shaik" <imran.shaik@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 4/4] clk: qcom: Add Global clock controller support on Qualcomm Shikra SoC
Date: Sat, 06 Jun 2026 11:20:00 +0000	[thread overview]
Message-ID: <20260606112000.B17B11F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260605-shikra-gcc-rpmcc-clks-v4-4-a0a7bfb44455@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Clock parent data structures incorrectly map `P_GPLL9_OUT_MAIN` to the raw PLL `&gpll9.clkr.hw` instead of its post-divider `&gpll9_out_main.clkr.hw`.
- [Medium] The clock `gcc_camss_tfe_1_clk_src` is missing the `CLK_SET_RATE_PARENT` flag, whereas its sibling clock `gcc_camss_tfe_0_clk_src` has it.
--

commit 4a831d5485683b422aed6cd3f5dbf1ba131e85cc
Author: Imran Shaik <imran.shaik@oss.qualcomm.com>
Subject: clk: qcom: Add Global clock controller support on Qualcomm Shikra SoC

This commit adds support for the Global Clock Controller (GCC) on the
Qualcomm Shikra SoC. It registers the necessary clocks, PLLs, dividers,
and resets for the device.

> diff --git a/drivers/clk/qcom/gcc-shikra.c b/drivers/clk/qcom/gcc-shikra.c
> new file mode 100644
> index 0000000000000..d5222756f214c
> --- /dev/null
> +++ b/drivers/clk/qcom/gcc-shikra.c

[ ... ]

> +static const struct parent_map gcc_parent_map_7[] = {
> +	{ P_BI_TCXO, 0 },
> +	{ P_GPLL0_OUT_EARLY, 1 },
> +	{ P_GPLL8_OUT_EARLY, 2 },
> +	{ P_GPLL10_OUT_MAIN, 3 },
> +	{ P_GPLL8_OUT_MAIN, 4 },
> +	{ P_GPLL9_OUT_MAIN, 5 },
> +	{ P_GPLL3_OUT_EARLY, 6 },
> +};
> +
> +static const struct clk_parent_data gcc_parent_data_7[] = {
> +	{ .index = DT_BI_TCXO },
> +	{ .hw = &gpll0.clkr.hw },
> +	{ .hw = &gpll8.clkr.hw },
> +	{ .hw = &gpll10.clkr.hw },
> +	{ .hw = &gpll8_out_main.clkr.hw },
> +	{ .hw = &gpll9.clkr.hw },

[Severity: High]
Should this map to the post-divider output gpll9_out_main.clkr.hw instead of
the raw PLL gpll9.clkr.hw?

The corresponding parent map gcc_parent_map_7 declares index 5 as
P_GPLL9_OUT_MAIN, but the data array maps it to the raw VCO output. This same
mismatch appears in gcc_parent_data_8, gcc_parent_data_9, and
gcc_parent_data_14. Using the wrong parent hardware clock might cause the
common clock framework to compute incorrect frequencies for downstream
consumers.

[ ... ]

> +static struct clk_rcg2 gcc_camss_tfe_1_clk_src = {
> +	.cmd_rcgr = 0x52024,
> +	.mnd_width = 8,
> +	.hid_width = 5,
> +	.parent_map = gcc_parent_map_8,
> +	.freq_tbl = ftbl_gcc_camss_tfe_0_clk_src,
> +	.hw_clk_ctrl = true,
> +	.clkr.hw.init = &(const struct clk_init_data) {
> +		.name = "gcc_camss_tfe_1_clk_src",
> +		.parent_data = gcc_parent_data_8,
> +		.num_parents = ARRAY_SIZE(gcc_parent_data_8),
> +		.ops = &clk_rcg2_shared_ops,

[Severity: Medium]
Is the CLK_SET_RATE_PARENT flag intentionally omitted here?

The sibling clock gcc_camss_tfe_0_clk_src explicitly sets the
CLK_SET_RATE_PARENT flag in its init data. Without this flag,
gcc_camss_tfe_1_clk_src might be unable to propagate rate changes to its
parent clock, potentially leading to frequency mismatches for the TFE_1 block.

> +	},
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260605-shikra-gcc-rpmcc-clks-v4-0-a0a7bfb44455@oss.qualcomm.com?part=4

  reply	other threads:[~2026-06-06 11:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 11:19 [PATCH v4 0/4] clk: qcom: Add RPMCC and GCC support for the Qualcomm Shikra SoC Imran Shaik
2026-06-05 11:19 ` [PATCH v4 1/4] dt-bindings: clock: qcom,rpmcc: Add Qualcomm Shikra SoC RPMCC Imran Shaik
2026-06-05 11:19 ` [PATCH v4 2/4] dt-bindings: clock: qcom: Add Qualcomm Shikra SoC Global Clock Controller Imran Shaik
2026-06-05 11:19 ` [PATCH v4 3/4] clk: qcom: smd-rpm: Add support for RPM clocks on Qualcomm Shikra SoC Imran Shaik
2026-06-06 11:35   ` Dmitry Baryshkov
2026-06-05 11:19 ` [PATCH v4 4/4] clk: qcom: Add Global clock controller support " Imran Shaik
2026-06-06 11:20   ` sashiko-bot [this message]
2026-06-06 11:42   ` Dmitry Baryshkov

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=20260606112000.B17B11F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imran.shaik@oss.qualcomm.com \
    --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