From: Alex Tran <alex.t.tran@gmail.com>
To: pdeschrijver@nvidia.com, pgaikwad@nvidia.com,
mturquette@baylibre.com, sboyd@kernel.org,
thierry.reding@gmail.com, jonathanh@nvidia.com
Cc: linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, Alex Tran <alex.t.tran@gmail.com>
Subject: [PATCH v1] clk: tegra: clk-dfll: scale force_val with coefficient according to whether cg_scale is set
Date: Sun, 26 Oct 2025 16:18:59 -0700 [thread overview]
Message-ID: <20251026231859.823231-1-alex.t.tran@gmail.com> (raw)
force_val was hard coded to use a coefficient of 128,
regardless of the cg_scale configuration. This should instead match the
DFLL_PARAMS_CG_SCALE bit, use a coefficient of 128 when
cg_scale is set, or 1 when not set.
Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
---
drivers/clk/tegra/clk-dfll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
index 22dc29432eff..3362983eedcf 100644
--- a/drivers/clk/tegra/clk-dfll.c
+++ b/drivers/clk/tegra/clk-dfll.c
@@ -882,7 +882,7 @@ static void dfll_set_frequency_request(struct tegra_dfll *td,
{
u32 val = 0;
int force_val;
- int coef = 128; /* FIXME: td->cg_scale? */
+ int coef = td->cg_scale ? 128 : 1;
force_val = (req->lut_index - td->lut_safe) * coef / td->cg;
force_val = clamp(force_val, FORCE_MIN, FORCE_MAX);
--
2.51.0
reply other threads:[~2025-10-26 23:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251026231859.823231-1-alex.t.tran@gmail.com \
--to=alex.t.tran@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).