All of lore.kernel.org
 help / color / mirror / Atom feed
From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ux500 : decouple/recouple gic from the PRCMU
Date: Tue, 07 Feb 2012 15:15:23 +0100	[thread overview]
Message-ID: <4F3131FB.90809@linaro.org> (raw)
In-Reply-To: <4F30F594.7090607@stericsson.com>

On 02/07/2012 10:57 AM, Rickard Andersson wrote:
> On 02/07/2012 10:22 AM, Daniel Lezcano wrote:
>> On 02/07/2012 09:39 AM, Rickard Andersson wrote:
>>> On 02/06/2012 03:10 PM, Daniel Lezcano wrote:
>>>> On 02/06/2012 10:19 AM, Rickard Andersson wrote:
>>>>> Hi!
>>>>>
>>>>> Our comments:
>>>> Thanks Rickard and Jonas for your comments.
>>>>
>>>>> - function names don't match commit comment disable/enable vs
>>>>> recouple/decouple. Decouple is a better name than disable, because GIC
>>>>> is not really disabled it is just disconnected.
>>>> Ok, that makes sense.
>>>>
>>>>> - there is no reason to place these functions inside the
>>>>> db8500-prcmu.c
>>>>> file. There is so much stuff in the PRCMU register base so we can not
>>>>> have everything in one file. Why not have it as it is?
>>>> Why spread the prcmu code when it is related to the prcmu ?
>>>>
>>>> Linus ? What do you think ?
>>>>
>>>>> - why the gic_mask function?
>>>> Because the register has 31 bits reserved which could be used later
>>>> without modifying this function.
>>> This is will most likely not happen. If that happens we could add that
>>> function then. We should remove it for now.
>>>>> - The original code has been updated and now looks like this:
>>>> That is the same code, except the while loop where, if this code
>>>> assumption is correct, means we will do only one iteration in the loop.
>>> Yes, but in theory you can be stuck forever in that loop, so please
>>> remove the loop.
>> Mmmh, can you elaborate please ? I think a comment and/or an error
>> should be returned in this case, no ?
>>
> We do not need the loop. PRCMU FW does decouple of the GIC and if they
> for some reason does that at the same time (they should not) we will be
> stuck.

Sorry, but I still don't get it. What is "they" ? Do you mean one cpu 
can decouples the cpu while the other cpu recouples it ?

Taking the routine, why is needed the "read" if we don't care the return 
value ?

void ux500_pm_gic_decouple(void)
{
         prcmu_write_masked(PRCM_A9_MASK_REQ,
                            PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ,
                            PRCM_A9_MASK_REQ_PRCM_A9_MASK_REQ);

         (void)prcmu_read(PRCM_A9_MASK_REQ);

         udelay(GIC_FREEZE_DELAY); /* Wait for the GIC to freeze */
}

Thanks
   -- Daniel

-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  reply	other threads:[~2012-02-07 14:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 12:07 [PATCH] ux500 : decouple/recouple gic from the PRCMU Daniel Lezcano
2012-02-06  9:19 ` Rickard Andersson
2012-02-06 14:10   ` Daniel Lezcano
2012-02-06 17:37     ` Linus Walleij
2012-02-06 21:47       ` Daniel Lezcano
2012-02-07  8:39     ` Rickard Andersson
2012-02-07  9:22       ` Daniel Lezcano
2012-02-07  9:57         ` Rickard Andersson
2012-02-07 14:15           ` Daniel Lezcano [this message]
2012-02-07 15:25             ` Vincent Guittot

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=4F3131FB.90809@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 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.