summaryrefslogtreecommitdiff
path: root/drivers/ddr
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2025-01-25 13:29:34 +0000
committerAndre Przywara <andre.przywara@arm.com>2025-07-27 22:57:35 +0100
commitff4dda1db2c6f96582fc1691c4fdb83e957e7666 (patch)
tree7cab9c475303c8760acbd44008aac4a11b3ea25e /drivers/ddr
parentf02e64d011745de095b8072fd3b0b34f888144e6 (diff)
sunxi: clock: H6: factor out clock_set_pll()
The SPL initial clock setup code for the Allwinner H6 and H616 SoCs uses a simple CPU PLL setup routine, which programs all register bits at once, then waits for the LOCK bit to clear. The manual suggests to follow a certain procedure for bringing up any PLLs, which involves several register writes, one at a time, and some delays. Also the H616 and the new A523 require some tiny changes in this sequence, and the different SoCs also feature some extra bits here and there, which we should not just clear. So factor out the PLL setup routine, and make it follow the manual's suggestion. This will read the PLL register at the beginning, then tweak the bits we need to manipulate, and writes the register several times on the way. This allows to cover the specific bits for different SoCs. Besides improving the reliability of the PLL setup, this helps with the A523, which requires *three* CPU PLLs to be programmed. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'drivers/ddr')
0 files changed, 0 insertions, 0 deletions