linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: Gautham R Shenoy <ego@linux.vnet.ibm.com>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	Anton Blanchard <anton@samba.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Subject: Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform
Date: Thu, 27 Mar 2014 15:41:37 +0530	[thread overview]
Message-ID: <20140327101137.GA8747@dirshya.in.ibm.com> (raw)
In-Reply-To: <20140327093050.GA27777@in.ibm.com>

* Gautham R Shenoy <ego@linux.vnet.ibm.com> [2014-03-27 15:00:50]:

[snip]
 
> > > +       u32 len_ids, len_freqs;
> > > +
> > > +       power_mgt = of_find_node_by_path("/ibm,opal/power-mgt");
> > > +       if (!power_mgt) {
> > > +               pr_warn("power-mgt node not found\n");
> > > +               return -ENODEV;
> > > +       }
> > > +
> > > +       if (of_property_read_u32(power_mgt, "ibm,pstate-min", &pstate_min)) {
> > > +               pr_warn("ibm,pstate-min node not found\n");
> > > +               return -ENODEV;
> > > +       }
> > > +
> > > +       if (of_property_read_u32(power_mgt, "ibm,pstate-max", &pstate_max)) {
> > > +               pr_warn("ibm,pstate-max node not found\n");
> > > +               return -ENODEV;
> > > +       }
> > 
> > Why do you need to get these from DT? And not find that yourself here instead?
> >
> 
> Well, I think we can obtain a more accurate value from the DT which
> would have already computed it. But I'll let vaidy answer this.

DT provides the values that we should use.  Ideally these are the
upper and lower limits of the PState table,  however as per the
platform spec, we should use the PState IDs between these limits.  We
would like to parse it and keep it in the driver for debug purposes.

The platform exports this info in the DT to be more explicit and not
have a strong dependency on the PState numbering or PState table
itself.  In the driver we parse it for debug/validation purpose.

--Vaidy

  parent reply	other threads:[~2014-03-27 10:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 16:55 [PATCH v4] powernv: Dynamic Frequency Scaling Enablement Gautham R. Shenoy
2014-03-26 16:55 ` [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform Gautham R. Shenoy
2014-03-27  3:56   ` Anton Blanchard
2014-03-27  6:39   ` Viresh Kumar
2014-03-27  9:30     ` Gautham R Shenoy
2014-03-27  9:59       ` Viresh Kumar
2014-03-27 10:21         ` Srivatsa S. Bhat
2014-03-27 10:23           ` Viresh Kumar
2014-03-27 11:20         ` Gautham R Shenoy
2014-03-27 11:29           ` Viresh Kumar
2014-03-27 12:56           ` Benjamin Herrenschmidt
2014-03-27 10:11       ` Vaidyanathan Srinivasan [this message]
2014-03-27 10:22         ` Viresh Kumar
2014-03-27 11:12       ` Benjamin Herrenschmidt
2014-03-28  5:25       ` Viresh Kumar
2014-03-27  5:38 ` [PATCH v4] powernv: Dynamic Frequency Scaling Enablement Viresh Kumar
2014-03-27  6:28   ` Benjamin Herrenschmidt
2014-03-27  6:42     ` 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=20140327101137.GA8747@dirshya.in.ibm.com \
    --to=svaidy@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rjw@rjwysocki.net \
    --cc=srivatsa.bhat@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).