This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTC driver not working on Mistral OMAP35x EVM

I cannot set the rtc clock.  I tried hwclock and also created a program that did an open("/dev/rtc0"...) with ioctl(.. RTC_RD...) ...

I built the latest version of hwclock (v2.32).  My kernel is 2.6.26.  I made a link as shown below

ln -s /dev/rtc0 /dev/rtc

Also, I get different error messages when executing hwclock from minicom and from telnet.   The minicom errors indicate an issue with the i2c and traced the timeout to imap_i2c_xfer_msg() in file i2c-omap.c.  There is conditional code for "OMAP_HACK" and comments about timing.  Not sure what telnet errors point to definitively.  I have included the error output first from minicom using hwclock --show, then the telnet output first running hwclock --show then hwclock --debug.

-bash-3.1# ln -s /dev/rtc0 /dev/rtc                                            
-bash-3.1# hwclock --show                                                      
i2c_omap i2c_omap.1: controller timed out                                      
twl4030_rtc: Could not read TWL4030register F - returned -110[ffffff92]        
hwclock: ioctl() to RTC device to turn on update interrupts failed unexpectedly)
i2c_omap i2c_omap.1: controller timed out                                      
twl4030_rtc: Could not read TWL4030register D - returned -110[ffffff92]        
hwclock: ioctl() to rtc device driver to read the time failed.  errno = Connect)
hwclock: unable to read the time from rtc device.-bash-3.1# i2c_omap i2c_omap.1t
twl4030_rtc: Could not read TWL4030register F - returned -110[ffffff92]        
i2c_omap i2c_omap.1: controller timed out                                      
twl4030_rtc: Could not read TWL4030register D - returned -110[ffffff92]        
i2c_omap i2c_omap.1: controller timed out                                      
twl4030_rtc: Could not read TWL4030register F - returned -110[ffffff92]        
i2c_omap i2c_omap.1: controller timed out                                      
twl4030_rtc: Could not read TWL4030register D - returned -110[ffffff92]        

-bash-3.1# hwclock --show
hwclock: ioctl() to RTC device to turn on update interrupts failed unexpectedly, errno = 110 (Connection timed out)
hwclock: ioctl() to rtc device driver to read the time failed.  errno = Connection timed out (110)
hwclock: unable to read the time from rtc device.-bash-3.1#

-bash-3.1# hwclock --debug
hwclock 2.32
Kernel IS NOT in 11 minute mode
User did not specify a clock access method.  Searching for one...
Found RTC device special file '/dev/rtc'
Using rtc ioctl interface to clock via file '/dev/rtc'.
Adjtime file contents:
  drift factor = 0.000000, missed in last set = 0.000000
  LOCAL (0 seconds west of GMT), epoch = -1
  Last drift adjustment done Thu Jan  1 00:00:00 1970 (Time 0) + 0.000000 secs
  Last calibration done Thu Jan  1 00:00:00 1970 (Time 0)
  Correction: 0.000000
Not booted from MILO
Assuming hardware clock's zero year is 1900
Assuming hw clock is kept in LOCAL time with offset 0 mins.
At 946685131.971038, waiting for clock tick...
hwclock: ioctl() to RTC device to turn on update interrupts failed unexpectedly, errno = 110 (Connection timed out)
...failed to get clock tick.
hwclock: ioctl() to rtc device driver to read the time failed.  errno = Connection timed out (110)
hwclock: unable to read the time from rtc device.-bash-3.1#

Has anyone seen this before or know how to get the rtc working?

Thanks in advance.

Dick