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

From: Xiangfu Liu <[email-masked]>
Date: Fri, 30 Dec 2011 16:31:53 +0800

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 ***