]> git.ipfire.org Git - thirdparty/linux.git/commit
clk: thead: Mark essential bus clocks as CLK_IGNORE_UNUSED
authorMichal Wilczynski <m.wilczynski@samsung.com>
Mon, 23 Jun 2025 18:08:53 +0000 (20:08 +0200)
committerDrew Fustini <drew@pdp7.com>
Mon, 30 Jun 2025 20:11:53 +0000 (13:11 -0700)
commit0370395d45ca6dd53bb931978f0e91ac8dd6f1c5
treef68b435933d583ed49e546301c7913cf8f07c4e2
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
clk: thead: Mark essential bus clocks as CLK_IGNORE_UNUSED

Probing peripherals in the AON and PERI domains, such as the PVT thermal
sensor and the PWM controller, can lead to boot hangs or unresponsive
devices on the LPi4A board. The root cause is that their parent bus
clocks ('CLK_CPU2AON_X2H' and the 'CLK_PERISYS_APB' clocks) are
automatically gated by the kernel's power-saving mechanisms when the bus
is perceived as idle.

Alternative solutions were investigated, including modeling the parent
bus in the Device Tree with 'simple-pm-bus' or refactoring the clock
driver's parentage. The 'simple-pm-bus' approach is not viable due to
the lack of defined bus address ranges in the hardware manual and its
creation of improper dependencies on the 'pm_runtime' API for consumer
drivers.

Therefore, applying the'`CLK_IGNORE_UNUSED' flag directly to the
essential bus clocks is the most direct and targeted fix. This prevents
the kernel from auto-gating these buses and ensures peripherals remain
accessible.

This change fixes the boot hang associated with the PVT sensor and
resolves the functional issues with the PWM controller.

Link: https://lore.kernel.org/all/9e8a12db-236d-474c-b110-b3be96edf057@samsung.com/
Reviewed-by: Drew Fustini <drew@pdp7.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Drew Fustini <drew@pdp7.com>
drivers/clk/thead/clk-th1520-ap.c