[PATCH v1] clk: Only enable the parent clock if the clock was enabled before reparenting

Miquel Raynal miquel.raynal at bootlin.com
Mon Sep 1 14:10:08 CEST 2025


Hi,

On 29/08/2025 at 11:25:00 +03, bigunclemax at gmail.com wrote:

> From: Maksim Kiselev <bigunclemax at gmail.com>
>
> The current implementation of clk_set_parent() unconditionally enables
> the new parent clock, even if the target clock was not previously enabled.
>
> To avoid this implicit behavior, this patch adds a check for whether
> the target clock has been enabled before parent enabling..
>
> Fixes: ac30d90f336 ("clk: Ensure the parent clocks are enabled while reparenting")
> Signed-off-by: Maksim Kiselev <bigunclemax at gmail.com>

It took me a bit of time to understand your issue, but that sounds
legitimate indeed.

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>

Thanks,
Miquèl


More information about the U-Boot mailing list