summaryrefslogtreecommitdiff
path: root/drivers/clk/pistachio/clk.h
diff options
context:
space:
mode:
authorZdenko Pulitika <zdenko.pulitika@imgtec.com>2015-08-26 19:11:37 +0300
committerStephen Boyd <sboyd@codeaurora.org>2015-08-26 21:34:28 +0300
commit093affb009a3d87848e51217cd1a06ce1135633f (patch)
tree4cf8b9e4aa9a722ce259d346ac1603155d3c5309 /drivers/clk/pistachio/clk.h
parentc5a132a84a692f8d81f3b6959b98bcd959659457 (diff)
downloadlinux-093affb009a3d87848e51217cd1a06ce1135633f.tar.xz
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: 43049b0c83f17("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>
Diffstat (limited to 'drivers/clk/pistachio/clk.h')
-rw-r--r--drivers/clk/pistachio/clk.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/clk/pistachio/clk.h b/drivers/clk/pistachio/clk.h
index 52fabbc24624..8d45178dbde3 100644
--- a/drivers/clk/pistachio/clk.h
+++ b/drivers/clk/pistachio/clk.h
@@ -95,13 +95,13 @@ struct pistachio_fixed_factor {
}
struct pistachio_pll_rate_table {
- unsigned long fref;
- unsigned long fout;
- unsigned int refdiv;
- unsigned int fbdiv;
- unsigned int postdiv1;
- unsigned int postdiv2;
- unsigned int frac;
+ unsigned long long fref;
+ unsigned long long fout;
+ unsigned long long refdiv;
+ unsigned long long fbdiv;
+ unsigned long long postdiv1;
+ unsigned long long postdiv2;
+ unsigned long long frac;
};
enum pistachio_pll_type {