From patchwork Fri Feb 20 15:46:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 23486 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 8D0E5DDF19 for ; Sat, 21 Feb 2009 02:49:46 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from vervifontaine.sonycom.com (vervifontaine.sonytel.be [80.88.33.193]) by ozlabs.org (Postfix) with ESMTP id E1871DDDA1 for ; Sat, 21 Feb 2009 02:46:58 +1100 (EST) Received: from vixen.sonytel.be (piraat.sonytel.be [43.221.60.197]) by vervifontaine.sonycom.com (Postfix) with ESMTP id 35A4058C4F; Fri, 20 Feb 2009 16:46:52 +0100 (MET) Received: from geert by vixen.sonytel.be with local (Exim 4.63) (envelope-from ) id 1LaXaW-0008TW-3n; Fri, 20 Feb 2009 16:46:52 +0100 From: Geert Uytterhoeven To: Alessandro Zummo Subject: [PATCH/RFC 3/5] m68k: Enable rtc-generic Date: Fri, 20 Feb 2009 16:46:47 +0100 Message-Id: <1235144809-32468-4-git-send-email-Geert.Uytterhoeven@sonycom.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1235144809-32468-3-git-send-email-Geert.Uytterhoeven@sonycom.com> References: <1235144809-32468-1-git-send-email-Geert.Uytterhoeven@sonycom.com> <1235144809-32468-2-git-send-email-Geert.Uytterhoeven@sonycom.com> <1235144809-32468-3-git-send-email-Geert.Uytterhoeven@sonycom.com> Cc: Richard Zidlicky , rtc-linux@googlegroups.com, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Kyle McMartin , linuxppc-dev@ozlabs.org, linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven , David Woodhouse X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Signed-off-by: Geert Uytterhoeven --- 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 #include #include +#include #include #include @@ -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);