From patchwork Tue Jul 5 07:38:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 103207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wy0-f184.google.com (mail-wy0-f184.google.com [74.125.82.184]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 215591007D5 for ; Tue, 5 Jul 2011 17:39:02 +1000 (EST) Received: by wyg24 with SMTP id 24sf10276255wyg.11 for ; Tue, 05 Jul 2011 00:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:message-id:x-mailer:date:from:to:cc :subject:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type:content-disposition; bh=cHL0D4puZ0ZzduZt1BDiyoz6R/YOqtx6L6gZe29Ocfs=; b=cNqtLtzUuPIaCDviwbj6vg9t0KYAHQi2l0ne7fpJKI31o1bck3WfZVlNH/uQ0AUfOD L8OKPuMVaX/57jCCnxuWidmUNAyg1N7t0jb6Zk+Lf80aT+VxV5kQW+NlDKAiQE+wuJVh N3H0GI7foAtJw587EBWzfQ2DNVXqMmWdH0vlw= Received: by 10.216.230.142 with SMTP id j14mr1575980weq.28.1309851536538; Tue, 05 Jul 2011 00:38:56 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.216.235.213 with SMTP id u63ls2411777weq.0.gmail; Tue, 05 Jul 2011 00:38:55 -0700 (PDT) Received: by 10.216.30.17 with SMTP id j17mr382608wea.1.1309851535673; Tue, 05 Jul 2011 00:38:55 -0700 (PDT) Received: by 10.216.30.17 with SMTP id j17mr382607wea.1.1309851535624; Tue, 05 Jul 2011 00:38:55 -0700 (PDT) Received: from nat28.tlf.novell.com (nat28.tlf.novell.com [130.57.49.28]) by gmr-mx.google.com with ESMTPS id e23si7313145wbp.2.2011.07.05.00.38.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jul 2011 00:38:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of JBeulich@novell.com designates 130.57.49.28 as permitted sender) client-ip=130.57.49.28; Received: from EMEA1-MTA by nat28.tlf.novell.com with Novell_GroupWise; Tue, 05 Jul 2011 08:38:53 +0100 Message-Id: <4E12DBAB020000780004C1B2@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 05 Jul 2011 08:38:51 +0100 From: "Jan Beulich" To: ,, Cc: ,, Subject: [rtc-linux] [PATCH] x86: enable rtc-efi Mime-Version: 1.0 X-Original-Sender: jbeulich@novell.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of JBeulich@novell.com designates 130.57.49.28 as permitted sender) smtp.mail=JBeulich@novell.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Disposition: inline Besides a Kconfig change this just requires creating a respective platform device. Signed-off-by: Jan Beulich Cc: dann frazier --- 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 #include #include +#include #include #include #include @@ -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.