[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1235144809-32468-4-git-send-email-Geert.Uytterhoeven@sonycom.com>
Date: Fri, 20 Feb 2009 16:46:47 +0100
From: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To: Alessandro Zummo <a.zummo@...ertech.it>
Cc: rtc-linux@...glegroups.com, Kyle McMartin <kyle@...artin.ca>,
David Woodhouse <dwmw2@...radead.org>,
Richard Zidlicky <rz@...ux-m68k.org>,
linux-parisc@...r.kernel.org, linuxppc-dev@...abs.org,
linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Subject: [PATCH/RFC 3/5] m68k: Enable rtc-generic
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
---
arch/m68k/Kconfig | 4 ++++
arch/m68k/kernel/time.c | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index fb87c08..9d2565e 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -27,6 +27,10 @@ config ARCH_HAS_ILOG2_U64
bool
default n
+config ARCH_HAS_GENERIC_RTC
+ bool
+ default y
+
config GENERIC_HWEIGHT
bool
default y
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 7db4159..b26933f 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -18,6 +18,7 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/rtc.h>
+#include <linux/platform_device.h>
#include <asm/machdep.h>
#include <asm/io.h>
@@ -159,3 +160,23 @@ int do_settimeofday(struct timespec *tv)
}
EXPORT_SYMBOL(do_settimeofday);
+
+
+static struct platform_device rtc_generic_dev = {
+ .name = "rtc-generic",
+ .id = -1,
+};
+
+static int __init rtc_init(void)
+{
+ int ret;
+
+ ret = platform_device_register(&rtc_generic_dev);
+ if (ret < 0)
+ pr_err("Unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
+}
+
+module_init(rtc_init);
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists