From: sashiko-bot@kernel.org
To: "Raghav Sharma" <raghav.s@samsung.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 06/14] clk: samsung: exynos8855: add block top clock support
Date: Thu, 03 Dec 2026 15:37:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-248126@kernel.org> (raw)
In-Reply-To: <20261203151046.1562399-7-raghav.s@samsung.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] clk: samsung: exynos8855: CMU_TOP dividers bypass
top_gate_clks gates
- [Medium] clk: samsung: exynos8855: duplicate parent names in six
CMU_TOP mux tables
- [Low] clk: samsung: exynos8855: duplicate cmu-top entry in
exynos8855_cmu_of_match
--
commit f1aa8a3fdb16cc401753a2a51723ac942a29e3e2
Author: Raghav Sharma <raghav.s@samsung.com>
clk: samsung: exynos8855: add block top clock support
This commit adds the Exynos 8855 clock driver and registers CMU_TOP clocks,
including PLLs, muxes, dividers, fixed factors, and output gates.
> diff --git a/drivers/clk/samsung/clk-exynos8855.c b/drivers/clk/samsung/clk-exynos8855.c
> new file mode 100644
> index 0000000000000..3fade1d1155f9
> --- /dev/null
> +++ b/drivers/clk/samsung/clk-exynos8855.c
> @@ -0,0 +1,1474 @@
[ ... ]
> +PNAME(mout_clkcmu_gnpu0_noc_p) = { "dout_shared2_div1", "dout_shared3_div1",
> + "dout_shared1_div2", "dout_shared1_div4",
> + "dout_shared4_div3", "dout_shared2_div1",
> + "dout_shared4_div3", "dout_shared3_div3"};
> +PNAME(mout_clkcmu_gnpu0_xmaa_p) = { "dout_shared2_div1", "dout_shared3_div1",
> + "dout_shared1_div2", "dout_shared1_div4",
> + "dout_shared4_div3", "dout_shared2_div1",
> + "dout_shared4_div3", "dout_shared3_div3"};
> +PNAME(mout_clkcmu_sdma_noc_p) = { "dout_shared0_div2", "dout_shared0_div3",
> + "dout_shared0_div3", "dout_shared1_div3",
> + "dout_shared2_div2", "dout_shared2_div3",
> + "dout_shared4_div3", "dout_shared3_div3"};
> +PNAME(mout_clkcmu_dnc_htu_p) = { "dout_shared0_div2", "dout_shared0_div3",
> + "dout_shared0_div3", "dout_shared1_div3",
> + "dout_shared2_div2", "dout_shared2_div3",
> + "dout_shared4_div3", "dout_shared3_div3"};
> +PNAME(mout_clkcmu_dnc_noc_p) = { "dout_shared0_div2", "dout_shared0_div3",
> + "dout_shared0_div3", "dout_shared1_div3",
> + "dout_shared2_div2", "dout_shared2_div3",
> + "dout_shared4_div3", "dout_shared3_div3"};
> +PNAME(mout_clkcmu_psp_noc_p) = { "dout_shared0_div2", "dout_shared0_div3",
> + "dout_shared0_div3", "dout_shared1_div3",
> + "dout_shared2_div2", "dout_shared2_div3",
> + "dout_shared3_div2", "dout_shared3_div3"};
[Severity: Medium]
Are the duplicate parent names in these six mux tables intentional?
mout_clkcmu_gnpu0_noc_p and mout_clkcmu_gnpu0_xmaa_p repeat
dout_shared2_div1 (indices 0 and 5) and dout_shared4_div3 (indices 4 and
6). The other four tables repeat dout_shared0_div3 at indices 1 and 2
instead of listing dout_shared1_div2 at index 2 like the sibling NOC muxes.
Because clk_fetch_parent_index() returns the first matching entry, the
higher duplicated indices cannot be selected via clk_set_parent(). If
hardware wires distinct PLL dividers to those slots, CCF will also
miscalculate rates whenever hardware or firmware selects them.
[ ... ]
> +/* ---- DIV ---- */
> +static const struct samsung_div_clock top_div_clks[] __initconst = {
> + DIV(CLKCMU_DOUT_PERIC_NOC, "dout_clkcmu_peric_noc",
> + "mout_clkcmu_peric_noc", CLK_CON_DIV_CLKCMU_PERIC_NOC,
> + 0, 4),
[ ... ]
> + GATE(CLK_GOUT_CLKCMU_PERIC_NOC, "gout_clkcmu_peric_noc",
> + "mout_clkcmu_peric_noc",
> + CLK_CON_GAT_GATE_CLKCMU_PERIC_NOC,
> + 21, CLK_SET_RATE_PARENT, 0),
[Severity: Medium]
Should the dividers in top_div_clks parent to gout_clkcmu_* instead of
mout_clkcmu_*?
All 59 dividers in top_div_clks currently parent directly to mout_clkcmu_*,
leaving the corresponding CLK_GOUT_CLKCMU_* gates in top_gate_clks as
orphaned leaves. Because downstream CMUs consume CLKCMU_DOUT_* outputs,
enabling or disabling them never propagates to the CMU_TOP output gates.
If automatic clock gating falls back to manual mode (for example when the
DT reg size is not 0x10000 and samsung_is_auto_capable() returns false),
exynos_arm64_init_clocks() switches these gates to manual mode and
clk_disable_unused() disables all of them, hanging the SoC on boot.
Parenting top_div_clks to gout_clkcmu_* (matching sibling drivers such as
clk-gs101.c) restores the mout -> gout -> dout hierarchy.
[ ... ]
> +/* Register CMU_TOP early, as it's a dependency for other early domains */
> +CLK_OF_DECLARE(exynos8855_cmu_top, "samsung,exynos8855-cmu-top",
> + exynos8855_cmu_top_init);
> +
> +static int __init exynos8855_cmu_probe(struct platform_device *pdev)
> +{
> + const struct samsung_cmu_info *info;
> + struct device *dev = &pdev->dev;
> +
> + info = of_device_get_match_data(dev);
> + exynos_arm64_register_cmu(dev, dev->of_node, info);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id exynos8855_cmu_of_match[] = {
> + {
> + .compatible = "samsung,exynos8855-cmu-top",
> + .data = &top_cmu_info,
> + },
> + { }
> +};
[Severity: Low]
Should the "samsung,exynos8855-cmu-top" entry be removed from
exynos8855_cmu_of_match[]?
CMU_TOP is already registered early via CLK_OF_DECLARE(), which marks the
node OF_POPULATED so this match entry is dead during normal boot. If a
matching platform device is instantiated later via a DT overlay,
exynos8855_cmu_probe() calls into freed __init code and top_cmu_info.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203151046.1562399-1-raghav.s@samsung.com?part=6
next prev parent reply other threads:[~2026-12-03 15:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20261203145310epcas5p19b1f51b9777ac211d368dff8022d0497@epcas5p1.samsung.com>
2026-12-03 15:10 ` [PATCH v4 00/14] Add clock support for Exynos8855 SoC Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 01/14] dt-bindings: clock: exynos8855: add top & peric clock definitions Raghav Sharma
2026-12-03 15:26 ` sashiko-bot
2026-12-03 15:10 ` [PATCH v4 02/14] dt-bindings: clock: exynos8855: add peris " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 03/14] dt-bindings: clock: exynos8855: add hsi " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 04/14] dt-bindings: clock: exynos8855: add usb " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 05/14] clk: samsung: clk-pll: Add support for pll_4313 Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 06/14] clk: samsung: exynos8855: add block top clock support Raghav Sharma
2026-12-03 15:37 ` sashiko-bot [this message]
2026-12-03 15:10 ` [PATCH v4 07/14] clk: samsung: exynos8855: add block peric clock Raghav Sharma
2026-12-03 15:44 ` sashiko-bot
2026-12-03 15:10 ` [PATCH v4 08/14] clk: samsung: exynos8855: add block peris clock support Raghav Sharma
2026-12-03 15:50 ` sashiko-bot
2026-12-03 15:10 ` [PATCH v4 09/14] clk: samsung: exynos8855: add block hsi " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 10/14] clk: samsung: exynos8855: add block usb " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 11/14] arm64: dts: exynos8855: add cmu_top & cmu_peric clock DT nodes Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 12/14] arm64: dts: exynos8855: add cmu_peris " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 13/14] arm64: dts: exynos8855: add cmu_hsi " Raghav Sharma
2026-12-03 15:10 ` [PATCH v4 14/14] arm64: dts: exynos8855: add cmu_usb " Raghav Sharma
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-248126@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=raghav.s@samsung.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