Kevin Cozens wrote:
> If the clock hardware is supported under Linux (which it may be as
> you have a /dev/rtc), you should have no problem. On the TS-7250
> board I am using the rcS.sysinit file contains the lines:
>
> #set system clock here if [ -f /proc/driver/rtc ]; then echo
"setting
> system clock" /sbin/hwclock -s date fi
>
> You should check for something similar on your board. You can test
if
> running hwclock sets the system time. If it works, you should check
> to see if the start up scripts on your board include any call to
> hwclock. If there isn't one, add it to rcS.sysinit or rc.local. You
> can set the system time on your board by hand then use hwclock to
> write the system time to the RTC so your board will give you the
> current time the next time you boot the board.
>
Thanks, Kevin.
It looks like its working fine if I boot ts-linux. And it works on the
debian 2.4 kernel. But it not working when I boot from my 2.6.23
kernel. I built rtc_m48t86 support into the kernel (as a module) and
loaded the module:
:root# modprobe
rtc-m48t86
rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as
rtc0
rtc-m48t86 rtc-m48t86: battery
ok
:root#
lsmod
Module Size Used
by
rtc_m48t86 2240
0
rtc_core 8568 1
rtc_m48t86
Here's what hwclock says:
:root#
hwclock
Cannot access the Hardware Clock via any known
method.
Use the --debug option to see the details of our search for an access
method.
:root# hwclock
--debug
hwclock from
util-linux-2.12p
hwclock: Open of /dev/rtc failed, errno=19: No such
device.
No usable clock interface
found.
Cannot access the Hardware Clock via any known
method.
And here are my RTC related settings in the kernel .config:
> grep RTC .config
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=m
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
# I2C RTC drivers
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# SPI RTC drivers
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# Platform RTC drivers
# CONFIG_RTC_DRV_CMOS is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_DS1742 is not set
CONFIG_RTC_DRV_M48T86=m
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_V3020 is not set
# on-CPU RTC drivers
CONFIG_RTC_DRV_EP93XX=m
CONFIG_RTC_DRV_PL031=m
Does this look right to you?
--Jeff
__._,_.___
__,_._,___
|
|