]> git.ipfire.org Git - thirdparty/u-boot.git/commit
sunxi: clock: H6: add A523 CPU PLL support
authorAndre Przywara <andre.przywara@arm.com>
Sat, 25 Jan 2025 13:41:37 +0000 (13:41 +0000)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 27 Jul 2025 21:57:35 +0000 (22:57 +0100)
commit17b47bbc3486eae71d4602ae7c981e14d67de821
tree4388a04eb4e37436dfcda148c7cfbb76ac5e4497
parent915ac864f41be0d81f74c26bfc5c43a29bfcda2c
sunxi: clock: H6: add A523 CPU PLL support

The Allwinner A523 features 8 CPU cores, organised in two clusters, both
driven by separate PLLs. Also there is the DSU PLL, which clocks the
hardware that connects the cores to the rest of the system.
And while the PLL registers itself are very similar, they are located in
a separate register frame, outside the main CCU, and also the register
controlling the CPU clock source (mux) is different.

Provide a separate function that reparents the two clusters and the DSU,
while their PLLs are programmed. For the actual PLL programming, we rely
on the existing shared routine.

The selection between the new A523 routine and the existing code is made
with C if statements, but since the choice is effectively made at compile
time already, the compiler optimises away the other code paths, leaving
just the one required function in.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
arch/arm/include/asm/arch-sunxi/cpu_sunxi_ncat2.h
arch/arm/mach-sunxi/clock_sun50i_h6.c