linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: a0131933@ti.com (Lokesh Vutla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks
Date: Tue, 29 Sep 2015 09:23:48 +0530	[thread overview]
Message-ID: <560A0B4C.90206@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1509280822250.7947@utopia.booyaka.com>

Hi Paul,

On Monday 28 September 2015 10:05 PM, Paul Walmsley wrote:
> On Thu, 24 Sep 2015, Lokesh Vutla wrote:
> 
>> On Thursday 27 August 2015 09:51 AM, Lokesh Vutla wrote:
>>> On Thursday 23 July 2015 06:55 PM, Lokesh Vutla wrote:
>>>> This series implements lock and unlock functions for RTC and hooks
>>>> the same to DRA7 and AMx3xx hwmod.
>>>> This is dependent on the patch https://patchwork.kernel.org/patch/6578281/,
>>>> which is queued recently by Paul.
>>> Gentle ping on this series.
>> Do you have any comments on this series?
> 
> Looks pretty good.  I'm slightly concerned about the latency jitter impact 
> on -rt kernels for that local_irq_disable() section.  Looks like it could 
> hold off interrupts for ~(50 udelay ?s) + 50*((RTC register read time) + 
> 1).  But I'm not sure if preempt_enable/disable() is a good alternative 
> since a bunch of interrupt top halves could conceivably run after the RTC 
> goes non-busy and result in the RTC not being locked/unlocked. 
Agree.

> 
> Is there an RTC IP block register that the code can read, or a safe 
> sequence that the code can execute, after the RTC lock/unlock operation to 
> verify that the RTC has successfully been locked or unlocked?  If so then 
> it's probably worth converting the local_irq_disable/enable() to 
> preempt_disable/enable() and testing that, then retrying the lock/unlock 
> if it fails.
I am afraid there is no such register to verify lock or unlock. Also
these KICK registers are Write only registers so can't read back the
value. Even the driver implement the same api's for writing into registers.

One thing I can think of is that to write a known pattern to scratch pad
register and read back the value to confirm if it is locked/unlocked.
But don't think this is a good approach.

Thanks and regards,
Lokesh

      reply	other threads:[~2015-09-29  3:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 13:25 [PATCH v3 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks Lokesh Vutla
2015-07-23 13:25 ` [PATCH v3 1/3] ARM: hwmod: RTC: Add lock and unlock functions Lokesh Vutla
2015-07-23 13:25 ` [PATCH v3 2/3] ARM: DRA7: " Lokesh Vutla
2015-07-23 13:25 ` [PATCH v3 3/3] ARM: AMx3xx: " Lokesh Vutla
2015-08-27  4:21 ` [PATCH v3 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks Lokesh Vutla
2015-09-24  4:45   ` Lokesh Vutla
2015-09-28 16:35     ` Paul Walmsley
2015-09-29  3:53       ` Lokesh Vutla [this message]

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=560A0B4C.90206@ti.com \
    --to=a0131933@ti.com \
    --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 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).