From: Stephen Warren <swarren@wwwdotorg.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Nishanth Menon <nm@ti.com>,
Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Pawel Moll <Pawel.Moll@arm.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [RFC PATCH 1/2] PM / OPP: add support to specify phandle of another node for OPP
Date: Wed, 31 Jul 2013 15:59:50 -0600 [thread overview]
Message-ID: <51F988D6.6090104@wwwdotorg.org> (raw)
In-Reply-To: <20130731161103.GS29859@e106331-lin.cambridge.arm.com>
On 07/31/2013 10:11 AM, Mark Rutland wrote:
> On Wed, Jul 31, 2013 at 04:58:22PM +0100, Nishanth Menon wrote:
>> On 07/31/2013 10:29 AM, Mark Rutland wrote:
>>> On Wed, Jul 31, 2013 at 03:46:34PM +0100, Nishanth Menon wrote:
...
>>>> Let me try to explain since SoCs such as OMAP/AM family dont make life
>>>> trivial :)..
>>>>
>>>> An legacy example[1][2]
>>>>
>>>> SoC DM explains that the chip is capable of X opps:
>>>> opp1, 2 - for all devices
>>>> opp1,2, 3 - if efuse bit X@y is set
>>>> opp1,2,3,4 - if efuse bit X@y is set AND Board design meets SoC vendors
>>>> requirements (including additional features A, B is enabled).
>>>>
>>>> So, the same chip family has a hardware feature - not just as a pm
>>>> policy of selecting among a set of OPPs which opp to work on, but the
>>>> actual set of OPPs are actually options in themselves that is selected
>>>> based on board's SoC selection.
>>>
>>> This sounds like we're describing a set of features not applicable to
>>> the device, then removing them, rather than only describing those
>>> features applicable to the device. If you have to probe to figure out
>>> which values in the dt are applicable, I'm not sure I see the benefit of
>>> describing said values in dt.
>>
>> Device has *options* of operating points sets it can operate at. It is
>> not like "these are not applicable" for the device.
>
> I don't follow.
>
> In the example above, if efuse bit X@y is not set, opp3 is not
> applicable, but we're describing it in dt. It's not an option for the
> particular device, yet it appears in the device's dt.
>
> For opp4, it's even worse, as you're suggesting we describe an option
> for the device that requires the driver to use some additional platform
> knowledge to come to the conclusion that it cannot use. That sounds like
> device knowledge internal to a driver, not how you describe an instance
> of a device to an OS.
>
> Have I misunderstood something here?
From the kernel's perspective here, a simple approach would be to say
the the DT passed to the kernel must contain exactly the set of OPPs
that the kernel should use. If this requires probing HW (fuses, board
knowledge, etc.), then the bootloader/... must do that and fix up the DT
to correctly represent the board at boot time (or choose the correct DT
from a set of options in flash) or whoever flashed the board must have
simply put the correct DT onto the board.
Of course, that simply pushes back the issue onto the flashing utility
or bootloader. Perhaps pushing stuff back there isn't a good holistic
solution, since we only get a clean kernel by making life suck for
someone else, and we'd perhaps better optimize the entire SW stack.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Nishanth Menon <nm@ti.com>,
Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Pawel Moll <Pawel.Moll@arm.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [RFC PATCH 1/2] PM / OPP: add support to specify phandle of another node for OPP
Date: Wed, 31 Jul 2013 15:59:50 -0600 [thread overview]
Message-ID: <51F988D6.6090104@wwwdotorg.org> (raw)
In-Reply-To: <20130731161103.GS29859@e106331-lin.cambridge.arm.com>
On 07/31/2013 10:11 AM, Mark Rutland wrote:
> On Wed, Jul 31, 2013 at 04:58:22PM +0100, Nishanth Menon wrote:
>> On 07/31/2013 10:29 AM, Mark Rutland wrote:
>>> On Wed, Jul 31, 2013 at 03:46:34PM +0100, Nishanth Menon wrote:
...
>>>> Let me try to explain since SoCs such as OMAP/AM family dont make life
>>>> trivial :)..
>>>>
>>>> An legacy example[1][2]
>>>>
>>>> SoC DM explains that the chip is capable of X opps:
>>>> opp1, 2 - for all devices
>>>> opp1,2, 3 - if efuse bit X@y is set
>>>> opp1,2,3,4 - if efuse bit X@y is set AND Board design meets SoC vendors
>>>> requirements (including additional features A, B is enabled).
>>>>
>>>> So, the same chip family has a hardware feature - not just as a pm
>>>> policy of selecting among a set of OPPs which opp to work on, but the
>>>> actual set of OPPs are actually options in themselves that is selected
>>>> based on board's SoC selection.
>>>
>>> This sounds like we're describing a set of features not applicable to
>>> the device, then removing them, rather than only describing those
>>> features applicable to the device. If you have to probe to figure out
>>> which values in the dt are applicable, I'm not sure I see the benefit of
>>> describing said values in dt.
>>
>> Device has *options* of operating points sets it can operate at. It is
>> not like "these are not applicable" for the device.
>
> I don't follow.
>
> In the example above, if efuse bit X@y is not set, opp3 is not
> applicable, but we're describing it in dt. It's not an option for the
> particular device, yet it appears in the device's dt.
>
> For opp4, it's even worse, as you're suggesting we describe an option
> for the device that requires the driver to use some additional platform
> knowledge to come to the conclusion that it cannot use. That sounds like
> device knowledge internal to a driver, not how you describe an instance
> of a device to an OS.
>
> Have I misunderstood something here?
>From the kernel's perspective here, a simple approach would be to say
the the DT passed to the kernel must contain exactly the set of OPPs
that the kernel should use. If this requires probing HW (fuses, board
knowledge, etc.), then the bootloader/... must do that and fix up the DT
to correctly represent the board at boot time (or choose the correct DT
from a set of options in flash) or whoever flashed the board must have
simply put the correct DT onto the board.
Of course, that simply pushes back the issue onto the flashing utility
or bootloader. Perhaps pushing stuff back there isn't a good holistic
solution, since we only get a clean kernel by making life suck for
someone else, and we'd perhaps better optimize the entire SW stack.
next prev parent reply other threads:[~2013-07-31 21:59 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 18:00 [RFC PATCH 0/2] PM / OPP: updates to enable sharing OPPs info Sudeep KarkadaNagesha
2013-07-30 18:00 ` [RFC PATCH 1/2] PM / OPP: add support to specify phandle of another node for OPP Sudeep KarkadaNagesha
2013-07-30 18:34 ` Stephen Warren
2013-07-30 20:48 ` Nishanth Menon
2013-07-30 21:25 ` Stephen Warren
2013-07-31 11:14 ` Sudeep KarkadaNagesha
2013-07-31 14:46 ` Nishanth Menon
2013-07-31 15:28 ` Sudeep KarkadaNagesha
2013-07-31 15:53 ` Nishanth Menon
2013-07-31 16:40 ` Sudeep KarkadaNagesha
2013-07-31 19:13 ` Nishanth Menon
2013-07-31 19:55 ` Nishanth Menon
2013-07-31 15:29 ` Mark Rutland
2013-07-31 15:58 ` Nishanth Menon
2013-07-31 16:11 ` Mark Rutland
2013-07-31 16:27 ` Nishanth Menon
2013-08-01 13:54 ` Mark Rutland
2013-08-01 16:25 ` Nishanth Menon
2013-08-02 13:15 ` Mark Rutland
2013-08-06 13:45 ` Nishanth Menon
2013-08-07 16:17 ` Mark Rutland
2013-08-20 10:00 ` Sudeep KarkadaNagesha
2013-08-20 14:01 ` Nishanth Menon
2013-08-20 16:07 ` Sudeep KarkadaNagesha
2013-08-21 22:48 ` Stephen Warren
2013-08-22 11:59 ` Mark Rutland
2013-08-22 15:32 ` Sudeep KarkadaNagesha
2013-08-22 15:50 ` Mark Rutland
2013-08-22 16:28 ` Sudeep KarkadaNagesha
2013-08-23 12:26 ` Mark Rutland
2013-08-01 16:49 ` Stephen Warren
2013-08-02 13:43 ` Sudeep KarkadaNagesha
2013-08-06 13:29 ` Nishanth Menon
2013-07-31 21:59 ` Stephen Warren [this message]
2013-07-31 21:59 ` Stephen Warren
2013-07-31 21:51 ` Stephen Warren
2013-08-01 12:15 ` Nishanth Menon
2013-08-01 16:46 ` Stephen Warren
2013-07-31 10:46 ` Sudeep KarkadaNagesha
2013-07-30 18:00 ` [RFC PATCH 2/2] PM / OPP: check for existing OPP list when initialising from device tree Sudeep KarkadaNagesha
2013-07-31 16:39 ` Nishanth Menon
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=51F988D6.6090104@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=Pawel.Moll@arm.com \
--cc=Sudeep.KarkadaNagesha@arm.com \
--cc=cpufreq@vger.kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nm@ti.com \
--cc=rjw@sisk.pl \
--cc=rob.herring@calxeda.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.