readclock: add support for am335x RTC

Add support for getting/setting the am335x SoC's internal real
time clock. Also, allow the power off alarm to be set.

Make readclock an "always on" driver. This is needed for setting
power-off alarms whenever the power button is pressed on the BBB.

Replace the readclock.sh script & single run driver with a
readclock program that takes the same arguments and forwards
the requests on to the always up readclock driver.

Change-Id: Ifd6c2acd80ae4b5e79d83df510df445c24e24a71
This commit is contained in:
Thomas Cort
2013-08-05 08:37:51 -04:00
parent c4f3c7d66f
commit 09db2a8c67
17 changed files with 1261 additions and 354 deletions
+3 -11
View File
@@ -124,17 +124,9 @@ start)
then . "$RC_TZ"
fi
if [ $ARCH = i386 ]
then
# Try to read the hardware real-time clock, otherwise do it manually.
readclock || intr date -q
fi
if [ $ARCH = earm ]
then
date 201301010000
fi
# Start real time clock driver & set system time, otherwise default date.
up readclock.drv
readclock || date 201301010000
# Initialize files.
>/etc/utmp # /etc/utmp keeps track of logins
+3
View File
@@ -299,9 +299,12 @@ service random
service readclock.drv
{
ipc ALL;
io 70:2;
system
PRIVCTL # 4
UMAP # 14
VIRCOPY # 15
DEVIO # 21
READBIOS # 35
;