summaryrefslogtreecommitdiff
path: root/linux/drivers/rtc/rtc-efi-platform.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2016-04-25 10:00:44 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2016-04-25 10:00:44 -0400
commita1df417e74aa6dae7352dc8cbb0ad471af5b7c69 (patch)
treec34b2311e37ea31db153c90cb8f4570374d05e78 /linux/drivers/rtc/rtc-efi-platform.c
initial Olimex linux tree from Daniel, originally Feb 3, 2016
Diffstat (limited to 'linux/drivers/rtc/rtc-efi-platform.c')
-rw-r--r--linux/drivers/rtc/rtc-efi-platform.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/linux/drivers/rtc/rtc-efi-platform.c b/linux/drivers/rtc/rtc-efi-platform.c
new file mode 100644
index 00000000..1a7f1d1b
--- /dev/null
+++ b/linux/drivers/rtc/rtc-efi-platform.c
@@ -0,0 +1,34 @@
+/*
+ * 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>
+ */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#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);