]> git.baikalelectronics.ru Git - kernel.git/commit
clk: pistachio: Fix 32bit integer overflows
authorZdenko Pulitika <zdenko.pulitika@imgtec.com>
Wed, 26 Aug 2015 16:11:37 +0000 (17:11 +0100)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 26 Aug 2015 18:34:28 +0000 (11:34 -0700)
commit057c5a8eb7ed89155faa9c89ffa86a7155f4c71e
tree4cf8b9e4aa9a722ce259d346ac1603155d3c5309
parente68feb511238a759e8f53651174fb2066835ebaa
clk: pistachio: Fix 32bit integer overflows

This commit fixes 32bit integer overflows throughout the pll driver
(i.e. wherever the result of integer multiplication may exceed the
range of u32).

One of the functions affected by this problem is .recalc_rate. It
returns incorrect rate for some pll settings (not for all though)
which in turn results in the incorrect rate setup of pll's child
clocks.

Fixes: 437511c5a396a("CLK: Pistachio: Add PLL driver")
Cc: <stable@vger.kernel.org> # 4.1
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Zdenko Pulitika <zdenko.pulitika@imgtec.com>
Signed-off-by: Govindraj Raja <govindraj.raja@imgtec.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/pistachio/clk-pll.c
drivers/clk/pistachio/clk.h