From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abelvesa@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
Kevin Groeneveld <kgroeneveld@lenbrook.com>,
Michael Turquette <mturquette@baylibre.com>,
NXP Linux Team <linux-imx@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Kevin Groeneveld <kgroeneveld@lenbrook.com>
Subject: Re: [PATCH] clk: imx: pll14xx: fix recalc_rate for negative kdiv
Date: Fri, 17 Feb 2023 17:44:04 -0800 [thread overview]
Message-ID: <25835181be099ba9b101d185eb5563d1.sboyd@kernel.org> (raw)
In-Reply-To: <20221210203835.9714-1-kgroeneveld@lenbrook.com>
Quoting Kevin Groeneveld (2022-12-10 12:38:35)
> kdiv is a signed 16 bit value in the DEV_CTL1 register. Commit
> 53990cf9d5b4 ("clk: imx: pll14xx: consolidate rate calculation") changed
> the kdiv variable from a short int to just int. When the value read from
> the DIV_CTL1 register is assigned directly to an int the sign of the value
> is lost resulting in incorrect results when the value is negative. Adding
> a s16 cast to the register value fixes the issue.
>
> Fixes: 53990cf9d5b4 ("clk: imx: pll14xx: consolidate rate calculation")
> Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com>
> ---
Applied to clk-fixes
prev parent reply other threads:[~2023-02-18 1:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-10 20:38 [PATCH] clk: imx: pll14xx: fix recalc_rate for negative kdiv Kevin Groeneveld
2023-02-10 23:24 ` Stephen Boyd
2023-02-14 14:51 ` Kevin Groeneveld
2023-02-15 12:24 ` Abel Vesa
2023-02-18 1:44 ` Stephen Boyd [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=25835181be099ba9b101d185eb5563d1.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=abelvesa@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kgroeneveld@lenbrook.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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