diff options
-rw-r--r-- | arch/ia64/kernel/time.c | 15 | ||||
-rw-r--r-- | drivers/rtc/Kconfig | 2 | ||||
-rw-r--r-- | drivers/rtc/Makefile | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-efi-platform.c | 31 |
4 files changed, 36 insertions, 16 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 3e71ef85e439..9a0104a38cd3 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -384,21 +384,6 @@ static struct irqaction timer_irqaction = { | |||
384 | .name = "timer" | 384 | .name = "timer" |
385 | }; | 385 | }; |
386 | 386 | ||
387 | static struct platform_device rtc_efi_dev = { | ||
388 | .name = "rtc-efi", | ||
389 | .id = -1, | ||
390 | }; | ||
391 | |||
392 | static int __init rtc_init(void) | ||
393 | { | ||
394 | if (platform_device_register(&rtc_efi_dev) < 0) | ||
395 | printk(KERN_ERR "unable to register rtc device...\n"); | ||
396 | |||
397 | /* not necessarily an error */ | ||
398 | return 0; | ||
399 | } | ||
400 | module_init(rtc_init); | ||
401 | |||
402 | void read_persistent_clock(struct timespec *ts) | 387 | void read_persistent_clock(struct timespec *ts) |
403 | { | 388 | { |
404 | efi_gettimeofday(ts); | 389 | efi_gettimeofday(ts); |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index a672dd16da62..83743a1a6731 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -798,7 +798,7 @@ config RTC_DRV_DA9063 | |||
798 | 798 | ||
799 | config RTC_DRV_EFI | 799 | config RTC_DRV_EFI |
800 | tristate "EFI RTC" | 800 | tristate "EFI RTC" |
801 | depends on IA64 | 801 | depends on EFI |
802 | help | 802 | help |
803 | If you say yes here you will get support for the EFI | 803 | If you say yes here you will get support for the EFI |
804 | Real Time Clock. | 804 | Real Time Clock. |
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 70347d041d10..f1dfc3648ee5 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile | |||
@@ -10,6 +10,10 @@ obj-$(CONFIG_RTC_SYSTOHC) += systohc.o | |||
10 | obj-$(CONFIG_RTC_CLASS) += rtc-core.o | 10 | obj-$(CONFIG_RTC_CLASS) += rtc-core.o |
11 | rtc-core-y := class.o interface.o | 11 | rtc-core-y := class.o interface.o |
12 | 12 | ||
13 | ifdef CONFIG_RTC_DRV_EFI | ||
14 | rtc-core-y += rtc-efi-platform.o | ||
15 | endif | ||
16 | |||
13 | rtc-core-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o | 17 | rtc-core-$(CONFIG_RTC_INTF_DEV) += rtc-dev.o |
14 | rtc-core-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o | 18 | rtc-core-$(CONFIG_RTC_INTF_PROC) += rtc-proc.o |
15 | rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o | 19 | rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o |
diff --git a/drivers/rtc/rtc-efi-platform.c b/drivers/rtc/rtc-efi-platform.c new file mode 100644 index 000000000000..b40fbe332af4 --- /dev/null +++ b/drivers/rtc/rtc-efi-platform.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Moved from arch/ia64/kernel/time.c | ||
3 | * | ||
4 | * Copyright (C) 1998-2003 Hewlett-Packard Co | ||
5 | * Stephane Eranian <eranian@hpl.hp.com> | ||
6 | * David Mosberger <davidm@hpl.hp.com> | ||
7 | * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> | ||
8 | * Copyright (C) 1999-2000 VA Linux Systems | ||
9 | * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com> | ||
10 | */ | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/efi.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
17 | static struct platform_device rtc_efi_dev = { | ||
18 | .name = "rtc-efi", | ||
19 | .id = -1, | ||
20 | }; | ||
21 | |||
22 | static int __init rtc_init(void) | ||
23 | { | ||
24 | if (efi_enabled(EFI_RUNTIME_SERVICES)) | ||
25 | if (platform_device_register(&rtc_efi_dev) < 0) | ||
26 | pr_err("unable to register rtc device...\n"); | ||
27 | |||
28 | /* not necessarily an error */ | ||
29 | return 0; | ||
30 | } | ||
31 | module_init(rtc_init); | ||