Skip to content

Commit

Permalink
clk: mediatek: fix clock-rate overflow problem
Browse files Browse the repository at this point in the history
This patch fix clock-rate overflow problem in mediatek
clock driver common part.

Signed-off-by: Sam Shih <[email protected]>
Reviewed-by: Ryder Lee <[email protected]>
  • Loading branch information
SamShih33 authored and trini committed Jan 16, 2020
1 parent 72ab603 commit d8588ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/clk/mediatek/clk-mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, };
Expand Down Expand Up @@ -285,7 +285,7 @@ static ulong mtk_factor_recalc_rate(const struct mtk_fixed_factor *fdiv,
return rate;
}

static int mtk_topckgen_get_factor_rate(struct clk *clk, u32 off)
static ulong mtk_topckgen_get_factor_rate(struct clk *clk, u32 off)
{
struct mtk_clk_priv *priv = dev_get_priv(clk->dev);
const struct mtk_fixed_factor *fdiv = &priv->tree->fdivs[off];
Expand All @@ -307,7 +307,7 @@ static int mtk_topckgen_get_factor_rate(struct clk *clk, u32 off)
return mtk_factor_recalc_rate(fdiv, rate);
}

static int mtk_topckgen_get_mux_rate(struct clk *clk, u32 off)
static ulong mtk_topckgen_get_mux_rate(struct clk *clk, u32 off)
{
struct mtk_clk_priv *priv = dev_get_priv(clk->dev);
const struct mtk_composite *mux = &priv->tree->muxes[off];
Expand Down

0 comments on commit d8588ba

Please sign in to comment.