All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sreeshankar K" <sreeshankar0910@gmail.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH 1/2] clk: qcom: Add Global Clock Controller (GCC) driver for SM7250
Date: Sun, 16 Aug 2026 08:42:15 +0000	[thread overview]
Message-ID: <20260816084215.E9E4C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260816082801.5773-2-sreeshankar0910@gmail.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] gcc_cpuss_gnoc_clk is incorrectly configured with its enable_reg pointing to its CBCR instead of a central vote register, and uses an invalid enable_mask.
- [Low] Unused static constant arrays `gcc_parent_map_5` and `gcc_parent_data_5`.
- [Low] Incorrect space-based indentation in Kconfig block for SM_GCC_7250.
- [Low] The dt-bindings header file 'qcom,gcc-sm7250.h' is included but omitted from the commit tree.
--

--- Patch [1]: [PATCH 1/2] clk: qcom: Add Global Clock Controller (GCC) driver for SM7250 ---
commit 3285603c7b98a0179a26091f983c989773cbb48c
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. This should allow most non-multimedia device
drivers to probe and control their clocks.

> diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
> --- a/drivers/clk/qcom/Kconfig
> +++ b/drivers/clk/qcom/Kconfig
> @@ -1416,6 +1416,15 @@ config SM_GCC_7150
>  	  Say Y if you want to use peripheral devices such as UART,
>  	  SPI, I2C, USB, SD/UFS, PCIe etc.
>  
> +config SM_GCC_7250
> +        tristate "SM7250 Global Clock Controller"
> +        depends on ARM64 || COMPILE_TEST

[Severity: Low]
This isn't a bug, but there appears to be space-based indentation instead
of tabs in this Kconfig block.

> +        select QCOM_GDSC
> +        help
> +          Support for the global clock controller on SM7250 devices.
> +          Say Y if you want to use peripheral devices such as UART,
> +          SPI, I2C, USB, SD/UFS, PCIe etc.
> +
[ ... ]
> 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
> @@ -0,0 +1,2347 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2020, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2026, Sreeshankar K <sreeshankar0910@gmail.com>
> + */
> +
> +#include <linux/clk-provider.h>
> +#include <linux/err.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/regmap.h>
> +
> +#include <dt-bindings/clock/qcom,gcc-sm7250.h>

[Severity: Low]
Is this header file missing from the commit? The dt-bindings header
qcom,gcc-sm7250.h does not appear to be included in the tree, which
might cause a build failure.

> +
> +#include "clk-alpha-pll.h"
[ ... ]
> +static const struct parent_map gcc_parent_map_5[] = {
> +	{ P_BI_TCXO, 0 },
> +	{ P_SLEEP_CLK, 5 },
> +};
> +
> +static const struct clk_parent_data gcc_parent_data_5[] = {
> +	{ .fw_name = "bi_tcxo" },
> +	{ .fw_name = "sleep_clk" },
> +};

[Severity: Low]
Are the gcc_parent_map_5 and gcc_parent_data_5 arrays used anywhere in
the driver? They seem to be defined but unreferenced, which could trigger
unused-const-variable compiler warnings.

> +
> +static const struct freq_tbl ftbl_gcc_cpuss_ahb_clk_src[] = {
[ ... ]
> +static struct clk_branch gcc_cpuss_gnoc_clk = {
> +	.halt_reg = 0x48064,
> +	.halt_check = BRANCH_HALT_VOTED,
> +	.clkr = {
> +		.enable_reg = 0x48064,
> +		.enable_mask = BIT(29),

[Severity: High]
Does gcc_cpuss_gnoc_clk use the correct enable_reg and enable_mask? 

Since this clock uses BRANCH_HALT_VOTED, writing BIT(29) directly to 
its CBCR at 0x48064 instead of a central vote register (like 0x52000) 
might fail to properly enable the clock, potentially causing a timeout
when waiting for the halt bit to clear.

> +		.hw.init = &(struct clk_init_data){
> +			.name = "gcc_cpuss_gnoc_clk",
> +			.ops = &clk_branch2_ops,
> +		},
> +	},
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260816082801.5773-1-sreeshankar0910@gmail.com?part=1

  reply	other threads:[~2026-08-16  8:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-16  8:27 [PATCH 0/2] Add Global Clock Controller (GCC) driver for SM7250 Sreeshankar K
2026-08-16  8:28 ` [PATCH 1/2] clk: qcom: " Sreeshankar K
2026-08-16  8:42   ` sashiko-bot [this message]
2026-08-16  8:28 ` [PATCH 2/2] dt-bindings: clock: Add GCC clock bindings " Sreeshankar K
  -- strict thread matches above, loose matches on Subject: below --
2026-08-16  9:07 v2 [PATCH 0/2] Add Global Clock Controller (GCC) driver " Sreeshankar K
2026-08-16  9:07 ` [PATCH 1/2] clk: qcom: " Sreeshankar K

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=20260816084215.E9E4C1F000E9@smtp.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.