alistair23-linux/arch/powerpc
Neelesh Gupta 16b1d26e77 rtc/tpo: Driver to support rtc and wakeup on PowerNV platform
The patch implements the OPAL rtc driver that binds with the rtc
driver subsystem. The driver uses the platform device infrastructure
to probe the rtc device and register it to rtc class framework. The
'wakeup' is supported depending upon the property 'has-tpo' present
in the OF node. It provides a way to load the generic rtc driver in
in the absence of an OPAL driver.

The patch also moves the existing OPAL rtc get/set time interfaces to the
new driver and exposes the necessary OPAL calls using EXPORT_SYMBOL_GPL.

Test results:
-------------
Host:
[root@tul169p1 ~]# ls -l /sys/class/rtc/
total 0
lrwxrwxrwx 1 root root 0 Oct 14 03:07 rtc0 -> ../../devices/opal-rtc/rtc/rtc0
[root@tul169p1 ~]# cat /sys/devices/opal-rtc/rtc/rtc0/time
08:10:07
[root@tul169p1 ~]# echo `date '+%s' -d '+ 2 minutes'` > /sys/class/rtc/rtc0/wakealarm
[root@tul169p1 ~]# cat /sys/class/rtc/rtc0/wakealarm
1413274345
[root@tul169p1 ~]#

FSP:
$ smgr mfgState
standby
$ rtim timeofday

System time is valid: 2014/10/14 08:12:04.225115

$ smgr mfgState
ipling
$

CC: devicetree@vger.kernel.org
CC: tglx@linutronix.de
CC: rtc-linux@googlegroups.com
CC: a.zummo@towertech.it
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-11-17 18:04:01 +11:00
..
boot powerpc/boot: Parse chosen/cmdline-timeout parameter 2014-11-10 09:59:30 +11:00
configs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux 2014-10-21 07:48:56 -07:00
crypto powerpc: Fix compile of sha1-powerpc-asm.S on 32-bit 2013-03-05 16:56:26 +11:00
include rtc/tpo: Driver to support rtc and wakeup on PowerNV platform 2014-11-17 18:04:01 +11:00
kernel rtc/tpo: Driver to support rtc and wakeup on PowerNV platform 2014-11-17 18:04:01 +11:00
kvm powerpc: Remove superfluous bootmem includes 2014-11-10 09:59:26 +11:00
lib powerpc: Fix compilation of emulate_step() 2014-11-12 15:54:29 +11:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm: Switch to generic RCU get_user_pages_fast 2014-11-14 17:24:21 +11:00
net net: bpf: be friendly to kmemcheck 2014-09-09 16:58:56 -07:00
oprofile powerpc: Ensure global functions include their prototype 2014-09-25 23:14:42 +10:00
perf powerpc: Replace __get_cpu_var uses 2014-11-03 12:12:32 +11:00
platforms rtc/tpo: Driver to support rtc and wakeup on PowerNV platform 2014-11-17 18:04:01 +11:00
sysdev powerpc/mpc5xxx: delete unneeded test before of_node_put 2014-11-10 09:59:34 +11:00
xmon powerpc/xmon: Fix build when 4xx=y and 44x=n 2014-11-12 16:54:54 +11:00
Kconfig powerpc: Use generic PIE randomization 2014-11-17 17:55:11 +11:00
Kconfig.debug Patch queue for ppc - 2014-08-01 2014-08-05 09:58:11 +02:00
Makefile powerpc: Add POWER8 CPU selection 2014-09-25 23:14:49 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00