mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Sumit Gupta <sumitg@nvidia.com>, <linux-pm@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: tegra186: Fix get frequency callback
Date: Mon, 16 Nov 2020 15:55:23 +0000	[thread overview]
Message-ID: <c4c384cd-2d8f-6f19-cd6b-18450cbf957b@nvidia.com> (raw)
In-Reply-To: <20201104093349.l3r3eftwyvaoqjf2@vireshk-i7>

Hi Rafael,

On 04/11/2020 09:33, Viresh Kumar wrote:
> On 03-11-20, 11:55, Jon Hunter wrote:
>> Commit b89c01c96051 ("cpufreq: tegra186: Fix initial frequency")
>> implemented the CPUFREQ 'get' callback to determine the current
>> operating frequency for each CPU. This implementation used a simple
>> looked up to determine the current operating frequency. The problem
>> with this is that frequency table for different Tegra186 devices may
>> vary and so the default boot frequency for Tegra186 device may or may
>> not be present in the frequency table. If the default boot frequency is
>> not present in the frequency table, this causes the function
>> tegra186_cpufreq_get() to return 0 and in turn causes cpufreq_online()
>> to fail which prevents CPUFREQ from working.
>>
>> Fix this by always calculating the CPU frequency based upon the current
>> 'ndiv' setting for the CPU. Note that the CPU frequency for Tegra186 is
>> calculated by reading the current 'ndiv' setting, multiplying by the
>> CPU reference clock and dividing by a constant divisor.
>>
>> Fixes: b89c01c96051 ("cpufreq: tegra186: Fix initial frequency")
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>>  drivers/cpufreq/tegra186-cpufreq.c | 33 +++++++++++++++++++-----------
>>  1 file changed, 21 insertions(+), 12 deletions(-)
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Rafael: This needs to go in the next rc and so I am not applying it
> in my tree as this is the only fix I have for now.


Are you able to pick this up for v5.10 fixes?

Thanks
Jon

-- 
nvpublic

  reply	other threads:[~2020-11-16 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 11:55 Jon Hunter
2020-11-04  9:33 ` Viresh Kumar
2020-11-16 15:55   ` Jon Hunter [this message]
2020-11-17  4:36     ` Viresh Kumar

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=c4c384cd-2d8f-6f19-cd6b-18450cbf957b@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sumitg@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®