linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Florian Boor <florian.boor@kernelconcepts.de>
Cc: linux-omap@vger.kernel.org
Subject: Re: OMAP4460 cpufreq crashes
Date: Sat, 5 Jun 2021 08:11:26 +0300	[thread overview]
Message-ID: <YLsHfpbm8plSez2z@atomide.com> (raw)
In-Reply-To: <fe821e16-7232-2324-0b4e-1a4013f30e38@kernelconcepts.de>

Hi,

* Florian Boor <florian.boor@kernelconcepts.de> [210604 13:31]:
> Hi,
> 
> Am 10.05.21 um 13:13 schrieb Florian Boor:
> > Am 07.05.21 um 07:47 schrieb Tony Lindgren:
> >> Hmm OK, sounds like the voltages might be wrong.
> > 
> > sounds like my guess wasn't that wrong.
> 
> I did some more research and for me it more and more looks like we are missing
> the voltage transitions on frequency change completely.
> 
> I added some debug output in omap_vp_forceupdate_scale() and
> omap_vc_bypass_scale() and enabled debug output that shows the CPU clock
> requency changes. Patch and log are attached.
> 
> The interesting stuff starts in line 123 where the first frequency change happens.
> 
> Maybe I'm missing something and looking in the wrong place, but if voltage
> really never gets adapted on some devices then in the best case the device only
> wastes power...

Yup.. Sounds like the Variscite board boots at some lower opp than
what is configured for the kernel in dts. So the immediate fix would
be to either limit the max speed, or ensure voltdm_scale() gets
called on init.

> I wonder if this affects all OMAP4460 or the Variscite one only.

This affects all omap4/5 at least as we're missing the cpufreq-dt to
voltage domain support like you pointed out. See the last effort to add
kernel support for voltage domains at [0] below for more details.

I think the way to proceed here would be initially add a regulator
usable as cpu-supply for cpufreq-dt that gets the voltdm_scale() as
a platform_data pointer and parses the device tree provides opps
for supported voltages. Then eventually the legacy platform code
for voltage domains can be moved to device drivers.

Regards,

Tony

[0] https://lore.kernel.org/lkml/1392755543-28335-1-git-send-email-nm@ti.com/

      reply	other threads:[~2021-06-05  5:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 15:35 OMAP4460 cpufreq crashes Florian Boor
2021-05-07  5:47 ` Tony Lindgren
2021-05-10 11:13   ` Florian Boor
2021-06-04 13:31     ` Florian Boor
2021-06-05  5:11       ` Tony Lindgren [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=YLsHfpbm8plSez2z@atomide.com \
    --to=tony@atomide.com \
    --cc=florian.boor@kernelconcepts.de \
    --cc=linux-omap@vger.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;
as well as URLs for NNTP newsgroup(s).