linux-mips
[Top] [All Lists]

Re: select() to /dev/rtc0 to wait for clock tick timed out

To: john stultz <johnstul@us.ibm.com>
Subject: Re: select() to /dev/rtc0 to wait for clock tick timed out
From: Xiangfu Liu <xiangfu@openmobilefree.net>
Date: Fri, 30 Dec 2011 16:31:53 +0800
Cc: Matt Turner <mattst88@gmail.com>, linux-mips@linux-mips.org, jz47xx-kernel@lists.en.qi-hardware.com, rtc-linux@googlegroups.com
In-reply-to: <1313783990.2970.136.camel@work-vm>
References: <CAEdQ38HGfd9YWE+WLuirE4Km6UE6N26toTj=-1BuXAQUux6t5g@mail.gmail.com> <1313777242.2970.131.camel@work-vm> <CAEdQ38F4zi76ug+ABZPnPLcLvGfUFRhr6SKzYCN+24Otq+qAAQ@mail.gmail.com> <1313783990.2970.136.camel@work-vm>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
Hi John Stultz

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'?

thanks in advance.
xiangfu

[1]
root@BenNanoNote:~# ./rtctest
                        RTC Driver Test Example.
Current RTC date/time is 30-12-2011, 08:25:55.
Alarm time now set to 08:26:00.
Waiting 5 seconds for alarm... okay. Alarm rang.

Periodic IRQ rate is 64Hz.
Counting 20 interrupts at:
2Hz:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
4Hz:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8Hz:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
16Hz:    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
32Hz:    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
64Hz:    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

                         *** Test complete ***

Attachment: hwclock.time.out
Description: Text document

Attachment: hwclock.works
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
  • Re: select() to /dev/rtc0 to wait for clock tick timed out, Xiangfu Liu <=