Browse Source

Merge tag 'meson-clk-for-v4.16-3' of git://github.com/BayLibre/clk-meson into clk-meson

Pull Amlogic clk driver update from Jerome Brunet:

 - Fix overflow in the mpll driver on 32bits arch

* tag 'meson-clk-for-v4.16-3' of git://github.com/BayLibre/clk-meson:
  clk: meson: mpll: use 64-bit maths in params_from_rate
Stephen Boyd 7 years ago
parent
commit
348c898cb8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/clk/meson/clk-mpll.c

+ 1 - 1
drivers/clk/meson/clk-mpll.c

@@ -98,7 +98,7 @@ static void params_from_rate(unsigned long requested_rate,
 		*sdm = SDM_DEN - 1;
 		*sdm = SDM_DEN - 1;
 	} else {
 	} else {
 		*n2 = div;
 		*n2 = div;
-		*sdm = DIV_ROUND_UP(rem * SDM_DEN, requested_rate);
+		*sdm = DIV_ROUND_UP_ULL((u64)rem * SDM_DEN, requested_rate);
 	}
 	}
 }
 }