From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Gopinath, Thara" <thara@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"paul@pwsan.com" <paul@pwsan.com>,
"Cousson, Benoit" <b-cousson@ti.com>,
"Sripathy, Vishwanath" <vishwanath.bs@ti.com>,
"Sawant, Anand" <sawant@ti.com>
Subject: Re: [PATCH v4 1/9] OMAP3: PM: Adding voltage driver support for OMAP3
Date: Mon, 15 Nov 2010 11:43:49 -0800 [thread overview]
Message-ID: <87bp5qnzii.fsf@deeprootsystems.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB035EFF4E51@dbde02.ent.ti.com> (Thara Gopinath's message of "Mon, 15 Nov 2010 16:11:47 +0530")
"Gopinath, Thara" <thara@ti.com> writes:
>>>
[...]
>>>
>>>cpu_is_* checks are only acceptable at init time. This one happens
>>>during every scale. These VC settings should be set at init time only.
>>>
>>>Same issue with forceupdate_scale.
>
> These masks are needed only in vc bypass voltage scaling API. I was
> thinking that for using in just one API I need not maintain these
> variables in the generic vdd structure. But yes this will add a
> cpu_is_* check in this API. Is it preferred to have these variables
> defined in the common vdd structures and populated during init even if
> used only in one API?
Yes.
[...]
>>>> +void omap_vp_enable(struct voltagedomain *voltdm)
>>>> +{
>>>> + struct omap_vdd_info *vdd;
>>>> + u32 vpconfig;
>>>> +
>>>> + if (!voltdm || IS_ERR(voltdm)) {
>>>> + pr_warning("%s: VDD specified does not exist!\n", __func__);
>>>> + return;
>>>> + }
>>>> +
>>>> + vdd = container_of(voltdm, struct omap_vdd_info, voltdm);
>>>> +
>>>> + /* If VP is already enabled, do nothing. Return */
>>>> + if (voltage_read_reg(vdd->vp_offs.vpconfig) &
>>>> + vdd->vp_reg.vpconfig_vpenable)
>>>> + return;
>>>
>>>Minor: is a register access here required? Why not just keep an
>>>'vp_enabled' flag as part of the vdd struct?
>
> I do not want to have the complications of maintaining a flag and
> ensuring exclusivity.
Whether you use a flag or a register access, the ability to ensure
exclusivity does not change.
> But do you think having a register read here is bad?
Yes.
s/bad/unnecessary/
> Latency cannot be much as it is a single register read. If you really
> think we should have a flag, I can change it.
The PRCM is on L4, so accesses to PRCM registers are all slow and should
be avoided if possible. This is an easy case where a register access
can be prevented simply by caching.
Kevin
next prev parent reply other threads:[~2010-11-15 19:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 16:10 [PATCH v4 0/9] OMAP3: Adding Smartreflex and Voltage driver support Thara Gopinath
2010-10-27 16:10 ` [PATCH v4 1/9] OMAP3: PM: Adding voltage driver support for OMAP3 Thara Gopinath
2010-11-10 18:59 ` Kevin Hilman
2010-11-15 10:47 ` Gopinath, Thara
[not found] ` <FCCFB4CDC6E5564B9182F639FC356087034C012076@dbde02.ent.ti.com>
2010-11-15 14:55 ` Gopinath, Thara
[not found] ` <87hbfp9gli.fsf@deeprootsystems.com>
[not found] ` <5A47E75E594F054BAF48C5E4FC4B92AB035EFF4E51@dbde02.ent.ti.com>
2010-11-15 19:43 ` Kevin Hilman [this message]
2010-12-02 6:13 ` Gopinath, Thara
2010-10-27 16:10 ` [PATCH v4 2/9] OMAP3: PM: Adding smartreflex driver support Thara Gopinath
2010-10-27 16:10 ` [PATCH v4 3/9] OMAP3: PM: Adding smartreflex device file Thara Gopinath
2010-10-28 5:38 ` Varadarajan, Charulatha
2010-10-28 15:26 ` Gopinath, Thara
2010-10-29 4:48 ` Varadarajan, Charulatha
2010-10-27 16:10 ` [PATCH v4 4/9] OMAP3: PM: Adding smartreflex hwmod data Thara Gopinath
2010-10-27 16:10 ` [PATCH v4 5/9] OMAP3: PM: Adding smartreflex class3 driver Thara Gopinath
2010-10-27 16:10 ` [PATCH v4 6/9] OMAP3: PM: Adding T2 enabling of smartreflex support Thara Gopinath
2010-10-27 16:10 ` [PATCH v4 7/9] OMAP3: PM: Adding debug support to Voltage and Smartreflex drivers Thara Gopinath
2010-11-10 19:12 ` Kevin Hilman
2010-11-15 11:00 ` Gopinath, Thara
2010-11-15 22:12 ` Kevin Hilman
2010-12-08 16:18 ` Gopinath, Thara
2010-12-08 16:34 ` Nishanth Menon
2010-12-09 9:43 ` Gopinath, Thara
2010-12-09 11:23 ` Nishanth Menon
2010-12-09 14:13 ` Gopinath, Thara
2010-12-09 17:19 ` Kevin Hilman
2010-12-09 17:22 ` Nishanth Menon
2010-10-27 16:10 ` [PATCH v4 8/9] OMAP3: PM: Program correct init voltages for VDD1 and VDD2 Thara Gopinath
2010-10-27 16:10 ` [PATCH v4 9/9] OMAP3: PM: Register TWL4030 pmic info with the voltage driver Thara Gopinath
2010-10-27 17:21 ` [PATCH v4 0/9] OMAP3: Adding Smartreflex and Voltage driver support Nishanth Menon
2010-10-28 15:32 ` Gopinath, Thara
2010-11-10 19:03 ` 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=87bp5qnzii.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=sawant@ti.com \
--cc=thara@ti.com \
--cc=vishwanath.bs@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.