]> www.infradead.org Git - users/jedix/linux-maple.git/commit
clk: sunxi-ng: h616: Reparent CPU clock during frequency changes
authorAndre Przywara <andre.przywara@arm.com>
Fri, 25 Oct 2024 10:56:20 +0000 (11:56 +0100)
committerStephen Boyd <sboyd@kernel.org>
Mon, 13 Jan 2025 18:59:29 +0000 (10:59 -0800)
commit087b4083d3f9d202266debc6b684b0662c96f51b
tree9b56e9ca30dacf3a46fc22cfa40a653c0804a6e5
parent214e7a51f7c12c45decbd8fa37e437b09af7b14e
clk: sunxi-ng: h616: Reparent CPU clock during frequency changes

The H616 user manual recommends to re-parent the CPU clock during
frequency changes of the PLL, and recommends PLL_PERI0(1X), which runs
at 600 MHz. Also it asks to disable and then re-enable the PLL lock bit,
after the factor changes have been applied.

Add clock notifiers for the PLL and the CPU mux clock, using the existing
notifier callbacks, and tell them to use mux 4 (the PLL_PERI0(1X) source),
and bit 29 (the LOCK_ENABLE) bit. The existing code already follows the
correct algorithms.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20241025105620.1891596-1-andre.przywara@arm.com
Tested-by: Evgeny Boger <boger@wirenboard.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/sunxi-ng/ccu-sun50i-h616.c