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: 8129 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1KFlJRx029840 for ; Fri, 20 Feb 2009 15:47:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758853AbZBTPq7 (ORCPT ); Fri, 20 Feb 2009 10:46:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758819AbZBTPq6 (ORCPT ); Fri, 20 Feb 2009 10:46:58 -0500 Received: from vervifontaine.sonytel.be ([80.88.33.193]:35448 "EHLO vervifontaine.sonycom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754145AbZBTPqy (ORCPT ); Fri, 20 Feb 2009 10:46:54 -0500 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 Cc: rtc-linux@googlegroups.com, Kyle McMartin , David Woodhouse , Richard Zidlicky , linux-parisc@vger.kernel.org, linuxppc-dev@ozlabs.org, linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven 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> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.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);