From: Rhyland Klein <rklein@nvidia.com>
To: Peter De Schrijver <pdeschrijver@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org,
Andrew Bresticker <abrestic@chromium.org>,
Rhyland Klein <rklein@nvidia.com>
Subject: [PATCH 6/9] clk: tegra210: fix pllx dyn step calculation
Date: Thu, 10 Dec 2015 17:08:25 -0500 [thread overview]
Message-ID: <1449785308-19546-7-git-send-email-rklein@nvidia.com> (raw)
In-Reply-To: <1449785308-19546-1-git-send-email-rklein@nvidia.com>
The logic for calculating the input rate used when figuring out
the proper dynamic steps for pllx was incorrect. It is supposed to
be calculated using parent_rate / m but it was just using the parent
rate directly, therefore using the wrong step values.
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
---
drivers/clk/tegra/clk-tegra210.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c
index 2a7faa357130..5d8fac7052f2 100644
--- a/drivers/clk/tegra/clk-tegra210.c
+++ b/drivers/clk/tegra/clk-tegra210.c
@@ -780,13 +780,13 @@ static void pllx_get_dyn_steps(struct clk_hw *hw, u32 *step_a, u32 *step_b)
{
unsigned long input_rate;
- if (!IS_ERR_OR_NULL(hw->clk)) {
+ /* cf rate */
+ if (!IS_ERR_OR_NULL(hw->clk))
input_rate = clk_hw_get_rate(clk_hw_get_parent(hw));
- /* cf rate */
- input_rate /= tegra_pll_get_fixed_mdiv(hw, input_rate);
- } else {
+ else
input_rate = 38400000;
- }
+
+ input_rate /= tegra_pll_get_fixed_mdiv(hw, input_rate);
switch (input_rate) {
case 12000000:
--
1.9.1
next prev parent reply other threads:[~2015-12-10 22:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 22:08 [PATCH 0/9] Tegra CLK Fixes Rhyland Klein
[not found] ` <1449785308-19546-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-12-10 22:08 ` [PATCH 1/9] clk: tegra: Fix divider on VI_I2C Rhyland Klein
2015-12-10 22:08 ` [PATCH 2/9] clk: tegra210: Remove improper flags for lock_enable Rhyland Klein
2015-12-10 22:08 ` [PATCH 3/9] clk: tegra210: Fix naming of MISC registers Rhyland Klein
2015-12-10 22:08 ` [PATCH 4/9] clk: tegra: Fix the misnaming of nvenc from msenc Rhyland Klein
2015-12-10 22:08 ` [PATCH 5/9] clk: tegra: pll: Fix potential sleeping-while-atomic Rhyland Klein
2015-12-10 22:08 ` Rhyland Klein [this message]
2015-12-10 22:08 ` [PATCH 7/9] clk: tegra: pll: Do not disable PLLE when under HW control Rhyland Klein
2015-12-10 22:08 ` [PATCH 8/9] clk: tegra: pll: Fix PLLE SS config Rhyland Klein
2015-12-10 22:08 ` [PATCH 9/9] clk: tegra210: Initialize PLL_D2 to a sane rate Rhyland Klein
-- strict thread matches above, loose matches on Subject: below --
2016-01-08 18:37 [PATCH 0/9 REPOST] Tegra CLK Fixes Rhyland Klein
[not found] ` <1452278231-9546-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-08 18:37 ` [PATCH 6/9] clk: tegra210: fix pllx dyn step calculation Rhyland Klein
2016-01-08 18:45 [PATCH 0/9 REPOST] Tegra CLK Fixes Rhyland Klein
2016-01-08 18:45 ` [PATCH 6/9] clk: tegra210: fix pllx dyn step calculation Rhyland Klein
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=1449785308-19546-7-git-send-email-rklein@nvidia.com \
--to=rklein@nvidia.com \
--cc=abrestic@chromium.org \
--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=swarren@wwwdotorg.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).