Hi al!
The weekend was long and the weather was bad so, don't ask me why, I put
together a first version of a Real Time Clock (RTC) driver for the SA1100. The
driver is mainly based on the 'normal' RTC code but finally I decided to write
an extra module because hacking this into the 'normal` driver would have meant
a huge #ifdef session. The SA1100 is too different than the CMOS RTC types used
on most other systems.
What the driver currently does is it can set the RTC built into the SA1100
along with the clock divider. The timer will then tick at 1Hz and increments the
counter. Programs like hwclock now work!
The SA1100 RTC is somewhat strange and the docs are not completely clear to me.
According to the docs the RTC has an unspecified value after a hardware reset
but the OS-clock keeps it's value. Due to this you will loose your clock
setting after a hardware reset or powercycle. A software reset (reboot) does
not harm the clock.
The best thing about the RTC is that the Alarm should work now!
That is, you can setup an alarm time (and date !) which will, if suspend works,
wakes up the iPaq at a specified time and date. This forms the base for any
alarm handling later on (e.g. for a scheduler/calendar applications).
The driver should be mostly compatible to the standard RTC driver (including
ioctl()s and /proc/driver/rtc entry).
Some words of warning: This is an early beta ;)
This means I do not (yet) guarantee full functionality or bug-freeness. I
wanted to put this out in the tradition of "release early, release often".
Comments are welcome (especially constructive).
Since the whole driver is very small, I attach it to the list so that everyone
interested can share it instantaniously ;) The archive contains the driver
source and a small Makefile which assumes cross-compiling. If not, redifine CC.
You will also have to have a configured kernel source tree installed (but I
think that is obvious for kernel development ;)
OK, so long
CU
nils faerber
PS: It would be nice if this would make it into the next release ;)
-- kernel concepts Engel & Faerber GbR Tel: +49-271-771091-12 Dreisbachstr. 24 Fax: +49-271-771091-19 D-57250 Netphen D1 : +49-170-2729106 --
This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:43 EDT