]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: versal: Fix the function versal_clock_ref
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Tue, 12 Sep 2023 03:30:55 +0000 (09:00 +0530)
committerMichal Simek <michal.simek@amd.com>
Thu, 21 Sep 2023 11:20:11 +0000 (13:20 +0200)
commitc7cce2606d252a83e72655bb595d7ff4a267615c
treeacbaecb3332722774f971d21b796de54656d6865
parentdf2ed08b2df708a9f343aa4f47954c90433e11c2
clk: versal: Fix the function versal_clock_ref

For reference clocks, PM_CLK_GET_PARENT call is not allowed.
PM_CLK_GET_PARENT only allowed for MUX clocks. Rename the
versal_clock_ref() with versal_clock_get_ref_rate() for better
readability. Fix the versal_clock_get_ref_rate function by
passing the parent_id, and check whether the parent_id
belongs to ref_clk or pl_alt_ref_clk.
Also adding the function versal_clock_get_fixed_factor_rate()
if the clk_id belongs to the fixed factor clock.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20230912033055.2549-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/clk/clk_versal.c