clk: zynqmp: Add support for clock with CLK_DIVIDER_POWER_OF_TWO flag
authorTejas Patel <tejas.patel@xilinx.com>
Thu, 5 Dec 2019 06:35:59 +0000 (22:35 -0800)
committerStephen Boyd <sboyd@kernel.org>
Thu, 23 Jan 2020 21:25:37 +0000 (13:25 -0800)
commit34bbe036170785bd288d8a74573ee8ad7946f4a1
treeb1a8079be2cfff78ebc8c07e71e2bf08656a2f2f
parent4ebd92d2e228ceb33bafa273fd9cb2b16615cdd4
clk: zynqmp: Add support for clock with CLK_DIVIDER_POWER_OF_TWO flag

Existing clock divider functions is not checking for
base of divider. So, if any clock divider is power of 2
then clock rate calculation will be wrong.

Add support to calculate divider value for the clocks
with CLK_DIVIDER_POWER_OF_TWO flag.

Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Link: https://lkml.kernel.org/r/1575527759-26452-7-git-send-email-rajan.vaja@xilinx.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/zynqmp/divider.c