From: "Junhui Liu" <junhui.liu@pigmoral.tech>
To: <sashiko-reviews@lists.linux.dev>,
"Junhui Liu" <junhui.liu@pigmoral.tech>
Cc: <linux-clk@vger.kernel.org>, <robh@kernel.org>,
<conor+dt@kernel.org>, <devicetree@vger.kernel.org>,
<linux-sunxi@lists.linux.dev>
Subject: Re: [PATCH v6 7/8] clk: sunxi-ng: a733: Add bus clock gates
Date: Sun, 11 Oct 2026 01:09:39 +0800 [thread overview]
Message-ID: <DM1BOWOKF9OM.21QWSA1L8WH3U@pigmoral.tech> (raw)
In-Reply-To: <sashiko-outbox-166706@kernel.org>
On Sat Oct 10, 2026 at 11:54 PM CST, sashiko-bot wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] clk: sunxi-ng: ahb_store_clk is missing CLK_IS_CRITICAL flag
> --
>
> commit f3ca9c131f39f726826090f6af6752e7b39c004c
> Author: Junhui Liu <junhui.liu@pigmoral.tech>
>
> clk: sunxi-ng: a733: Add bus clock gates
>
> This commit adds bus clock gates that control access to the device register
> interfaces on the Allwinner A733 SoC. It also intends to mark the ahb-store,
> mbus-store, and ahb-cpus clocks as critical to prevent access breakage to
> boot and storage devices.
>
>> diff --git a/drivers/clk/sunxi-ng/ccu-sun60i-a733.c b/drivers/clk/sunxi-ng/ccu-sun60i-a733.c
>> --- a/drivers/clk/sunxi-ng/ccu-sun60i-a733.c
>> +++ b/drivers/clk/sunxi-ng/ccu-sun60i-a733.c
>
> [ ... ]
>
>> +static SUNXI_CCU_GATE_HWS(ahb_msi_lite0_clk, "ahb-msi-lite0", ahb_hws,
>> + 0x5c0, BIT(16), 0);
>> +
>> +/* This gate controls access to the storage controller MMIO registers. */
>> +static SUNXI_CCU_GATE_HWS(ahb_store_clk, "ahb-store", ahb_hws,
>> + 0x5c0, BIT(24), 0);
>
> [Severity: High]
> The commit message notes that the ahb-store clock should be marked as
> critical, but the definition of ahb_store_clk here uses 0 for its flags
> parameter instead of CLK_IS_CRITICAL.
Oops, I forgot to update the commit message accordingly. I will send a
new version to update it.
>
> During late boot, the Common Clock Framework automatically disables any
> clocks that have no active consumers holding a reference to them.
>
> Could this omission allow the framework to inadvertently gate the storage
> controller MMIO registers, leading to a system freeze or storage probe
> failures?
ahb_store_clk has already been set as the parent of the NAND, MMC, SPI,
SPIF and UFS bus gates. Therefore, when any storage-related peripheral is
in use, ahb_store_clk will be enabled through the clock dependency, so it
no longer needs the CLK_IS_CRITICAL flag.
>
>> +static const struct clk_hw *ahb_store_hws[] = { &ahb_store_clk.common.hw };
>> +
>> +/* Keep enabled for access to the CPUS domain registers. */
>> +static SUNXI_CCU_GATE_HWS(ahb_cpus_clk, "ahb-cpus", ahb_hws,
>> + 0x5c0, BIT(28), CLK_IS_CRITICAL);
--
Best regards,
Junhui Liu
next prev parent reply other threads:[~2026-10-10 17:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 15:52 [PATCH v6 0/8] clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM Junhui Liu
2026-10-09 15:52 ` [PATCH v6 1/8] dt-bindings: clk: sun60i-a733-ccu: Add Allwinner A733 support Junhui Liu
2026-10-09 15:52 ` [PATCH v6 2/8] clk: sunxi-ng: sdm: Add dual patterns support Junhui Liu
2026-10-09 15:52 ` [PATCH v6 3/8] clk: sunxi-ng: a733: Add PRCM CCU Junhui Liu
2026-10-09 15:52 ` [PATCH v6 4/8] clk: sunxi-ng: a733: Add PLL clocks support Junhui Liu
2026-10-09 15:52 ` [PATCH v6 5/8] clk: sunxi-ng: a733: Add bus " Junhui Liu
2026-10-09 15:52 ` [PATCH v6 6/8] clk: sunxi-ng: a733: Add mod " Junhui Liu
2026-10-09 15:52 ` [PATCH v6 7/8] clk: sunxi-ng: a733: Add bus clock gates Junhui Liu
2026-10-10 15:54 ` sashiko-bot
2026-10-10 17:09 ` Junhui Liu [this message]
2026-10-09 15:52 ` [PATCH v6 8/8] clk: sunxi-ng: a733: Add reset lines Junhui Liu
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=DM1BOWOKF9OM.21QWSA1L8WH3U@pigmoral.tech \
--to=junhui.liu@pigmoral.tech \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--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