All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ettore Chimenti" <ettore.chimenti@linaro.org>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 08/10] ARM: dts: omap: dm816x: Correct speed for sysclk5
Date: Fri, 16 Oct 2026 14:53:12 +0000	[thread overview]
Message-ID: <sashiko-outbox-174499@kernel.org> (raw)
In-Reply-To: <20261016-patch-ektor5-dm8168-dts-v1-8-b4ce30217028@linaro.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] clk: ti: divider mask resolves to 0 preventing hardware update
--

commit 010a738d1ba1df99c68c1c1fed6854e92365aa42
Author: Andrew Goodbody <andrew.goodbody@linaro.org>

ARM: dts: omap: dm816x: Correct speed for sysclk5

The commit forces sysclk5 to run at 813MHz by changing its divider
configuration from a maximum divider of 1 to a divider of 2.

> diff --git a/arch/arm/boot/dts/ti/omap/dm816x-clocks.dtsi b/arch/arm/boot/dts/ti/omap/dm816x-clocks.dtsi
> index 76ebc6c3c3e5e..cb990773b0985 100644
> --- a/arch/arm/boot/dts/ti/omap/dm816x-clocks.dtsi
> +++ b/arch/arm/boot/dts/ti/omap/dm816x-clocks.dtsi
> @@ -144,7 +144,7 @@ sysclk5_ck: sysclk5_ck@310 {
>  		#clock-cells = <0>;
>  		compatible = "ti,divider-clock";
>  		clocks = <&sysclk4_ck>;
> -		ti,max-div = <1>;
> +		ti,dividers = <2>;

[Severity: High]
Does this actually change the clock rate in the hardware register?

By providing a single-element array ti,dividers = <2>;, the divider value 2
maps to the array index 0.

In drivers/clk/ti/divider.c:ti_clk_get_div_table():

	table[valid_div].div = val;
	table[valid_div].val = i;

Since there is only one element, the maximum valid index (and maximum register
value) is capped at 0.

When the mask is calculated in drivers/clk/ti/divider.c:_setup_mask():

	divider->mask = (1 << fls(mask)) - 1;

A maximum register value of 0 results in the mask evaluating to 0.

Consequently, any attempt to update the rate in ti_clk_divider_set_rate()
becomes a no-op:

	val &= ~(divider->mask << divider->shift);
	val |= value << divider->shift;

With a mask of 0, the physical hardware register is not modified, leaving the
clock running at 1.6GHz while the software incorrectly believes it has been
set to 813MHz.

>  		reg = <0x0310>;
>  	};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261016-patch-ektor5-dm8168-dts-v1-0-b4ce30217028@linaro.org?part=8

  reply	other threads:[~2026-10-16 14:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 14:41 [PATCH 00/10] ARM: dts: dm816x: fixes and peripheral updates for DM8168 SoC Ettore Chimenti
2026-10-16 14:41 ` [PATCH 01/10] ARM: ti81xx: Prevent USB being put into idle Ettore Chimenti
2026-10-17  6:53   ` Andreas Kemnade
2026-10-16 14:41 ` [PATCH 02/10] dt-bindings: pinctrl: Add devicetree bindings for DM816x SoC Pinctrl Ettore Chimenti
2026-10-16 14:45   ` sashiko-bot
2026-10-16 14:51   ` Krzysztof Kozlowski
2026-10-16 15:07     ` Ettore Chimenti
2026-10-16 14:41 ` [PATCH 03/10] ARM: dts: omap: dm816x: use dedicated SoC pinctrl Ettore Chimenti
2026-10-16 14:49   ` sashiko-bot
2026-10-16 14:41 ` [PATCH 04/10] ARM: dts: omap: dm816x: Fix pinctrl range Ettore Chimenti
2026-10-16 14:41 ` [PATCH 05/10] ARM: dts: omap: dm816x: refactor and align MMC node Ettore Chimenti
2026-10-16 14:41 ` [PATCH 06/10] ARM: dts: omap: dm816x: Update USB node Ettore Chimenti
2026-10-16 14:54   ` sashiko-bot
2026-10-17  6:39   ` Andreas Kemnade
2026-10-16 14:41 ` [PATCH 07/10] ARM: omap: dm816x: Match up capability flags for USB Ettore Chimenti
2026-10-16 14:41 ` [PATCH 08/10] ARM: dts: omap: dm816x: Correct speed for sysclk5 Ettore Chimenti
2026-10-16 14:53   ` sashiko-bot [this message]
2026-10-16 14:41 ` [PATCH 09/10] ARM: dts: omap: dm8168-evm: Correct SD card pinmux Ettore Chimenti
2026-10-16 14:41 ` [PATCH 10/10] ARM: dts: omap: dm8168-evm: enable MUSB multipoint support Ettore Chimenti

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-174499@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ettore.chimenti@linaro.org \
    --cc=linux-gpio@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 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.