From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Cousson, Benoit" <b-cousson@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Premi, Sanjeev" <premi@ti.com>, "Menon, Nishanth" <nm@ti.com>
Subject: Re: Question on OPP table handling
Date: Tue, 06 Oct 2009 06:29:03 -0700 [thread overview]
Message-ID: <87skdwslb4.fsf@deeprootsystems.com> (raw)
In-Reply-To: <74583B8642AB8841B30447520659FCA9DDAEF27A@dnce01.ent.ti.com> (Benoit Cousson's message of "Tue\, 6 Oct 2009 10\:42\:22 +0200")
"Cousson, Benoit" <b-cousson@ti.com> writes:
> Hi Kevin,
>
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>> owner@vger.kernel.org] On Behalf Of Nishanth Menon
>> Sent: Monday, October 05, 2009 7:19 PM
>> To: linux-omap@vger.kernel.org
>> Cc: Premi, Sanjeev; Kevin H
>> Subject: Re: Question on OPP table handling
>>
>> Kevin Hilman had written, on 10/05/2009 11:56 AM, the following:
>> > "Premi, Sanjeev" <premi@ti.com> writes:
>> >
>> >>> -----Original Message-----
>> >>> From: Nishanth Menon [mailto:menon.nishanth@gmail.com]
>> >>> Sent: Saturday, October 03, 2009 8:35 PM
>> >>> To: Premi, Sanjeev
>> >>> Cc: linux-omap@vger.kernel.org
>> >>> Subject: Question on OPP table handling
>> >>>
>> >>> Sanjeev Premi said the following on 10/01/2009 01:03 PM:
>> >>>> +struct omap_opp omap3_mpu_rate_table[] = {
>> >>>> + {0, 0, 0},
>> >>>> + /*OPP1*/
>> >>>> + {S125M, VDD1_OPP1, 0x1E},
>> >>>> + /*OPP2*/
>> >>>> + {S250M, VDD1_OPP2, 0x26},
>> >>>> + /*OPP3*/
>> >>>> + {S500M, VDD1_OPP3, 0x30},
>> >>>> + /*OPP4*/
>> >>>> + {S550M, VDD1_OPP4, 0x36},
>> >>>> + /*OPP5*/
>> >>>> + {S600M, VDD1_OPP5, 0x3C},
>> >>>> +};
>> >>>>
>> >>> For those involved,
>> >>> if we wanted to convert omap3_mpu_table[] into
>> >>> *omap3_mpu_table so that
>> >>> we dynamically initialize it based on cpu type - what would be the
>> >>> recommendations?
>> >> Nishanth,
>> >>
>> >> Good idea!
>> >>
>> >> As a table, previous patch enables it (not as intent, but due to
>> syntax):
>> >>
>> >> > +/* struct omap_opp_table - View OPP table as an object
>> >> > + * @min: Minimum OPP id
>> >> > + * @max: Maximim OPP id
>> >> > + * @opps: Pointer to array defining the OPPs.
>> >> > + *
>> >> > + * An OPP table has varied length. Knowing minimum and maximum
>> >> > + * OPP ids allow easy traversal.
>> >> > + */
>> >> > +struct omap_opp_table {
>> >> > + u8 min;
>> >> > + u8 max;
>> >> > + struct omap_opp* opps;
>> >> > +};
>> >>
>> >> But now, I think it would be good to have an API that can fill an
>> opp_table:
>> >>
>> >> int add_opp_definition(u8 id, u32 freq, u16 vsel);
>> >>
>> >> ...and, if an array is preferred, length can be set as:
>> >> int set_opp_table_length (u8 max);
>> >
>> > I'm all for dynamic OPP setting, but not as an array. A list should
>> > probably be used.
>>
>> Won't a list implementation cause more than necessary overhead? I agree
>> that something like set_opp_table_length probably might be redundant in
>> that case.
>
> I'm aligned with Nishanth. I think a static table with the possibility to disable some entry is good enough to deal with most of the OPPs we have on OMAP3 and we will have to handle on OMAP4.
>
> OPPs are defined during silicon characterization, and should not be changed dynamically (in theory).
>
> Do you have something in mind that might justify a dynamic management?
>
Ultimately, I don't really care what the data structure used is.
My primary concern is that at run-time (not just boot time) OPPs can
be disabled/invalidated so that they are not available to DVFS.
There are many reasons for this
- chip bugs
- CPUfreq policies can disable/enable certain OPPs
- speed-rated silicon
- thermal management
- etc.
Kevin
next prev parent reply other threads:[~2009-10-06 13:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 18:03 [PATCHv2 1/1] OMAP3: PM: Functions to get freq from opp and vice-versa Sanjeev Premi
2009-10-03 15:04 ` Question on OPP table handling Nishanth Menon
2009-10-05 13:09 ` Premi, Sanjeev
2009-10-05 16:56 ` Kevin Hilman
2009-10-05 17:19 ` Nishanth Menon
2009-10-06 8:06 ` Shilimkar, Santosh
2009-10-06 8:44 ` Premi, Sanjeev
2009-10-06 9:19 ` Shilimkar, Santosh
2009-10-06 8:42 ` Cousson, Benoit
2009-10-06 8:52 ` Premi, Sanjeev
2009-10-06 11:44 ` Nishanth Menon
2009-10-06 12:00 ` Dasgupta, Romit
2009-10-06 12:04 ` Nishanth Menon
2009-10-06 12:10 ` Cousson, Benoit
2009-10-06 12:14 ` Dasgupta, Romit
2009-10-06 12:52 ` Cousson, Benoit
2009-10-09 0:41 ` Nishanth Menon
2009-10-06 12:21 ` Dasgupta, Romit
2009-10-06 12:43 ` Shilimkar, Santosh
2009-10-06 13:29 ` Kevin Hilman [this message]
2009-10-09 15:19 ` [PATCHv2 1/1] OMAP3: PM: Functions to get freq from opp and vice-versa Kevin Hilman
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=87skdwslb4.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=premi@ti.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.