linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Varadarajan, Charulatha" <charu@ti.com>
To: Kevin Hilman <khilman@ti.com>
Cc: linux-omap@vger.kernel.org, tony@atomide.com, paul@pwsan.com
Subject: Re: [PATCH 2/5] OMAP: GPIO: use pwrdmn name to find wkup dmn GPIO
Date: Sat, 5 Mar 2011 09:51:12 +0430	[thread overview]
Message-ID: <AANLkTikziwQBwPVOMxbQaTj5Oa-UAc38Eb87jq_QAHSD@mail.gmail.com> (raw)
In-Reply-To: <8762ryftbs.fsf@ti.com>

On Sat, Mar 5, 2011 at 02:21, Kevin Hilman <khilman@ti.com> wrote:
> Charulatha V <charu@ti.com> writes:
>
>> In omap3, save/restore context is implemented for GPIO
>> banks 2-6 as GPIO bank1 is in wakeup domain. Instead
>> of identifying bank's power domain by bank id, make use
>> of powerdomain name itself.
>>
>> For this, omap_hwmod_get_pwrdm() is used. omap_device_get_pwrdm()
>> could not be used as the pwrdm information needs to be filled
>> in pdata. But omap_device_get_pwrdm() can be used only after
>> omap_device_build() call.
>>
>> Signed-off-by: Charulatha V <charu@ti.com>
>>
>> Tested-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>> (2430-SDP testing)
>
> I like the idea of this change, but not the implementation...
>
> [...]
>
>> @@ -1865,16 +1867,15 @@ static int workaround_enabled;
>>  void omap2_gpio_prepare_for_idle(int off_mode)
>>  {
>>       int i, c = 0;
>> -     int min = 0;
>>
>> -     if (cpu_is_omap34xx())
>> -             min = 1;
>> -
>> -     for (i = min; i < gpio_bank_count; i++) {
>> +     for (i = 0; i < gpio_bank_count; i++) {
>>               struct gpio_bank *bank = &gpio_bank[i];
>>               u32 l1 = 0, l2 = 0;
>>               int j;
>>
>> +             if (!strcmp(bank->pwrdm_name, "wkup_pwrdm"))
>> +                     continue;
>> +
>
> This adds a string compare for every bank during every idle
> transistion (and every resume.)  That's a lot of unneeded overhead.
>
> I'd rather see a per-bank flag 'looses_context' or something that can be
> checked more efficiently in this fast path.  This flag can be set based
> on the powerdomain name in the device init code.

This looks better. Will do the needful.
One question, can "looses_context" be made as part of dev_attr?

>
> Kevin
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-03-05  5:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 10:57 [PATCH 0/5] OMAP: GPIO: use PM runtime framework Charulatha V
2011-02-28 10:57 ` [PATCH 1/5] OMAP: GPIO: make gpio_context part of gpio_bank structure Charulatha V
2011-02-28 10:57 ` [PATCH 2/5] OMAP: GPIO: use pwrdmn name to find wkup dmn GPIO Charulatha V
2011-03-04 21:51   ` Kevin Hilman
2011-03-05  5:21     ` Varadarajan, Charulatha [this message]
2011-03-07 18:56       ` Kevin Hilman
2011-03-08  2:25         ` Paul Walmsley
2011-03-08  5:45           ` Varadarajan, Charulatha
2011-02-28 10:57 ` [PATCH 3/5] OMAP4: GPIO: save/restore context Charulatha V
2011-02-28 10:57 ` [PATCH 4/5] OMAP: GPIO: call save/restore ctxt from GPIO driver Charulatha V
2011-03-04 22:20   ` Kevin Hilman
2011-03-05  5:15     ` Varadarajan, Charulatha
2011-02-28 10:57 ` [PATCH 5/5] OMAP: GPIO: use PM runtime framework Charulatha V
2011-03-04 22:59   ` Kevin Hilman
2011-03-05  5:10     ` Varadarajan, Charulatha
2011-03-07 18:55       ` Kevin Hilman
2011-03-08 15:05         ` Varadarajan, Charulatha
2011-03-08 18:23           ` Kevin Hilman
2011-03-09  1:24             ` Varadarajan, Charulatha
2011-03-09 10:23               ` Varadarajan, Charulatha

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=AANLkTikziwQBwPVOMxbQaTj5Oa-UAc38Eb87jq_QAHSD@mail.gmail.com \
    --to=charu@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.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 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).