Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Xiangfu Liu <xiangfu@openmobilefree.net>
Cc: Matt Turner <mattst88@gmail.com>,
	linux-mips@linux-mips.org,
	jz47xx-kernel@lists.en.qi-hardware.com,
	rtc-linux@googlegroups.com
Subject: Re: select() to /dev/rtc0 to wait for clock tick timed out
Date: Fri, 16 Mar 2012 18:10:56 -0700	[thread overview]
Message-ID: <4F63E4A0.3010603@linaro.org> (raw)
In-Reply-To: <4EFD76F9.50204@openmobilefree.net>

On 12/30/2011 12:31 AM, Xiangfu Liu wrote:
> I meet the same problem on MIPS jz4740, here is the step I try to find 
> out the problem:
>
> 1. when I direct run 'hwclock' it will give
>    "select() to /dev/rtc0 to wait for clock tick timed out"
>    attachment 'hwclock.time.out' is the strace log
>
> 2. run 'rtctest' program. it works fine. the output is here[1]
>
> 3. after 'rtctest', run 'hwclock' again. then it works fine
>    attachment 'hwclock.wors' is the strace log
>
> without 'rtctest' run first. 'hwclock' never works.
> the hwclock works fine in 2.6.27.6, failed under '3.0.0'
>
> Please give me some tips how to fix this problem. shoule I modify the 
> driver code
> or is that relate to 'CONFIG_RTC_INTF_DEV_UIE_EMUL'?

Sorry I missed this email originally, and thank you for pinging me.

Is CONFIG_RTC_INTF_DEV_UIE_EMUL set in the config you're seeing this 
with? Does disabling it change the behavior?

Just a shot in the dark, but does the following help at all?
thanks
-john

Signed-off-by: John Stultz<john.stultz@linaro.org>

diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c

index 05ab227..c6c81ba 100644

--- a/drivers/rtc/rtc-jz4740.c

+++ b/drivers/rtc/rtc-jz4740.c

@@ -171,7 +171,8 @@ static int jz4740_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)

  static int jz4740_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)

  {

      struct jz4740_rtc *rtc = dev_get_drvdata(dev);

-    return jz4740_rtc_ctrl_set_bits(rtc, JZ_RTC_CTRL_AF_IRQ, enable);

+    return jz4740_rtc_ctrl_set_bits(rtc,

+                 JZ_RTC_CTRL_AE |JZ_RTC_CTRL_AF_IRQ, enable);

  }

  

  static struct rtc_class_ops jz4740_rtc_ops = {

  parent reply	other threads:[~2012-03-17  1:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19  4:16 select() to /dev/rtc0 to wait for clock tick timed out Matt Turner
2011-08-19 17:23 ` john stultz
2011-08-19 18:07 ` john stultz
2011-08-19 19:41   ` Matt Turner
2011-08-19 19:59     ` john stultz
2011-08-19 20:06       ` Matt Turner
2011-08-19 20:34         ` john stultz
2011-08-19 20:34           ` john stultz
2011-08-19 20:56           ` Matt Turner
2011-08-19 21:21             ` john stultz
2011-08-19 21:48               ` Matt Turner
2011-08-25 17:30                 ` Matt Turner
2011-08-26 16:05                   ` Atsushi Nemoto
2011-12-30  8:31       ` Xiangfu Liu
2012-03-16  8:53         ` Xiangfu Liu
2012-03-17  1:10         ` John Stultz [this message]
2012-03-18  7:03           ` Xiangfu Liu

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=4F63E4A0.3010603@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=jz47xx-kernel@lists.en.qi-hardware.com \
    --cc=linux-mips@linux-mips.org \
    --cc=mattst88@gmail.com \
    --cc=rtc-linux@googlegroups.com \
    --cc=xiangfu@openmobilefree.net \
    /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