clk: axi-clkgen: Correctly handle nocount bit in recalc_rate()
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 5 Sep 2017 09:32:40 +0000 (11:32 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 22 Dec 2017 02:07:11 +0000 (18:07 -0800)
commit063578dc5f407f67d149133818efabe457daafda
treecf1ab0b9a47d56e7601b1fef2ae598aaae29cf25
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323
clk: axi-clkgen: Correctly handle nocount bit in recalc_rate()

If the nocount bit is set the divider is bypassed and the settings for the
divider count should be ignored and a divider value of 1 should be assumed.
Handle this correctly in the driver recalc_rate() callback.

While the driver sets up the part so that the read back dividers values
yield the correct result the power-on reset settings of the part might not
reflect this and hence calling e.g. clk_get_rate() without prior calls to
clk_set_rate() will yield the wrong result.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-axi-clkgen.c