drivers: clk: zynqmp: update divider round rate logic
authorJay Buddhabhatti <jay.buddhabhatti@amd.com>
Wed, 29 Nov 2023 11:29:16 +0000 (03:29 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:37 +0000 (15:35 -0800)
commit37b67480609f38293452a161f401d25f178bca65
treef384b8d0359713b068c9f3b74d2d698485cddb61
parent9b2dcd1b38c2f75e5845e5900f321cea3299636d
drivers: clk: zynqmp: update divider round rate logic

[ Upstream commit 1fe15be1fb613534ecbac5f8c3f8744f757d237d ]

Currently zynqmp divider round rate is considering single parent and
calculating rate and parent rate accordingly. But if divider clock flag
is set to SET_RATE_PARENT then its not trying to traverse through all
parent rate and not selecting best parent rate from that. So use common
divider_round_rate() which is traversing through all clock parents and
its rate and calculating proper parent rate.

Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver")
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Link: https://lore.kernel.org/r/20231129112916.23125-3-jay.buddhabhatti@amd.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/zynqmp/divider.c