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.

Remaining Tasks:

 - Need to provide a way to setup ALARM2.

 - 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
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: am335x pmic power-off

XXX: Code doesn't run, gets a pagefault on first reg write 0x44e3e06c
Maybe the clock for the RTC module isn't enabled?

XXX: Code is a bit out of control. 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. It needs
to be re-factored. Perhaps I could have an RTC driver that sets
everything up, freezes the clock, and then the kernel unfreezes the
clock (1 register write) to allow the reset to happen.