mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: <mingo@elte.hu>, <tglx@linutronix.de>, <hpa@zytor.com>
Cc: <rtc-linux@googlegroups.com>, <dannf@hp.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: enable rtc-efi
Date: Tue, 05 Jul 2011 08:38:51 +0100	[thread overview]
Message-ID: <4E12DBAB020000780004C1B2@nat28.tlf.novell.com> (raw)

Besides a Kconfig change this just requires creating a respective
platform device.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: dann frazier <dannf@hp.com>

---
 arch/x86/platform/efi/efi.c |   16 ++++++++++++++++
 drivers/rtc/Kconfig         |    2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

--- 3.0-rc6/arch/x86/platform/efi/efi.c
+++ 3.0-rc6-x86-EFI-RTC/arch/x86/platform/efi/efi.c
@@ -31,6 +31,7 @@
 #include <linux/efi.h>
 #include <linux/bootmem.h>
 #include <linux/memblock.h>
+#include <linux/platform_device.h>
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
 #include <linux/time.h>
@@ -679,6 +680,21 @@ void __init efi_enter_virtual_mode(void)
 	kfree(new_memmap);
 }
 
+static struct platform_device rtc_efi_dev = {
+	.name = "rtc-efi",
+	.id = -1,
+};
+
+static int __init rtc_init(void)
+{
+	if (efi_enabled && platform_device_register(&rtc_efi_dev) < 0)
+		printk(KERN_ERR "unable to register rtc device...\n");
+
+	/* not necessarily an error */
+	return 0;
+}
+arch_initcall(rtc_init);
+
 /*
  * Convenience functions to obtain memory types and attributes
  */
--- 3.0-rc6/drivers/rtc/Kconfig
+++ 3.0-rc6-x86-EFI-RTC/drivers/rtc/Kconfig
@@ -556,7 +556,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.




             reply	other threads:[~2011-07-05  7:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  7:38 Jan Beulich [this message]
2011-07-05 18:02 ` Matthew Garrett
2011-07-05 18:29 ` Matthew Garrett
2011-07-06  7:09   ` Jan Beulich
2011-07-06 11:42     ` Matthew Garrett
     [not found] <4E16B5DB0200007800072A2D@nat28.tlf.novell.com>
2011-07-08  7:09 ` Matthew Garrett

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=4E12DBAB020000780004C1B2@nat28.tlf.novell.com \
    --to=jbeulich@novell.com \
    --cc=dannf@hp.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rtc-linux@googlegroups.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®