Commit Message

From: John Rigby <jcrigby@gmail.com>
Based on Domen Puncer's rtc driver for 5200.
Changes to Domen's original:
Changed filenames/routine names from mpc5200* to mpc5121*
Changed match to only care about compatible and use "fsl,"
convention for compatible.
Make alarms more sane by dealing with lack of second alarm
resolution.
Deal with the fact that most of the 5121 rtc registers are not
persistent across a reset even with a battery attached:
Use actual_time register for time keeping
and target_time register as an offset to linux time
The target_time register would normally be used for hibernation
but hibernation does not work on current silicon
Signed-off-by: John Rigby <jcrigby@gmail.com>Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>Signed-off-by: Wolfgang Denk <wd@denx.de>Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: <rtc-linux@googlegroups.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: John Rigby <jcrigby@gmail.com>
---
Changes since v1 (as requested by Alessandro Zummo):
- Remove history from the driver file, the same history is in
commit message
- implement alarm/irq interface using ->ops structure, don't
use ops->ioctl() any more
- Clean up probe()
- replace printk() by dev_*()
- add arch dependency in Kconfig
- add requested include linux/init.h
- move MODULE_XXX to the end
- use rtc_valid_tm() when returning 'tm'
- use __init/__exit/__exit_p as this is not a hotpluggable device
drivers/rtc/Kconfig | 10 ++
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-mpc5121.c | 386 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 397 insertions(+), 0 deletions(-)
create mode 100644 drivers/rtc/rtc-mpc5121.c