Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932406Ab2EOMHz (ORCPT ); Tue, 15 May 2012 08:07:55 -0400 Received: from nat28.tlf.novell.com ([130.57.49.28]:46414 "EHLO nat28.tlf.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932074Ab2EOMHy convert rfc822-to-8bit (ORCPT ); Tue, 15 May 2012 08:07:54 -0400 Message-Id: <4FB263560200007800083CB0@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 12.0.0 Date: Tue, 15 May 2012 13:08:22 +0100 From: "Jan Beulich" To: , , Cc: , , , Subject: [PATCH, resend] x86: enable rtc-efi Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1737 Lines: 67 Besides a Kconfig change this just requires creating a corresponding platform device. Signed-off-by: Jan Beulich Cc: dann frazier Cc: Matt Fleming Cc: Matthew Garrett --- arch/x86/platform/efi/efi.c | 19 +++++++++++++++++++ drivers/rtc/Kconfig | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) --- 3.4-rc7/arch/x86/platform/efi/efi.c +++ 3.4-rc7-EFI-RTC-platform-dev/arch/x86/platform/efi/efi.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -912,6 +913,24 @@ out: kfree(new_memmap); } +static struct platform_device rtc_efi_dev = { + .name = "rtc-efi", + .id = -1, +}; + +static int __init rtc_init(void) +{ + if (!efi_enabled) + return -ENODEV; + + if (platform_device_register(&rtc_efi_dev) < 0) + printk(KERN_ERR "unable to register EFI RTC device...\n"); + + /* not necessarily an error */ + return 0; +} +arch_initcall(rtc_init); + /* * Convenience functions to obtain memory types and attributes */ --- 3.4-rc7/drivers/rtc/Kconfig +++ 3.4-rc7-EFI-RTC-platform-dev/drivers/rtc/Kconfig @@ -563,7 +563,7 @@ config RTC_DRV_DA9052 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/