From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Abel Vesa <abel.vesa@nxp•com>
Cc: Stephen Boyd <sboyd@kernel•org>,
Lucas Stach <l.stach@pengutronix•de>,
Michael Turquette <mturquette@baylibre•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Abel Vesa <abelvesa@linux•com>, dl-linux-imx <linux-imx@nxp•com>
Subject: Re: [PATCH] clk: imx: Use do_div in SCCG due to 64-bit divisor
Date: Fri, 30 Nov 2018 13:17:53 +1100 [thread overview]
Message-ID: <20181130131753.7108e52a@canb.auug.org.au> (raw)
In-Reply-To: <1543535413-1256-1-git-send-email-abel.vesa@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Hi Abel,
On Thu, 29 Nov 2018 23:50:22 +0000 Abel Vesa <abel.vesa@nxp•com> wrote:
>
> --- a/drivers/clk/imx/clk-frac-pll.c
> +++ b/drivers/clk/imx/clk-frac-pll.c
> @@ -116,12 +116,13 @@ static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate,
> unsigned long *prate)
> {
> u64 parent_rate = *prate;
> - u32 divff, divfi;
> - u64 temp64;
> + u64 divff, divfi;
> + u64 temp64 = rate;
>
> parent_rate *= 8;
> rate *= 2;
> - divfi = rate / parent_rate;
> + do_div(temp64, parent_rate);
> + divfi = temp64;
Did you mean to lose the doubling of "rate" above?
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2018-11-30 2:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 22:03 linux-next: build failure after merge of the clk tree Stephen Rothwell
2018-11-29 23:50 ` [PATCH] clk: imx: Use do_div in SCCG due to 64-bit divisor Abel Vesa
2018-11-30 2:17 ` Stephen Rothwell [this message]
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=20181130131753.7108e52a@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=abel.vesa@nxp$(echo .)com \
--cc=abelvesa@linux$(echo .)com \
--cc=l.stach@pengutronix$(echo .)de \
--cc=linux-imx@nxp$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mturquette@baylibre$(echo .)com \
--cc=sboyd@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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