-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rtc: ia64: allow other architectures to use EFI RTC
Currently, the rtc-efi driver is restricted to ia64 only. Newer architectures with EFI support may want to also use that driver. This patch moves the platform device setup from ia64 into drivers/rtc and allow any architecture with CONFIG_EFI=y to use the rtc-efi driver. Signed-off-by: Mark Salter <msalter@redhat.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- Loading branch information
Mark Salter
authored and
Linus Torvalds
committed
Aug 8, 2014
1 parent
ca6dc2d
commit da167ad
Showing
4 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Moved from arch/ia64/kernel/time.c | ||
* | ||
* Copyright (C) 1998-2003 Hewlett-Packard Co | ||
* Stephane Eranian <eranian@hpl.hp.com> | ||
* David Mosberger <davidm@hpl.hp.com> | ||
* Copyright (C) 1999 Don Dugger <don.dugger@intel.com> | ||
* Copyright (C) 1999-2000 VA Linux Systems | ||
* Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com> | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/efi.h> | ||
#include <linux/platform_device.h> | ||
|
||
static struct platform_device rtc_efi_dev = { | ||
.name = "rtc-efi", | ||
.id = -1, | ||
}; | ||
|
||
static int __init rtc_init(void) | ||
{ | ||
if (efi_enabled(EFI_RUNTIME_SERVICES)) | ||
if (platform_device_register(&rtc_efi_dev) < 0) | ||
pr_err("unable to register rtc device...\n"); | ||
|
||
/* not necessarily an error */ | ||
return 0; | ||
} | ||
module_init(rtc_init); |