]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: zynqmp: fix check for fractional clock
authorMichael Tretter <m.tretter@pengutronix.de>
Tue, 19 Mar 2019 10:01:46 +0000 (11:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:45:07 +0000 (06:45 -0700)
commit9f69f7e7186a6388cf2dc199e7fcac174a4c32f5
tree28eaf26994e092d346bcb95d44980d041799a17f
parent03492b8e72c2342c2c3f8c25a97b2756db717a7d
clk: zynqmp: fix check for fractional clock

[ Upstream commit c06e64407e031e71c67f45f07981510ca4c880a1 ]

The firmware sets BIT(13) in clkflag to mark a divider as fractional
divider. The clock driver copies the clkflag straight to the flags of
the common clock framework. In the common clk framework flags, BIT(13)
is defined as CLK_DUTY_CYCLE_PARENT.

Add a new field to the zynqmp_clk_divider to specify if a divider is a
fractional devider. Set this field based on the clkflag when registering
a divider.

At the same time, unset BIT(13) from clkflag when copying the flags to
the common clk framework flags.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/zynqmp/divider.c