readclock: work-in-progress

Need working RTC for PMIC power-off. This commit is a first pass
at implementing support for the RTC in the AM335X SoC in readclock.
To support the xM, a driver for the xM's PMIC needs to be written.

Remaining Tasks:

 - Need to provide a way to setup ALARM2. Maybe make a librtc
 (similar to libpadconf or libclkconf) to allow it to be set
 from within the tps65217 driver.

 - There was some refactoring that went on to split the i386
 code into it's own file. Need to test on i386 to ensure nothing
 broke.

 - Update rc script to use readclock on ARM. Need to test on
 BeagleBoard-xM to ensure nothing breaks there.

 - Need to test on BeagleBone White.

Change-Id: Ide1b3c376468564c745103a269d15a268446d575

readclock fix

Change-Id: I2785ee02183608cd34597829ae1d32527bf89461
tps65217: work in progress

Gets interrupts from the power button.

Remaining Tasks:

 - Probably need to factor out do_shutdown into libsys.

 - Might want to setup ALARM2.

Change-Id: I2da48f6c3cfbf59905fef97e6290569298421dcd
kernel: work-in-progress

XXX: Code is a bit out of control and doesn't work (segfaults). I originally
thought I'd just have to write to a couple of registers. There were some
additional setup steps that I didn't foresee and the amount of code has
grown a lot.

Tasks:

 - refactor most of these changes into userspace drivers.
 work on this is in progress.

Change-Id: Id7b9f77f5ab5fa8d1ead6d0f0ab7dd0762e5939e