BeagleBoard C4 && rtc problem

Hi all,
I'm using Angstrom.

I've installed the battery for the BeagleBoard and removed the R66 as
shown in the manual.

I seen that the first time I boot the board (after installing angstrom
in the SD) the rtc is recognized.
At boot time I can see this:

....
INIT: version 2.86
booting
Please wait:
booting...
Starting
udev
[ 39.075683] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
....

and the hwclock command works fine:
root@beagleboard:~# hwclock
Fri Nov 26 16:55:38 2010 0.000000 seconds

but after rebooting the board the rtc0 message disappear:

...
INIT: version 2.86
booting
Please wait:
booting...
Starting
udev
[ 182.270446] udev: starting version 151
Remounting root file system...
...

and some row below I see:

....
hwclock: can't open '/dev/misc/rtc': No such file or directory
Fri Nov 26 16:56:00 UTC 2010
hwclock: can't open '/dev/misc/rtc': No such file or directory
....

and the hwclock doesn't works:

root@beagleboard:~# hwclock
hwclock: can't open '/dev/misc/rtc': No such file or directory

The only way I have to enable again the rtc is to install Angstrom
again in the SD. But after I reboot the board I have the same problem
again.

Can you help me?

I found the problem.
It seems that after reboot the module isn't loaded by default.

If I load it I get:
root@beagleboard:~# modprobe
rtc_twl
[ 764.804077] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0

and now the RTC works.

Now I'd like to know how to load rtc_twl at boot time....

I solved adding the row:

rtc_twl

to the /etc/modules

I hope this help someone...

I’m sure it would have helped me a month ago. My solution was to build my own kernel and have the proper realtime clock routine compiled statically into my kernel instead of loading it as a module. Your solution is probably the more elegant method of making things work.

Thanks for you feedback...

I got a lot of solution from this group so I like to be useful
sometimes... :slight_smile: