From: Sam Shih <sam.shih@mediatek.com>
To: u-boot@lists.denx.de
Subject: [U-Boot,5/8] clk: mediatek: fix clock-rate overflow problem
Date: Sat, 7 Dec 2019 00:02:22 +0800 [thread overview]
Message-ID: <1575648145-23733-6-git-send-email-sam.shih@mediatek.com> (raw)
In-Reply-To: <1575648145-23733-1-git-send-email-sam.shih@mediatek.com>
This patch fix clock-rate overflow problem in mediatek
clock driver common part.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
---
drivers/clk/mediatek/clk-mtk.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 6c6b500d9b..9c30be994e 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, };
@@ -265,7 +265,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];
@@ -287,7 +287,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];
--
2.17.1
next prev parent reply other threads:[~2019-12-06 16:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 16:02 [U-Boot,0/8] Add support for MediaTek MT7622 SoC Sam Shih
2019-12-06 16:02 ` [U-Boot,1/8] ARM: MediaTek: " Sam Shih
2019-12-06 19:08 ` Tom Rini
2019-12-06 16:02 ` [U-Boot,2/8] pinctrl: mediatek: add driver for MT7622 Sam Shih
2019-12-06 16:02 ` [U-Boot,3/8] pinctrl: mediatek: add support for different pinctrl Sam Shih
2019-12-06 16:02 ` [U-Boot,4/8] clk: mediatek: add driver for MT7622 Sam Shih
2019-12-06 16:02 ` Sam Shih [this message]
2019-12-06 16:02 ` [U-Boot,6/8] power: domain: add power domain support " Sam Shih
2019-12-06 16:02 ` [U-Boot,7/8] mmc: add mmc and sd " Sam Shih
2019-12-06 16:02 ` [U-Boot,8/8] Add support for MT7622 reference board Sam Shih
2019-12-06 19:11 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1575648145-23733-6-git-send-email-sam.shih@mediatek.com \
--to=sam.shih@mediatek.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox