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: 23483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from mail-qy0-f60.google.com (mail-qy0-f60.google.com [209.85.221.60]) by ozlabs.org (Postfix) with ESMTP id 0BA5CDDDEE for ; Sat, 21 Feb 2009 02:46:58 +1100 (EST) Received: by qyk20 with SMTP id 20so2296046qyk.1 for ; Fri, 20 Feb 2009 07:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:reply-to:sender:precedence:x-google-loop:mailing-list :list-id:list-post:list-help:list-unsubscribe:x-beenthere-env :x-beenthere; bh=vNZGy96MBqMEAEnlQqL6m0/SsSJJI2iqP5fm2cIUqx8=; b=Vs7gzyNvR6PA/0FZQHXsqhd7w1dc8Wwfj7Vnj+Vhr/0yqaaKRvQBXpClYN2vIuTRQ6 I/lSHuli+PI/fFVk9wrBlB+a1C+lg3lsvD6qI4EOJ76GwNj1Eefgl2HyUUrfiq7OhJ8R 3nQfE2d4eSU9r75u1YqdXUK6mejjTzHQ1rSzs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results:from :to:cc:subject:date:message-id:x-mailer:in-reply-to:references :reply-to:sender:precedence:x-google-loop:mailing-list:list-id :list-post:list-help:list-unsubscribe:x-beenthere-env:x-beenthere; b=I0oyAV+dETzff3zw/NhYF9goqTQqwMmVu1Zo8ylv7lrgImVS42x4IZy2ENxiiDJwSY fJDmBMOyLt9NHl+fH89c4mu46sakTIlKr91SCs4IWJqwD920esJ2IVM2eMsjtquGfsEd UN/en2CU0eW2tx8xZm+QHe58mtzvk1VIyBHQM= Received: by 10.229.84.80 with SMTP id i16mr110908qcl.7.1235144814097; Fri, 20 Feb 2009 07:46:54 -0800 (PST) Received: by 10.176.150.34 with SMTP id x34gr1917yqd.0; Fri, 20 Feb 2009 07:46:54 -0800 (PST) X-Sender: geert@sonycom.com X-Apparently-To: rtc-linux@googlegroups.com Received: by 10.86.94.11 with SMTP id r11mr121350fgb.13.1235144813525; Fri, 20 Feb 2009 07:46:53 -0800 (PST) Received: from vervifontaine.sonycom.com (vervifontaine.sonytel.be [80.88.33.193]) by mx.google.com with ESMTP id 3si286050fgg.13.2009.02.20.07.46.53; Fri, 20 Feb 2009 07:46:53 -0800 (PST) Received-SPF: neutral (google.com: 80.88.33.193 is neither permitted nor denied by best guess record for domain of geert@sonycom.com) client-ip=80.88.33.193; Authentication-Results: mx.google.com; spf=neutral (google.com: 80.88.33.193 is neither permitted nor denied by best guess record for domain of geert@sonycom.com) smtp.mail=geert@sonycom.com 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@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [rtc-linux] [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> Reply-To: rtc-linux@googlegroups.com Sender: rtc-linux@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rtc-linux@googlegroups.com; contact rtc-linux+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rtc-linux@googlegroups.com X-BeenThere: rtc-linux@googlegroups.com 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);