u-boot/drivers/clk/microchip
Conor Dooley fb103971fe clk: microchip: mpfs: convert parent rate acquistion to get_get_rate()
Currently the clock driver for PolarFire SoC takes a very naive approach
to the relationship between clocks. It reads the dt to get an input
clock, assumes that that is fixed frequency, reads the "clock-frequency"
property & uses that to set up both the "cfg" and "periph" clocks.

Simplifying for the sake of incremental fixes, the "correct" parentage for
the clocks currently supported in U-Boot is that the "cfg" clocks should
be children of the fixed frequency clock in the dt. The AHB clock is one
of these "cfg" clocks and is the parent of the "periph" clocks.

Instead of passing the clock rate of the fixed-frequency clock to the
"cfg" and "periph" registration functions and the name of the parents,
pass their actual parents & use clk_get_rate() to determine their parents
rates.

The "periph" clocks are purely gate clocks and should not be reading the
AHB clocks registers to determine their rates, as they can simply report
the output of clk_get_rate() on their parent.

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>
2022-11-15 15:37:17 +08:00
..
Kconfig clk: Add Microchip PolarFire SoC clock driver 2021-01-18 11:06:38 +08:00
Makefile clk: microchip: mpfs: convert parent rate acquistion to get_get_rate() 2022-11-15 15:37:17 +08:00
mpfs_clk.c clk: microchip: mpfs: convert parent rate acquistion to get_get_rate() 2022-11-15 15:37:17 +08:00
mpfs_clk.h clk: microchip: mpfs: convert parent rate acquistion to get_get_rate() 2022-11-15 15:37:17 +08:00
mpfs_clk_cfg.c clk: microchip: mpfs: convert parent rate acquistion to get_get_rate() 2022-11-15 15:37:17 +08:00
mpfs_clk_periph.c clk: microchip: mpfs: convert parent rate acquistion to get_get_rate() 2022-11-15 15:37:17 +08:00