clk: mediatek: use unsigned type for returning the clk rate
When the clock rate needs 32 bits to store its data, the value
become corrupted because of the conversion ulong -> int -> ulong that
happens in the driver. Use ulong everywhere to avoid corrupting the
clock rates.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 6c6b500..a3b1f81 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -39,7 +39,7 @@
* this function is recursively called to find the parent to calculate
* the accurate frequency.
*/
-static int mtk_clk_find_parent_rate(struct clk *clk, int id,
+static ulong mtk_clk_find_parent_rate(struct clk *clk, int id,
const struct driver *drv)
{
struct clk parent = { .id = id, };