Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hardeep Sharma" <hardeep.sharma@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org,
	linux-clk@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 11/15] clk: qcom: Add Global Clock Controller driver for Kuno
Date: Thu, 27 Aug 2026 16:53:05 +0000	[thread overview]
Message-ID: <20260827165305.A23901F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260827-kuno-soc-support-v4-11-dd34f235fc1a@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The CLK_KUNO_GCC Kconfig entry is missing `select QCOM_GDSC`, which leads to a silent runtime probe failure if QCOM_GDSC is not enabled.
- [High] The SDCC (Secure Digital) apps clock uses `clk_rcg2_ops` instead of `clk_rcg2_floor_ops`, which can cause SD card overclocking and data corruption.
--

commit e6e05944bec5f5d0474370120050ea04e9b3eb87
Author: Hardeep Sharma <hardeep.sharma@oss.qualcomm.com>

clk: qcom: Add Global Clock Controller driver for Kuno
    
Add the global clock controller (GCC) driver for the Qualcomm Kuno SoC,
providing the PLLs, root clock generators, gate/branch clocks and resets
used by the peripheral devices such as UART, SPI, I2C, USB, SD, PCIe and
Ethernet.

> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
> index e609a7819e072..1f31bf09de0cd 100644
> --- a/drivers/clk/qcom/Kconfig
> +++ b/drivers/clk/qcom/Kconfig

[ ... ]

> @@ -212,6 +212,16 @@ config CLK_KAANAPALI_VIDEOCC
>  	  Say Y if you want to support video devices and functionality such as
>  	  video encode/decode.
>  
> +config CLK_KUNO_GCC
> +	tristate "Kuno Global Clock Controller"
> +	depends on ARM || COMPILE_TEST
> +	default ARCH_QCOM

[Severity: High]
Should this config also select QCOM_GDSC?

If CONFIG_QCOM_GDSC is not enabled, the static inline stub for gdsc_register()
in gdsc.h unconditionally returns -ENOSYS. When qcom_cc_really_probe() calls
gdsc_register() for the GDSCs declared in gcc_kuno_desc, it receives -ENOSYS
and aborts the probe entirely. This can leave dependent peripherals without
clocks or resets at runtime.

> +	help
> +	  Support for the global clock controller (GCC) on Kuno devices.
> +	  Say Y if you want to use peripheral devices such as UART, SPI,
> +	  I2C, USB, SD, PCIe and Ethernet on the Kuno SoC. This clock
> +	  controller supplies the clocks and resets to those peripherals.
> +
>  config CLK_NORD_DISPCC
>  	tristate "Nord Display Clock Controller"
>  	depends on ARM64 || COMPILE_TEST

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

[ ... ]

> +static struct clk_rcg2 gcc_sdcc4_apps_clk_src = {
> +	.cmd_rcgr = 0x6a01c,
> +	.mnd_width = 8,
> +	.hid_width = 5,
> +	.parent_map = gcc_parent_map_0,
> +	.freq_tbl = ftbl_gcc_sdcc4_apps_clk_src,
> +	.clkr.hw.init = &(const struct clk_init_data) {
> +		.name = "gcc_sdcc4_apps_clk_src",
> +		.parent_data = gcc_parent_data_0,
> +		.num_parents = ARRAY_SIZE(gcc_parent_data_0),
> +		.ops = &clk_rcg2_ops,

[Severity: High]
Should gcc_sdcc4_apps_clk_src use clk_rcg2_floor_ops instead of clk_rcg2_ops?

When the MMC core requests a clock rate for the SD card, the standard
clk_rcg2_ops uses qcom_find_freq(), which rounds up to the nearest available
frequency greater than or equal to the requested rate. If the requested rate
isn't an exact match in the frequency table, it will exceed the maximum safe
frequency mandated by the SD specification, which can cause SD card
overclocking and potential data corruption.

> +	},
> +};
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260827-kuno-soc-support-v4-0-dd34f235fc1a@oss.qualcomm.com?part=11

  reply	other threads:[~2026-08-27 16:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 16:38 [PATCH v4 00/15] Add initial support for Qualcomm Kuno SoC Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 01/15] soc: qcom: geni-se: allow selection on 32-bit ARM Qualcomm SoCs Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 02/15] dt-bindings: power: rpmpd: Document Kuno RPMh power domains Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 03/15] pmdomain: qcom: rpmhpd: Add power domains for Kuno Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 04/15] dt-bindings: clock: qcom,rpmhcc: Add Kuno RPMh clock controller Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 05/15] clk: qcom: clk-rpmh: Add support for Kuno RPMh clocks Hardeep Sharma
2026-08-27 16:49   ` sashiko-bot
2026-08-27 16:38 ` [PATCH v4 06/15] dt-bindings: interconnect: Add Qualcomm Kuno NoC Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 07/15] interconnect: qcom: Add Kuno interconnect provider driver Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 08/15] dt-bindings: pinctrl: qcom: Add Kuno TLMM Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 09/15] pinctrl: qcom: Add Kuno pinctrl driver Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 10/15] dt-bindings: clock: qcom: Add Kuno Global Clock Controller Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 11/15] clk: qcom: Add Global Clock Controller driver for Kuno Hardeep Sharma
2026-08-27 16:53   ` sashiko-bot [this message]
2026-08-27 16:38 ` [PATCH v4 12/15] dt-bindings: interrupt-controller: qcom,pdc: Add Kuno compatible string Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 13/15] dt-bindings: firmware: qcom,scm: Document SCM on Kuno SoC Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 14/15] dt-bindings: arm: qcom: Document Kuno IDP board Hardeep Sharma
2026-08-27 16:38 ` [PATCH v4 15/15] ARM: dts: qcom: Add initial device tree for Kuno SoC Hardeep Sharma
2026-08-27 16:58   ` 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=20260827165305.A23901F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hardeep.sharma@oss.qualcomm.com \
    --cc=linux-clk@vger.kernel.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