]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: microchip: mpfs: fix reference clock handling
authorConor Dooley <conor.dooley@microchip.com>
Tue, 25 Oct 2022 07:58:46 +0000 (08:58 +0100)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 15 Nov 2022 07:37:17 +0000 (15:37 +0800)
commit32cfdd51630506393ca078aa36fa70248d549109
tree6875113bd82f3eeb0381ff7e26fe4b80115f924b
parentfb103971feb637809a96fe739d81fe2f887cf3ac
clk: microchip: mpfs: fix reference clock handling

The original devicetrees for PolarFire SoC messed up & defined the
msspll's output as a fixed-frequency, 600 MHz clock & used that as the
input for the clock controller node. The msspll is not a fixed
frequency clock and later devicetrees handled this properly. Check the
devicetree & if it is one of the fixed ones, register the msspll.
Otherwise, skip registering it & pass the reference clock directly to
the cfg clock registration function so that existing devicetrees are
not broken by this change.

As the MSS PLL is not a "cfg" or a "periph" clock, add a new driver for
it, based on the one in Linux.

Fixes: 2f27c9219e ("clk: Add Microchip PolarFire SoC clock driver")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Tested-by: Padmarao Begari <padmarao.begari@microchip.com>
drivers/clk/microchip/mpfs_clk.c
drivers/clk/microchip/mpfs_clk.h
drivers/clk/microchip/mpfs_clk_msspll.c [new file with mode: 0644]