ts-7000
[Top] [All Lists]

[ts-7000] Solution found: TS-7260, 2.6.34.6-m, /dev/rtc, rtc-m48t86 vs.

To:
Subject: [ts-7000] Solution found: TS-7260, 2.6.34.6-m, /dev/rtc, rtc-m48t86 vs. ep93xx-rtc
From: "" <>
Date: Thu, 02 Sep 2010 19:07:03 -0000


Peter and Charlie thanks again!!

Peter:  "Do you know the RTC's battery is good? (Does the board say the battery is OK on the console when it boots?)"
- YES "rtc-m48t86 rtc-m48t86: battery ok"

Charlie:  "Do you get a message during boot like "cannot access hardware clock by any known method"?
-NO but the link technique you described is key:

I spent hours on the clock yesterday, solution identified.  This is what I found:

Even with ep93xx-rtc marked 'not set' in .config:

CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
# CONFIG_RTC_DEBUG is not set
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
...
CONFIG_RTC_DRV_M48T86=y
...
# on-CPU RTC drivers
# CONFIG_RTC_DRV_EP93XX is not set

...

The ep93xx-rtc is still initialized during boot:

>ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
>rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1

I can set it with:

date 090218272101
> Thu Sep  2 18:27:00 UTC 2101
'hwclock -w'
'hwclock'
shows the right time after.

But 'hwclock --debug' reveals as you said that I am in fact setting /dev/rtc0 which has no battery backup

So: 'ln -s /dev/rtc1 /dev/rtc'

Allowed me to set the m48t86 with 'hwclock -w'.

After doing it, the bootup changes from:

>rtc-m48t86 rtc-m48t86: setting system clock to 2070-01-03 01:20:43 UTC (3155937643) [I didn't know time_t went that high, I thought it was signed 32bit int!]
to the much more reasonable:
>rtc-m48t86 rtc-m48t86: setting system clock to 2010-09-02 18:43:07 UTC (1283452987)

But after boot

'hwclock'

still reveals that the time kept by /dev/rtc0 is wrong (Jan1, 1970)
and that the system time emitted by date is the same.

So again: 'ln -s /dev/rtc1 /dev/rtc'
followed by:
'hwclock' reveals that we have switched to the real clock:
>Thu Sep   2 18:44:50 2010  -0.443011 seconds
and then:
'hwclock -s'
sets the Unix time.

So it seems that my solution is to add:

ln -s /dev/rtc1 /dev/rtc
hwclock -s

to my /etc/rc.local

I also add a note here that our application software, once running on ARM, will execute this to high accuracy using a GPS receiver, so that will be another interesting activity in the next several weeks.



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] Solution found: TS-7260, 2.6.34.6-m, /dev/rtc, rtc-m48t86 vs. ep93xx-rtc, clarkdunson@rocketmail.com <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU