From: Brian Maly <bmaly@redhat.com>
To: "H. Peter Anvin" <h.peter.anvin@intel.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
dannf@hp.com, ying.huang@intel.com
Subject: Re: [PATCH] rtc: add x86 support for rtc-efi
Date: Mon, 06 Apr 2009 18:55:49 -0400 [thread overview]
Message-ID: <49DA8875.5050009@redhat.com> (raw)
In-Reply-To: <49DA817E.8040705@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]
re-post of the patch, both as inline and as an attachment (which
hopefully wont cause confusion).
--- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
+++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
@@ -442,7 +442,7 @@ config RTC_DRV_DS1742
config RTC_DRV_EFI
tristate "EFI RTC"
- depends on IA64
+ depends on EFI
help
If you say yes here you will get support for the EFI
Real Time Clock.
--- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/mca.h>
+#include <linux/platform_device.h>
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
@@ -135,3 +136,21 @@ void __init time_init(void)
tsc_init();
late_time_init = choose_time_init();
}
+
+
+#ifdef CONFIG_RTC_DRV_EFI
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (platform_device_register(&rtc_efi_dev) < 0)
+ printk(KERN_ERR "unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+module_init(rtc_init);
+#endif
--- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
@@ -18,6 +18,7 @@
#include <linux/time.h>
#include <linux/mca.h>
#include <linux/nmi.h>
+#include <linux/platform_device.h>
#include <asm/i8253.h>
#include <asm/hpet.h>
@@ -135,3 +136,20 @@ void __init time_init(void)
late_time_init = choose_time_init();
}
+
+#ifdef CONFIG_RTC_DRV_EFI
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (platform_device_register(&rtc_efi_dev) < 0)
+ printk(KERN_ERR "unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+module_init(rtc_init);
+#endif
--------------------------------------------------------------------------------------------
[-- Attachment #2: 2.6.29-add-x86-support-for-efi-rtc.patch --]
[-- Type: text/x-patch, Size: 1848 bytes --]
--- a/drivers/rtc/Kconfig 2009-03-26 12:39:59.000000000 -0400
+++ b/drivers/rtc/Kconfig 2009-04-06 18:46:58.000000000 -0400
@@ -442,7 +442,7 @@ config RTC_DRV_DS1742
config RTC_DRV_EFI
tristate "EFI RTC"
- depends on IA64
+ depends on EFI
help
If you say yes here you will get support for the EFI
Real Time Clock.
--- a/arch/x86/kernel/time_32.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_32.c 2009-03-26 13:06:10.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/mca.h>
+#include <linux/platform_device.h>
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
@@ -135,3 +136,21 @@ void __init time_init(void)
tsc_init();
late_time_init = choose_time_init();
}
+
+
+#ifdef CONFIG_RTC_DRV_EFI
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (platform_device_register(&rtc_efi_dev) < 0)
+ printk(KERN_ERR "unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+module_init(rtc_init);
+#endif
--- a/arch/x86/kernel/time_64.c 2009-03-12 22:39:28.000000000 -0400
+++ b/arch/x86/kernel/time_64.c 2009-03-26 13:06:19.000000000 -0400
@@ -18,6 +18,7 @@
#include <linux/time.h>
#include <linux/mca.h>
#include <linux/nmi.h>
+#include <linux/platform_device.h>
#include <asm/i8253.h>
#include <asm/hpet.h>
@@ -135,3 +136,20 @@ void __init time_init(void)
late_time_init = choose_time_init();
}
+
+#ifdef CONFIG_RTC_DRV_EFI
+static struct platform_device rtc_efi_dev = {
+ .name = "rtc-efi",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ if (platform_device_register(&rtc_efi_dev) < 0)
+ printk(KERN_ERR "unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+module_init(rtc_init);
+#endif
next prev parent reply other threads:[~2009-04-06 22:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 17:49 [PATCH] rtc: add x86 support for rtc-efi Brian Maly
2009-04-06 19:31 ` dann frazier
2009-04-06 22:26 ` H. Peter Anvin
2009-04-06 22:55 ` Brian Maly [this message]
2009-04-08 16:23 ` dann frazier
2009-04-09 23:18 ` Andrew Morton
2009-04-10 13:51 ` Ingo Molnar
2009-04-20 17:15 ` Brian Maly
2009-04-20 17:20 ` Ingo Molnar
2009-04-20 18:21 ` H. Peter Anvin
2009-05-19 20:10 ` Brian Maly
2009-05-25 5:49 ` Huang Ying
2009-05-25 16:28 ` H. Peter Anvin
2009-05-27 23:21 ` Ingo Molnar
2009-04-10 1:08 ` Huang Ying
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49DA8875.5050009@redhat.com \
--to=bmaly@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dannf@hp.com \
--cc=h.peter.anvin@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.