aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2008-09-10 10:24:07 -0400
committerKyle McMartin <kyle@hera.kernel.org>2008-10-10 12:32:30 -0400
commit9eb1686423756f4dfb0ad8bfb02bb8bf1b89e50a (patch)
tree16d0c7b2cb2e995bb6795bc83d0c2088e3bdf78c /arch
parentf0514ae323f19ba1ad4bea4174ea274c812f7eee (diff)
parisc: add rtc platform driver
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/Kconfig2
-rw-r--r--arch/parisc/kernel/time.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index a7d4fd353c2b..0a8ac703dbec 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -9,6 +9,8 @@ config PARISC
9 def_bool y 9 def_bool y
10 select HAVE_IDE 10 select HAVE_IDE
11 select HAVE_OPROFILE 11 select HAVE_OPROFILE
12 select RTC_CLASS
13 select RTC_DRV_PARISC
12 help 14 help
13 The PA-RISC microprocessor is designed by Hewlett-Packard and used 15 The PA-RISC microprocessor is designed by Hewlett-Packard and used
14 in many of their workstations & servers (HP9000 700 and 800 series, 16 in many of their workstations & servers (HP9000 700 and 800 series,
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 24be86bba94d..4d09203bc693 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -23,6 +23,7 @@
23#include <linux/smp.h> 23#include <linux/smp.h>
24#include <linux/profile.h> 24#include <linux/profile.h>
25#include <linux/clocksource.h> 25#include <linux/clocksource.h>
26#include <linux/platform_device.h>
26 27
27#include <asm/uaccess.h> 28#include <asm/uaccess.h>
28#include <asm/io.h> 29#include <asm/io.h>
@@ -215,6 +216,24 @@ void __init start_cpu_itimer(void)
215 cpu_data[cpu].it_value = next_tick; 216 cpu_data[cpu].it_value = next_tick;
216} 217}
217 218
219struct platform_device rtc_parisc_dev = {
220 .name = "rtc-parisc",
221 .id = -1,
222};
223
224static int __init rtc_init(void)
225{
226 int ret;
227
228 ret = platform_device_register(&rtc_parisc_dev);
229 if (ret < 0)
230 printk(KERN_ERR "unable to register rtc device...\n");
231
232 /* not necessarily an error */
233 return 0;
234}
235module_init(rtc_init);
236
218void __init time_init(void) 237void __init time_init(void)
219{ 238{
220 static struct pdc_tod tod_data; 239 static struct pdc_tod tod_data;
@@ -245,4 +264,3 @@ void __init time_init(void)
245 xtime.tv_nsec = 0; 264 xtime.tv_nsec = 0;
246 } 265 }
247} 266}
248