From: sashiko-bot@kernel.org
To: "Ettore Chimenti" <ettore.chimenti@linaro.org>
Cc: linux-clk@vger.kernel.org
Subject: Re: [PATCH v2 4/4] clk-816x: add sys_ck clock as sys_clkin_ck alias
Date: Wed, 28 Oct 2026 16:06:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-188115@kernel.org> (raw)
In-Reply-To: <20261028-patch-ektor5-dm8168-clk-v2-4-dc6bf0fabae4@linaro.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] clk: ti: dm816x: adding sys_ck alias triggers invalid OMAP3 VC/VP init
--
commit 1a28e92700d48db3c2d33b03820789ccb46fb7f1
Author: Ettore Chimenti <ettore.chimenti@linaro.org>
clk-816x: add sys_ck clock as sys_clkin_ck alias
This commit adds a clock alias mapping sys_ck to sys_clkin_ck in
dm816x_clks[] so that the OMAP voltage management driver can find sys_ck on
DM816x systems.
> diff --git a/drivers/clk/ti/clk-816x.c b/drivers/clk/ti/clk-816x.c
> index 3b8e483aec928..fe6f66fc5a05d 100644
> --- a/drivers/clk/ti/clk-816x.c
> +++ b/drivers/clk/ti/clk-816x.c
> @@ -57,6 +57,7 @@ static struct ti_dt_clk dm816x_clks[] = {
> DT_CLK(NULL, "timer_sys_ck", "sys_clkin_ck"),
> DT_CLK(NULL, "timer_32k_ck", "sysclk18_ck"),
> DT_CLK(NULL, "timer_ext_ck", "tclkin_ck"),
> + DT_CLK(NULL, "sys_ck", "sys_clkin_ck"),
[Severity: Medium]
Does adding the sys_ck alias in dm816x_clks[] cause omap_voltage_late_init()
to run OMAP34xx/36xx voltage controller and voltage processor initialization
on DM816x where that hardware and PMIC data are absent?
On DM816x boot, ti816x_init_early() (as well as ti814x_init_early() on TI814x)
calls omap3xxx_voltagedomains_init() in
arch/arm/mach-omap2/voltagedomains3xxx_data.c:
if (soc_is_am35xx())
voltdms = voltagedomains_am35xx;
else
voltdms = voltagedomains_omap3;
Because only soc_is_am35xx() is checked, TI81xx falls back to
voltagedomains_omap3, which registers omap3_voltdm_mpu and omap3_voltdm_core
with .scalable = true, .vc, and .vp populated.
Later, omap2_common_pm_late_init() calls omap3_twl_init(), which returns
-ENODEV because cpu_is_omap34xx() is false on DM816x, leaving voltdm->pmic as
NULL. It then calls omap_voltage_late_init() in
arch/arm/mach-omap2/voltage.c:
list_for_each_entry(voltdm, &voltdm_list, node) {
struct clk *sys_ck;
if (!voltdm->scalable)
continue;
sys_ck = clk_get(NULL, voltdm->sys_clk.name);
if (IS_ERR(sys_ck)) {
pr_warn("%s: Could not get sys clk.\n", __func__);
return -EINVAL;
}
voltdm->sys_clk.rate = clk_get_rate(sys_ck);
WARN_ON(!voltdm->sys_clk.rate);
clk_put(sys_ck);
if (voltdm->vc) {
voltdm->scale = omap_vc_bypass_scale;
omap_vc_init_channel(voltdm);
}
if (voltdm->vp) {
voltdm->scale = omap_vp_forceupdate_scale;
omap_vp_init(voltdm);
}
}
When clk_get(NULL, "sys_ck") succeeds, omap_voltage_late_init() proceeds to
call omap_vc_init_channel() in arch/arm/mach-omap2/vc.c and omap_vp_init() in
arch/arm/mach-omap2/vp.c for both mpu_iva and core:
if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) {
pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name);
return;
}
This trades the single pr_warn() in omap_voltage_late_init() for four pr_err()
messages on boot and leaves voltdm->scale set to omap_vp_forceupdate_scale on
uninitialized VP instances.
Should TI81xx instead use non-scalable voltage domains in
omap3xxx_voltagedomains_init(), similar to how commit ddf536d0d7e1 ("ARM:
OMAP: AM3517/3505: fix crash on boot due to incorrect voltagedomain data")
handled AM35xx with voltagedomains_am35xx?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261028-patch-ektor5-dm8168-clk-v2-0-dc6bf0fabae4@linaro.org?part=4
prev parent reply other threads:[~2026-10-28 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 15:53 [PATCH v2 0/4] clk: ti: fapll/dm816x: clock tree and calculation fixes Ettore Chimenti
2026-10-28 15:53 ` [PATCH v2 1/4] clk: ti: fapll: remove ti_dt_clk_name helper Ettore Chimenti
2026-10-28 15:53 ` [PATCH v2 2/4] clk: ti: fapll: Fix clock speed calculation Ettore Chimenti
2026-10-28 15:53 ` [PATCH v2 3/4] clk: ti: fapll: print clock name that fails to register Ettore Chimenti
2026-10-28 15:53 ` [PATCH v2 4/4] clk-816x: add sys_ck clock as sys_clkin_ck alias Ettore Chimenti
2026-10-28 16:06 ` sashiko-bot [this message]
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-188115@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ettore.chimenti@linaro.org \
--cc=linux-clk@vger.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