From patchwork Tue Apr 26 21:44:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102451 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1848140qge; Tue, 26 Apr 2016 14:45:32 -0700 (PDT) X-Received: by 10.66.253.68 with SMTP id zy4mr6826993pac.81.1461707132894; Tue, 26 Apr 2016 14:45:32 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fd2si1013825pac.68.2016.04.26.14.45.32; Tue, 26 Apr 2016 14:45:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752927AbcDZVpb (ORCPT + 29 others); Tue, 26 Apr 2016 17:45:31 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:63199 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752210AbcDZVp0 (ORCPT ); Tue, 26 Apr 2016 17:45:26 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LwEDC-1bmJNY1SAg-0186A6; Tue, 26 Apr 2016 23:44:46 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 1/8] char/rtc: replace blacklist with whitelist Date: Tue, 26 Apr 2016 23:44:05 +0200 Message-Id: <1461707052-1337718-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:03GHigK4UM203JlT4A/GcpASsEQw9XNLDzvfpwvrlHBfLqYz14G R52SzEGM4cQddMSGRqRWQ0Wr7jAyRvDCoAE+WDWocOkRNqAEtpdfdSLemGYDmDdEi1sQCBu Ailr/CZijprqbgKQxCiR0wBHVzhaRv46/TYLNFwTKGKUCKdc+DUWyL8gJyVOufSwCtcxMZr G5+eS18u059SW9tab9V4A== X-UI-Out-Filterresults: notjunk:1; V01:K0:kX8LncTnIDU=:H9hzXW55pcn17S1HuP884L XvkjTr4chTWGcX82Eqha07N3jp2HkBT2AqBDfZj7pJRuVifBGmMiodMB43nUoLD4Dvj9H7Ql4 nzH8/eTaUl9wFVSINGclCPeQNHSyUKX0P+x5M87Qr0zGG2F6bLJbnQBneFk6JZA1ZSLrNap9f yP4uO27svo5f/1MQrBPHzIhenc7KpsR+bXIwk56Uq4gVw/sQGUJ4LaP7uajkY4iE1mcZMq1aY hlsFgPip8kvcw2LCxsUyLh8A2Maema1FauJKgoYKCdSa4tHI5RPM2oxUScWDsWVZH+Pc6FIRn 4gwG99tSH1fd4mXAwelPZAd8rOVR20rk+43ZW/6f2Uhw//sI+yQyNGgrHDIzGojN4BwEP6w1N bz2lKqhg6auu8PZH1E03rJhEh0eLynP+kfcendNVJhcjgIEY0NnJxbZRK8v7+0SVhqJodD6cd +WvGAriOnN4PmKR5OcCSg8PAdSjNP8AK/RJYC70u3xxQB5A52EFxzhggPgzUzm7MIOjN6cVeY q7okgJHpZ6/H/Bgwabi9eegSGixg7z9oMUXlOwyvvuTy7Er3xfh7a3bhrYKKsNmdRH6al4q7X UZm1+ibPTBpiXzwQMlX3HNdMAok8wvqeibvZBeNTtX1W8nqx/Z/ULWakPjsM/cozk67Nt4OW3 K42mFinKb9zcP7q+dnfBA6xdTfOZTVGTsqDfJEkgJYRoFAw1oDrRgw1QCT2ButIzvv/I= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Every new architecture has to add itself to the growing list of those that do not support the legacy PC RTC driver. This replaces the long list of architectures that don't support it with a shorter list of those that do. The list is taken from those architectures that have a non-empty asm/mc146818rtc.h header file and were not explicitly blacklisted. Signed-off-by: Arnd Bergmann --- drivers/char/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.0 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 3ec0766ed5e9..66b5d48f409a 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -279,8 +279,7 @@ if RTC_LIB=n config RTC tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)" - depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ - && !ARM && !SUPERH && !S390 && !AVR32 && !BLACKFIN && !UML + depends on ALPHA || (MIPS && MACH_LOONGSON64) || MN10300 || X86 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you From patchwork Tue Apr 26 21:44:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102445 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1850112qge; Tue, 26 Apr 2016 14:50:58 -0700 (PDT) X-Received: by 10.98.86.77 with SMTP id k74mr6855689pfb.28.1461707458523; Tue, 26 Apr 2016 14:50:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x11si984649par.178.2016.04.26.14.50.58; Tue, 26 Apr 2016 14:50:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666AbcDZVu4 (ORCPT + 29 others); Tue, 26 Apr 2016 17:50:56 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:56384 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751885AbcDZVuy (ORCPT ); Tue, 26 Apr 2016 17:50:54 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LsdiP-1bs3s60QAL-012L89; Tue, 26 Apr 2016 23:44:47 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 2/8] char/rtc: legacy RTC is no longer supported on x86 Date: Tue, 26 Apr 2016 23:44:06 +0200 Message-Id: <1461707052-1337718-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:W8F9esVdeIF1tOhyAyY1IynX5Oylm8GTYkBRdek421DT/3KBrRH ytwhF0EdGoc3ux0RV8bU5yCgQPY02J3pkTcWjHzND4H2oFA1uTmSUOB5MSKG09i1XHNVTQ7 p3QYzd0SSMy5KY+jEs1KWcRUnhy/fK1ku+WgcPtY+maBiz25Hw2v3oDx21Ylv1/frYHyc1f /OwJEeS5MGRlqA0vAO8zQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:dUEq+emSVGM=:7iuQNhyv3UCN0NBS8kUcaJ pauL7qTO8wSExMFEtXvm1CvS4M09QK7niczCG7NsTG2sKvSIHO1nwHu6FEbSbUTy2ohxuhZiM sxqNwzooPz1uQ2UMnoRo4Pylbr92j1Bi56r3yvWCy8fiqcXUcR/hmfPgY7kA49IATJWMsyzVI 9YzbPwV76WRGC8PrzDpDZtujCfyMeWtu0KAwER7AhZxjVdtqMup/Lpbfd4IpgdUzjWdzZDJ+1 aDZayRTdP3g4ZGZzKPOJ32UA/F5hs+chkH8PXjBHKzbQmR7/AYICqh8XBZSflrE5BA4tj8+Bj qT2fXDy3JgLTNg7K995K+O7hsA6FOJyeB+nmS4fiWhCcRwsvhhEt+vnUF3jmdMbIyQ00mUBCJ Zr4b3iEXRmpNosKNvag0ar3CUcTCFBiB6JTWEZ7aPsIm7TjRonFQ4o5mDrPFPc4aWWCb6Nyz4 o4bGwG/IiDJVXpH1o7QtwuFmBzzyVZvJi3uUgBKU54oGcfDmwup/XDw+GHuQPrqybC+CMhA4L /xMnW7jnpIPeHtEbZ27B/xFq9KAwoC/TVyDqgfB5LfBn9L89k6K9Xr02DdTYRovTdhcxZiXki 0McJqZvjTuM6VGvW2ng87uKgrhe0mSZ2ux9AeuNgU9emsMy290YgnExiGCYu9n1b1osm/6wth TkD4N99eZfwFblLiKcdlL/hCHi9zc0DFHPz0x5hVP7nAx851sE2D8oLsfiMmYBeK7aeA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 3195ef59cb42 ("x86: Do full rtc synchronization with ntp") had the side-effect of unconditionally enabling the RTC_LIB symbol on x86, which in turn disables the selection of the CONFIG_RTC and CONFIG_GEN_RTC drivers that contain a two older implementations of the CONFIG_RTC_DRV_CMOS driver. This removes x86 from the list. Signed-off-by: Arnd Bergmann --- drivers/char/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 66b5d48f409a..9bdb629fbaae 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -279,7 +279,7 @@ if RTC_LIB=n config RTC tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)" - depends on ALPHA || (MIPS && MACH_LOONGSON64) || MN10300 || X86 + depends on ALPHA || (MIPS && MACH_LOONGSON64) || MN10300 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you @@ -328,7 +328,7 @@ config JS_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" depends on RTC!=y - depends on ALPHA || M68K || MN10300 || PARISC || PPC || X86 + depends on ALPHA || M68K || MN10300 || PARISC || PPC ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you From patchwork Tue Apr 26 21:44:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102448 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1848767qge; Tue, 26 Apr 2016 14:47:15 -0700 (PDT) X-Received: by 10.98.87.220 with SMTP id i89mr6800732pfj.107.1461707234917; Tue, 26 Apr 2016 14:47:14 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o86si6412329pfi.217.2016.04.26.14.47.14; Tue, 26 Apr 2016 14:47:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753147AbcDZVpq (ORCPT + 29 others); Tue, 26 Apr 2016 17:45:46 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:56565 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752998AbcDZVpl (ORCPT ); Tue, 26 Apr 2016 17:45:41 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0McRqW-1bChdX3Qf2-00HgeK; Tue, 26 Apr 2016 23:44:48 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 3/8] char/rtc: remove empty asm/mc146818rtc.h files Date: Tue, 26 Apr 2016 23:44:07 +0200 Message-Id: <1461707052-1337718-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:afhi0iTn1Gz1bo0wRnWsLzLP9cyaB02Tkq8dUSeiC5v4TED9siE oulsIQ9nkvViXlM5qxsjQ/PIW4OT1/89uCAv1RkcDmkZ2e7o4Q+0E3Mdwtc2TU5qQf1oAbm dzeGB3AJuZ1VeOc1hSHql1O7O3kZUfFXe/nK4h+fXMgNp/j1bIbVjBavVbMlPHgqF6zwJli IKg3YzpvyNF4w19VaKjeA== X-UI-Out-Filterresults: notjunk:1; V01:K0:dKv0rTkp+cQ=:RUO9HGaB5656kPshjyuRYd vKJ1WPnL/ieBhuUjGG16WdTFIfeqXlvg6fQxFKmgxDKJLjfccbfodiYTSj94ONz0l4nbFzy+/ j1t3WO9XZfSRjgyKmTNQcTCVDSji317oCPnUnNdR5UMoMoMqZHxvJFGd2BNy2f1Pw451ryhHS k8EtYlXxCmkkjgijtatmT29fKKj9JFu5hc/sUXjxKVrswteZ3IYpyqcAlQa609H7ZT86yr70H EmMH/2KFJKoGf9ghlcsga7BCwha3b390eRmYJhUypjQr5FTgimxgQo16BE2it0gXY8XyNdXS3 XfAeNbtrIcQ+c8yVF/RHXamrEJgOH1B0f2fdFpD+lD15glp1CBsbcSW1+1dwbR2tJ9hK8ZGqb /dCoK/jMqL7/A/1sgJx5iRJ9Pix48DiPGy/QEZb8Iu/SR5CjzjVS6G+oRo5K+cLqZkwD0jkqo oTcU/3g84TdDwCpd5zoqdw1jlKEaI0NMidNLVynY7cR8KzJbKYsTxkgx1vtW0qv5ttioavg/5 R8lQjr8tCA9ESYEH3Liive39aqFEGZyTP4h336Na8psFYKnwMa76T4mMuRCUfrSCf+9isXYCj /UY/kiYdmV4wwgYbIaxEUB8ibUG2wwann1+dmAI6yyp46ZZHG3LNZ95LIyRndwkcykHpMzXp8 uGmk341p8KMMs2DyKhQ8uG1fnDF1Vaf/vZh9xsnviut78hBl7ziBcZh4DbZ8GHWrXeM8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nothing on these architectures ever includes the asm/mc146818rtc.h file, the drivers that used to do this have been fixed long ago, and the remaining users are all PC-specific. This removes the files for good. Signed-off-by: Arnd Bergmann --- arch/frv/include/asm/mc146818rtc.h | 16 ---------------- arch/h8300/include/asm/mc146818rtc.h | 9 --------- arch/ia64/include/asm/mc146818rtc.h | 10 ---------- arch/parisc/include/asm/mc146818rtc.h | 9 --------- arch/sh/include/asm/mc146818rtc.h | 7 ------- 5 files changed, 51 deletions(-) delete mode 100644 arch/frv/include/asm/mc146818rtc.h delete mode 100644 arch/h8300/include/asm/mc146818rtc.h delete mode 100644 arch/ia64/include/asm/mc146818rtc.h delete mode 100644 arch/parisc/include/asm/mc146818rtc.h delete mode 100644 arch/sh/include/asm/mc146818rtc.h -- 2.7.0 diff --git a/arch/frv/include/asm/mc146818rtc.h b/arch/frv/include/asm/mc146818rtc.h deleted file mode 100644 index 90dfb7a633d1..000000000000 --- a/arch/frv/include/asm/mc146818rtc.h +++ /dev/null @@ -1,16 +0,0 @@ -/* mc146818rtc.h: RTC defs - * - * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@redhat.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifndef _ASM_MC146818RTC_H -#define _ASM_MC146818RTC_H - - -#endif /* _ASM_MC146818RTC_H */ diff --git a/arch/h8300/include/asm/mc146818rtc.h b/arch/h8300/include/asm/mc146818rtc.h deleted file mode 100644 index ab9d9646d241..000000000000 --- a/arch/h8300/include/asm/mc146818rtc.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Machine dependent access functions for RTC registers. - */ -#ifndef _H8300_MC146818RTC_H -#define _H8300_MC146818RTC_H - -/* empty include file to satisfy the include in genrtc.c/ide-geometry.c */ - -#endif /* _H8300_MC146818RTC_H */ diff --git a/arch/ia64/include/asm/mc146818rtc.h b/arch/ia64/include/asm/mc146818rtc.h deleted file mode 100644 index 407787a237ba..000000000000 --- a/arch/ia64/include/asm/mc146818rtc.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ASM_IA64_MC146818RTC_H -#define _ASM_IA64_MC146818RTC_H - -/* - * Machine dependent access functions for RTC registers. - */ - -/* empty include file to satisfy the include in genrtc.c */ - -#endif /* _ASM_IA64_MC146818RTC_H */ diff --git a/arch/parisc/include/asm/mc146818rtc.h b/arch/parisc/include/asm/mc146818rtc.h deleted file mode 100644 index adf41631449f..000000000000 --- a/arch/parisc/include/asm/mc146818rtc.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Machine dependent access functions for RTC registers. - */ -#ifndef _ASM_MC146818RTC_H -#define _ASM_MC146818RTC_H - -/* empty include file to satisfy the include in genrtc.c */ - -#endif /* _ASM_MC146818RTC_H */ diff --git a/arch/sh/include/asm/mc146818rtc.h b/arch/sh/include/asm/mc146818rtc.h deleted file mode 100644 index 0aee96a97330..000000000000 --- a/arch/sh/include/asm/mc146818rtc.h +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Machine dependent access functions for RTC registers. - */ -#ifndef _ASM_MC146818RTC_H -#define _ASM_MC146818RTC_H - -#endif /* _ASM_MC146818RTC_H */ From patchwork Tue Apr 26 21:44:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102444 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1850251qge; Tue, 26 Apr 2016 14:51:21 -0700 (PDT) X-Received: by 10.66.66.77 with SMTP id d13mr6987307pat.75.1461707481707; Tue, 26 Apr 2016 14:51:21 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 81si6412863pfq.221.2016.04.26.14.51.21; Tue, 26 Apr 2016 14:51:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbcDZVvN (ORCPT + 29 others); Tue, 26 Apr 2016 17:51:13 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:62709 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194AbcDZVuz (ORCPT ); Tue, 26 Apr 2016 17:50:55 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LdZnq-1bcS262R5G-00ije2; Tue, 26 Apr 2016 23:44:49 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 4/8] char/rtc: move mc146818rtc code out of asm-generic/rtc.h Date: Tue, 26 Apr 2016 23:44:08 +0200 Message-Id: <1461707052-1337718-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:jxYZATcyQCFH4rnu8sLVFuZjEusihm3g+pHzUVpLxbEJY+pXQNJ 0rIxzoe4l4PEjhPIN5nQt9Yi5pf31oBgKfJOSqQq0d8BuAEzjBRwLZpto7Jv1hVHcQigI+Z N+0zI3+48yEzI312BLhtD5xLdzLLGMlmk1WCe4cLsFK9qA/0r2F/lyNLTqvdEbLrm1sB2FT 35pwGmOKuXkvLpgekWxsA== X-UI-Out-Filterresults: notjunk:1; V01:K0:/FuoRszp2Vo=:F/Oao36MkuBKS53XCJi8eh A8GU+uXlBE16xPL5f7BK6Edph46SLxRpfuzMXGwpBTSD04eoAa6bdSAgFRj8QgXuz5LaOlOzg YVgjsfydAvz/nFdpG8SOxX+RObJJ3pAG6zAKnpWEfmHqSxY4lJga8BjQ5uyAx+RH9KvLtcyxp oXGWE71bvKjcQYtemGleBPW3RqFZxW0M5C4zw2b6af/CTJi3pTwTALZHoJFdI33x8Xe8jIidT 7FIfaa1pl2rLhsoIueCrVMzRbkCePsJ5420XwdM2GkeaMVD7wpZk0MQhmOYGBcWYkIPg9iCU5 VKXqZxhwrbXIKUqSZCjeYJ2S4TL9TbnL7nWGxJO82yimEORCL1Almrxxz1iQPDbCn+wSGUPUC q8qyGVf5nLLrvIOyEelMQv3xIeHPbl0AeWYEOJeDnMNe58r9mO19MifJ88+CHmAULriuaUQRg qQ6pDIn+fmNIpJ6ScO6Hy8sVQ79c8uhDGhxctPnuBVX7t8gZa7+0oXq8lMHU1SA1cmJazoBRP KsqdpLfTYJy9KpR/DHilAHQY8QfZUPKbsJh3fMo700WN5nWchhBSuuAHb+MT/vTFzBP81ki8J 94V4a4DFqLVbyt4JEV2kCcAz7E/4V8TFhYx0/f5awLDkPM2MlrIZLuk/SoUu921xapnj0ZRRi +2jLMctBIF8mCiwga0KPhF1lVyH1RglF7rO+HYYyV/V18SCnf6kijywQz0wU1VcBC1fY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drivers should not really include stuff from asm-generic directly, and the PC-style cmos rtc driver does this in order to reuse the mc146818 implementation of get_rtc_time/set_rtc_time rather than the architecture specific one for the architecture it gets built for. To make it more obvious what is going on, this moves and renames the two functions into include/linux/mc146818rtc.h, which holds the other mc146818 specific code. Ideally it would be in a .c file, but that would require extra infrastructure as the functions are called by multiple drivers with conflicting dependencies. With this change, the asm-generic/rtc.h header also becomes much more generic, so it can be reused more easily across any architecture that still relies on the genrtc driver. Signed-off-by: Arnd Bergmann --- drivers/rtc/rtc-cmos.c | 12 +-- include/asm-generic/rtc.h | 206 ++------------------------------------------ include/linux/mc146818rtc.h | 194 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 205 insertions(+), 207 deletions(-) -- 2.7.0 diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 84fb541038be..c7993f18edfa 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -43,7 +43,7 @@ #include /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ -#include +#include struct cmos_rtc { struct rtc_device *rtc; @@ -190,10 +190,10 @@ static inline void cmos_write_bank2(unsigned char val, unsigned char addr) static int cmos_read_time(struct device *dev, struct rtc_time *t) { /* REVISIT: if the clock has a "century" register, use - * that instead of the heuristic in get_rtc_time(). + * that instead of the heuristic in mc146818_get_time(). * That'll make Y3K compatility (year > 2070) easy! */ - get_rtc_time(t); + mc146818_get_time(t); return 0; } @@ -205,7 +205,7 @@ static int cmos_set_time(struct device *dev, struct rtc_time *t) * takes effect exactly 500ms after we write the register. * (Also queueing and other delays before we get this far.) */ - return set_rtc_time(t); + return mc146818_set_time(t); } static int cmos_read_alarm(struct device *dev, struct rtc_wkalrm *t) @@ -1142,14 +1142,14 @@ static __init void cmos_of_init(struct platform_device *pdev) if (val) CMOS_WRITE(be32_to_cpup(val), RTC_FREQ_SELECT); - get_rtc_time(&time); + cmos_read_time(&pdev->dev, &time); ret = rtc_valid_tm(&time); if (ret) { struct rtc_time def_time = { .tm_year = 1, .tm_mday = 1, }; - set_rtc_time(&def_time); + cmos_set_time(&pdev->dev, &def_time); } } #else diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h index 4e3b6558331e..4fcff22cd707 100644 --- a/include/asm-generic/rtc.h +++ b/include/asm-generic/rtc.h @@ -12,12 +12,12 @@ #ifndef __ASM_RTC_H__ #define __ASM_RTC_H__ -#include #include -#include -#include -#ifdef CONFIG_ACPI -#include + +#ifndef get_rtc_time +#include +#define get_rtc_time mc146818_get_time +#define set_rtc_time mc146818_set_time #endif #define RTC_PIE 0x40 /* periodic interrupt enable */ @@ -31,202 +31,6 @@ #define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ #define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ -/* - * Returns true if a clock update is in progress - */ -static inline unsigned char rtc_is_updating(void) -{ - unsigned char uip; - unsigned long flags; - - spin_lock_irqsave(&rtc_lock, flags); - uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); - spin_unlock_irqrestore(&rtc_lock, flags); - return uip; -} - -static inline unsigned int __get_rtc_time(struct rtc_time *time) -{ - unsigned char ctrl; - unsigned long flags; - unsigned char century = 0; - -#ifdef CONFIG_MACH_DECSTATION - unsigned int real_year; -#endif - - /* - * read RTC once any update in progress is done. The update - * can take just over 2ms. We wait 20ms. There is no need to - * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. - * If you need to know *exactly* when a second has started, enable - * periodic update complete interrupts, (via ioctl) and then - * immediately read /dev/rtc which will block until you get the IRQ. - * Once the read clears, read the RTC time (again via ioctl). Easy. - */ - if (rtc_is_updating()) - mdelay(20); - - /* - * Only the values that we read from the RTC are set. We leave - * tm_wday, tm_yday and tm_isdst untouched. Even though the - * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated - * by the RTC when initially set to a non-zero value. - */ - spin_lock_irqsave(&rtc_lock, flags); - time->tm_sec = CMOS_READ(RTC_SECONDS); - time->tm_min = CMOS_READ(RTC_MINUTES); - time->tm_hour = CMOS_READ(RTC_HOURS); - time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); - time->tm_mon = CMOS_READ(RTC_MONTH); - time->tm_year = CMOS_READ(RTC_YEAR); -#ifdef CONFIG_MACH_DECSTATION - real_year = CMOS_READ(RTC_DEC_YEAR); -#endif -#ifdef CONFIG_ACPI - if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && - acpi_gbl_FADT.century) - century = CMOS_READ(acpi_gbl_FADT.century); -#endif - ctrl = CMOS_READ(RTC_CONTROL); - spin_unlock_irqrestore(&rtc_lock, flags); - - if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) - { - time->tm_sec = bcd2bin(time->tm_sec); - time->tm_min = bcd2bin(time->tm_min); - time->tm_hour = bcd2bin(time->tm_hour); - time->tm_mday = bcd2bin(time->tm_mday); - time->tm_mon = bcd2bin(time->tm_mon); - time->tm_year = bcd2bin(time->tm_year); - century = bcd2bin(century); - } - -#ifdef CONFIG_MACH_DECSTATION - time->tm_year += real_year - 72; -#endif - - if (century) - time->tm_year += (century - 19) * 100; - - /* - * Account for differences between how the RTC uses the values - * and how they are defined in a struct rtc_time; - */ - if (time->tm_year <= 69) - time->tm_year += 100; - - time->tm_mon--; - - return RTC_24H; -} - -#ifndef get_rtc_time -#define get_rtc_time __get_rtc_time -#endif - -/* Set the current date and time in the real time clock. */ -static inline int __set_rtc_time(struct rtc_time *time) -{ - unsigned long flags; - unsigned char mon, day, hrs, min, sec; - unsigned char save_control, save_freq_select; - unsigned int yrs; -#ifdef CONFIG_MACH_DECSTATION - unsigned int real_yrs, leap_yr; -#endif - unsigned char century = 0; - - yrs = time->tm_year; - mon = time->tm_mon + 1; /* tm_mon starts at zero */ - day = time->tm_mday; - hrs = time->tm_hour; - min = time->tm_min; - sec = time->tm_sec; - - if (yrs > 255) /* They are unsigned */ - return -EINVAL; - - spin_lock_irqsave(&rtc_lock, flags); -#ifdef CONFIG_MACH_DECSTATION - real_yrs = yrs; - leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || - !((yrs + 1900) % 400)); - yrs = 72; - - /* - * We want to keep the year set to 73 until March - * for non-leap years, so that Feb, 29th is handled - * correctly. - */ - if (!leap_yr && mon < 3) { - real_yrs--; - yrs = 73; - } -#endif - -#ifdef CONFIG_ACPI - if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && - acpi_gbl_FADT.century) { - century = (yrs + 1900) / 100; - yrs %= 100; - } -#endif - - /* These limits and adjustments are independent of - * whether the chip is in binary mode or not. - */ - if (yrs > 169) { - spin_unlock_irqrestore(&rtc_lock, flags); - return -EINVAL; - } - - if (yrs >= 100) - yrs -= 100; - - if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) - || RTC_ALWAYS_BCD) { - sec = bin2bcd(sec); - min = bin2bcd(min); - hrs = bin2bcd(hrs); - day = bin2bcd(day); - mon = bin2bcd(mon); - yrs = bin2bcd(yrs); - century = bin2bcd(century); - } - - save_control = CMOS_READ(RTC_CONTROL); - CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); - save_freq_select = CMOS_READ(RTC_FREQ_SELECT); - CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); - -#ifdef CONFIG_MACH_DECSTATION - CMOS_WRITE(real_yrs, RTC_DEC_YEAR); -#endif - CMOS_WRITE(yrs, RTC_YEAR); - CMOS_WRITE(mon, RTC_MONTH); - CMOS_WRITE(day, RTC_DAY_OF_MONTH); - CMOS_WRITE(hrs, RTC_HOURS); - CMOS_WRITE(min, RTC_MINUTES); - CMOS_WRITE(sec, RTC_SECONDS); -#ifdef CONFIG_ACPI - if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && - acpi_gbl_FADT.century) - CMOS_WRITE(century, acpi_gbl_FADT.century); -#endif - - CMOS_WRITE(save_control, RTC_CONTROL); - CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); - - spin_unlock_irqrestore(&rtc_lock, flags); - - return 0; -} - -#ifndef set_rtc_time -#define set_rtc_time __set_rtc_time -#endif - static inline unsigned int get_rtc_ss(void) { struct rtc_time h; diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 433e0c74d643..e9e346b37846 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h @@ -14,6 +14,12 @@ #include #include /* get the user-level API */ #include /* register access macros */ +#include +#include + +#ifdef CONFIG_ACPI +#include +#endif #ifdef __KERNEL__ #include /* spinlock_t */ @@ -120,4 +126,192 @@ struct cmos_rtc_board_info { #define RTC_IO_EXTENT_USED RTC_IO_EXTENT #endif /* ARCH_RTC_LOCATION */ +/* + * Returns true if a clock update is in progress + */ +static inline unsigned char mc146818_is_updating(void) +{ + unsigned char uip; + unsigned long flags; + + spin_lock_irqsave(&rtc_lock, flags); + uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP); + spin_unlock_irqrestore(&rtc_lock, flags); + return uip; +} + +static inline unsigned int mc146818_get_time(struct rtc_time *time) +{ + unsigned char ctrl; + unsigned long flags; + unsigned char century = 0; + +#ifdef CONFIG_MACH_DECSTATION + unsigned int real_year; +#endif + + /* + * read RTC once any update in progress is done. The update + * can take just over 2ms. We wait 20ms. There is no need to + * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP. + * If you need to know *exactly* when a second has started, enable + * periodic update complete interrupts, (via ioctl) and then + * immediately read /dev/rtc which will block until you get the IRQ. + * Once the read clears, read the RTC time (again via ioctl). Easy. + */ + if (mc146818_is_updating()) + mdelay(20); + + /* + * Only the values that we read from the RTC are set. We leave + * tm_wday, tm_yday and tm_isdst untouched. Even though the + * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated + * by the RTC when initially set to a non-zero value. + */ + spin_lock_irqsave(&rtc_lock, flags); + time->tm_sec = CMOS_READ(RTC_SECONDS); + time->tm_min = CMOS_READ(RTC_MINUTES); + time->tm_hour = CMOS_READ(RTC_HOURS); + time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); + time->tm_mon = CMOS_READ(RTC_MONTH); + time->tm_year = CMOS_READ(RTC_YEAR); +#ifdef CONFIG_MACH_DECSTATION + real_year = CMOS_READ(RTC_DEC_YEAR); +#endif +#ifdef CONFIG_ACPI + if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && + acpi_gbl_FADT.century) + century = CMOS_READ(acpi_gbl_FADT.century); +#endif + ctrl = CMOS_READ(RTC_CONTROL); + spin_unlock_irqrestore(&rtc_lock, flags); + + if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD) + { + time->tm_sec = bcd2bin(time->tm_sec); + time->tm_min = bcd2bin(time->tm_min); + time->tm_hour = bcd2bin(time->tm_hour); + time->tm_mday = bcd2bin(time->tm_mday); + time->tm_mon = bcd2bin(time->tm_mon); + time->tm_year = bcd2bin(time->tm_year); + century = bcd2bin(century); + } + +#ifdef CONFIG_MACH_DECSTATION + time->tm_year += real_year - 72; +#endif + + if (century) + time->tm_year += (century - 19) * 100; + + /* + * Account for differences between how the RTC uses the values + * and how they are defined in a struct rtc_time; + */ + if (time->tm_year <= 69) + time->tm_year += 100; + + time->tm_mon--; + + return RTC_24H; +} + +/* Set the current date and time in the real time clock. */ +static inline int mc146818_set_time(struct rtc_time *time) +{ + unsigned long flags; + unsigned char mon, day, hrs, min, sec; + unsigned char save_control, save_freq_select; + unsigned int yrs; +#ifdef CONFIG_MACH_DECSTATION + unsigned int real_yrs, leap_yr; +#endif + unsigned char century = 0; + + yrs = time->tm_year; + mon = time->tm_mon + 1; /* tm_mon starts at zero */ + day = time->tm_mday; + hrs = time->tm_hour; + min = time->tm_min; + sec = time->tm_sec; + + if (yrs > 255) /* They are unsigned */ + return -EINVAL; + + spin_lock_irqsave(&rtc_lock, flags); +#ifdef CONFIG_MACH_DECSTATION + real_yrs = yrs; + leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || + !((yrs + 1900) % 400)); + yrs = 72; + + /* + * We want to keep the year set to 73 until March + * for non-leap years, so that Feb, 29th is handled + * correctly. + */ + if (!leap_yr && mon < 3) { + real_yrs--; + yrs = 73; + } +#endif + +#ifdef CONFIG_ACPI + if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && + acpi_gbl_FADT.century) { + century = (yrs + 1900) / 100; + yrs %= 100; + } +#endif + + /* These limits and adjustments are independent of + * whether the chip is in binary mode or not. + */ + if (yrs > 169) { + spin_unlock_irqrestore(&rtc_lock, flags); + return -EINVAL; + } + + if (yrs >= 100) + yrs -= 100; + + if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) + || RTC_ALWAYS_BCD) { + sec = bin2bcd(sec); + min = bin2bcd(min); + hrs = bin2bcd(hrs); + day = bin2bcd(day); + mon = bin2bcd(mon); + yrs = bin2bcd(yrs); + century = bin2bcd(century); + } + + save_control = CMOS_READ(RTC_CONTROL); + CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL); + save_freq_select = CMOS_READ(RTC_FREQ_SELECT); + CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); + +#ifdef CONFIG_MACH_DECSTATION + CMOS_WRITE(real_yrs, RTC_DEC_YEAR); +#endif + CMOS_WRITE(yrs, RTC_YEAR); + CMOS_WRITE(mon, RTC_MONTH); + CMOS_WRITE(day, RTC_DAY_OF_MONTH); + CMOS_WRITE(hrs, RTC_HOURS); + CMOS_WRITE(min, RTC_MINUTES); + CMOS_WRITE(sec, RTC_SECONDS); +#ifdef CONFIG_ACPI + if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID && + acpi_gbl_FADT.century) + CMOS_WRITE(century, acpi_gbl_FADT.century); +#endif + + CMOS_WRITE(save_control, RTC_CONTROL); + CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); + + spin_unlock_irqrestore(&rtc_lock, flags); + + return 0; +} + #endif /* _MC146818RTC_H */ From patchwork Tue Apr 26 21:44:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102447 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1848876qge; Tue, 26 Apr 2016 14:47:33 -0700 (PDT) X-Received: by 10.66.159.232 with SMTP id xf8mr6893108pab.71.1461707253304; Tue, 26 Apr 2016 14:47:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si6280080pfd.242.2016.04.26.14.47.33; Tue, 26 Apr 2016 14:47:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432AbcDZVrb (ORCPT + 29 others); Tue, 26 Apr 2016 17:47:31 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:51966 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753003AbcDZVpo (ORCPT ); Tue, 26 Apr 2016 17:45:44 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LhzeA-1bY4JP1Rsw-00n7Mk; Tue, 26 Apr 2016 23:44:49 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 5/8] char/genrtc: powerpc: use asm-generic/rtc.h Date: Tue, 26 Apr 2016 23:44:09 +0200 Message-Id: <1461707052-1337718-6-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:n6EnnEqhTcyhUez+lE/8RFP0cwH+yHqEoK3+G7YpPf1MQ0qAb/h rrdRZ/m8fxh4Wo/C1ROrTVcz17U0HTicwoH05lXz5WgxjyMxSNNJy82PG1Ye4l5w393wnr2 Ryxjj6++VLbVG3o4vRmA0ZSxJHjK2TwGYaxzWgZ+Wy+KJeC9iuEbbwwqPbikUr9EEJq4wQe 7IVII3PqLbm+IF3fkJoiQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:xJZ/ob6cTmE=:yJ+b9/YSpzNPRm9v9dg29n VcUy+P+UtwGxw7Ow77Mfxiu3PoNrGf/Hy26F/L8r6VVlkXDyMoZH85QFGbbPSsk9khieiiU8H H5HGK5B9c6+uEp/IzVHal9yE1eobxfbiczTPW19emVM2xnaqmtpXq6PV85XhUxLk/bg4e7j9E s2etQrZcUb4nKXV/AEi7nYiKxSYUHG8fi/hBUiIV1UiZ2vOTsVdNTBYrG4H30O4hrYlPtfMAB hVpLTxTv+NF/P3OX20QUgqgg7itFHugQF4A+XrcVR5EFOxI/8BpeTY+RvP3Hz7xvJXiwYgU2J gDKgWIzEuVUZrlnLIJhLsm3kOP/bIV3R6JYRBytT6Yywqy1Hb9bkx527bs1YeVIZkXfHrOtkp FSsTNS61UB3WDzkG1bw96CKj0mN2C8KJmbMGtX0T0QQIvVa09a4n8Q7XCzKGFhKyb+Fr5aoOB wnhGB1rwd++uEaHA9oVuu0CZREe/mOtnWt9I+2tlRRUbT2pS+qUG1kg843K2Mac+gBLo/3Ptm W+dKyYdc7u69XZl80/+0bvcbp6QPbmdoB2o40wMHpfNDVw0te5xQ+cUILQF+UryOfofqEs1sb +EhI22m0AIFYTe3lfRYkxCE28C210+RSyKl7h+4bpz2Hz+9EI4W6I8h7XVAklazxjPh1g6a3D jDAt5ApsLKdvK8gI4VkKJDsm2DJsoleW2pxgcrEtKNN8XLuh+ay/dS/SGedKcJCuxEog= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The asm-generic/rtc.h header can now be included by architectures that provide their own set_rtc_time/get_rtc_time macros, letting us remove most of the common contents in the powerpc implementation. Signed-off-by: Arnd Bergmann --- arch/powerpc/include/asm/rtc.h | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) -- 2.7.0 diff --git a/arch/powerpc/include/asm/rtc.h b/arch/powerpc/include/asm/rtc.h index f5802926b6c0..c6659582bd1e 100644 --- a/arch/powerpc/include/asm/rtc.h +++ b/arch/powerpc/include/asm/rtc.h @@ -26,23 +26,14 @@ #ifdef __KERNEL__ -#include +#define get_rtc_time powerpc_get_rtc_time +#define set_rtc_time powerpc_set_rtc_time +#include #include #include -#define RTC_PIE 0x40 /* periodic interrupt enable */ -#define RTC_AIE 0x20 /* alarm interrupt enable */ -#define RTC_UIE 0x10 /* update-finished interrupt enable */ - -/* some dummy definitions */ -#define RTC_BATT_BAD 0x100 /* battery bad */ -#define RTC_SQWE 0x08 /* enable square-wave output */ -#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */ -#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ -#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ - -static inline unsigned int get_rtc_time(struct rtc_time *time) +static inline unsigned int powerpc_get_rtc_time(struct rtc_time *time) { if (ppc_md.get_rtc_time) ppc_md.get_rtc_time(time); @@ -50,29 +41,12 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) } /* Set the current date and time in the real time clock. */ -static inline int set_rtc_time(struct rtc_time *time) +static inline int powerpc_set_rtc_time(struct rtc_time *time) { if (ppc_md.set_rtc_time) return ppc_md.set_rtc_time(time); return -EINVAL; } -static inline unsigned int get_rtc_ss(void) -{ - struct rtc_time h; - - get_rtc_time(&h); - return h.tm_sec; -} - -static inline int get_rtc_pll(struct rtc_pll_info *pll) -{ - return -EINVAL; -} -static inline int set_rtc_pll(struct rtc_pll_info *pll) -{ - return -EINVAL; -} - #endif /* __KERNEL__ */ #endif /* __ASM_POWERPC_RTC_H__ */ From patchwork Tue Apr 26 21:44:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102450 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1848245qge; Tue, 26 Apr 2016 14:45:51 -0700 (PDT) X-Received: by 10.98.11.78 with SMTP id t75mr6874010pfi.72.1461707151638; Tue, 26 Apr 2016 14:45:51 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bw8si986035pad.127.2016.04.26.14.45.51; Tue, 26 Apr 2016 14:45:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753220AbcDZVpr (ORCPT + 29 others); Tue, 26 Apr 2016 17:45:47 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:50003 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752995AbcDZVpk (ORCPT ); Tue, 26 Apr 2016 17:45:40 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MLC4r-1autff0H7B-000IM9; Tue, 26 Apr 2016 23:44:50 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 6/8] char/genrtc: parisc: use asm-generic/rtc.h Date: Tue, 26 Apr 2016 23:44:10 +0200 Message-Id: <1461707052-1337718-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:sXjnu+yLbJ0+8mwMLqVfNGQCmCTwkOOIw8LW3r5jFUHt+q9Zwid oXdYXjz/tf3JbVRSW+bBjNuhiDwSPW0fApYuaGZER5Ay6JCcTPMjsNKMpBQRc6IRgmpBon7 W+trkalUKHKCJHg13HxbTFiqot/N2Qzw5lQMY7sDR0utS1nEHkN26R/UBxuIDce17pO7wL8 duftyI3heNq10EC8bGQeA== X-UI-Out-Filterresults: notjunk:1; V01:K0:MSF0vB5mxuQ=:Dvs55qd+W/DOWuTjpa0YAT Ur7c33pgU8Pw0Ox0RoXN9kXgBSVZBOAcUQzk3tZ9dsp2CjNe7DNCqxocos9Q0MGCX/Q+EGjgq h1FSyXXjlNQSdqisQyViAofmMX4H6MHTvSjeGCQNoxwf35h8n10Xoae8P53rn4Xj44HoleILN ABtjyKoaM1zNbFyIMAWV1fLMVLQULM8Wgjpnx0tU0P+kQ+qkw0NkYJZ7JsVTLCOH+Rmi2Pix5 YO63i+psYuxn4oA+DSG1e+TqFzr0kUmJvrc0XNMU2LaSyi3LfJWhIsHLunMQ1fZKZQ6KHsnOY GzfgLBAGCkZ03caSj0mPEut9jKf9SIU8d51JnfH6Z9H4IvCJhlq8c/Smx8Ty9/DNoRhwSzLBT ToD/tGlW7ess9SByeTpjSKdWixt6cMXg+okWez+a1NhAeeilpxNVFBKwxkiCOToqmila50z6l nTmogtS2u+8ZW7iOdoClhueDF3prOv1y+LpKpBp319Jh25q9YhqDCL49BySgCA7zru1SPT0iT pFnHv3HfA2OY+Ua26NEDtXtkzE5C7eFMTMaIO9gZNnNIygiOvc0tKdlKpoLTJl3v8PBCfZNMh NRGT9KDx9en742sgH2M0db4P1kDNZnx3O1VxGd8ZMboTXfJRcO2SyUkOUWf4ldi+9Jhfb6QLc REmwYLH0B+DGYQL4klnNUBxBZ1WpzoRMnNf3VlVjwq9ibK3BS5eZMqtnymNUNjxdB5dY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The asm-generic/rtc.h header can now be included by architectures that provide their own set_rtc_time/get_rtc_time macros, letting us remove most of the common contents in the powerpc implementation. Signed-off-by: Arnd Bergmann --- arch/parisc/include/asm/rtc.h | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) -- 2.7.0 diff --git a/arch/parisc/include/asm/rtc.h b/arch/parisc/include/asm/rtc.h index 099d641a42c2..d06cc581ecc2 100644 --- a/arch/parisc/include/asm/rtc.h +++ b/arch/parisc/include/asm/rtc.h @@ -12,26 +12,15 @@ #ifdef __KERNEL__ -#include +#define get_rtc_time parisc_get_rtc_time +#define set_rtc_time parisc_set_rtc_time +#include #include #define SECS_PER_HOUR (60 * 60) #define SECS_PER_DAY (SECS_PER_HOUR * 24) - -#define RTC_PIE 0x40 /* periodic interrupt enable */ -#define RTC_AIE 0x20 /* alarm interrupt enable */ -#define RTC_UIE 0x10 /* update-finished interrupt enable */ - -#define RTC_BATT_BAD 0x100 /* battery bad */ - -/* some dummy definitions */ -#define RTC_SQWE 0x08 /* enable square-wave output */ -#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */ -#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ -#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ - # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) @@ -44,7 +33,7 @@ static const unsigned short int __mon_yday[2][13] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } }; -static inline unsigned int get_rtc_time(struct rtc_time *wtime) +static inline unsigned int parisc_get_rtc_time(struct rtc_time *wtime) { struct pdc_tod tod_data; long int days, rem, y; @@ -96,7 +85,7 @@ static inline unsigned int get_rtc_time(struct rtc_time *wtime) return RTC_24H; } -static int set_rtc_time(struct rtc_time *wtime) +static int parisc_set_rtc_time(struct rtc_time *wtime) { u_int32_t secs; @@ -110,22 +99,5 @@ static int set_rtc_time(struct rtc_time *wtime) } -static inline unsigned int get_rtc_ss(void) -{ - struct rtc_time h; - - get_rtc_time(&h); - return h.tm_sec; -} - -static inline int get_rtc_pll(struct rtc_pll_info *pll) -{ - return -EINVAL; -} -static inline int set_rtc_pll(struct rtc_pll_info *pll) -{ - return -EINVAL; -} - #endif /* __KERNEL__ */ #endif /* __ASM_RTC_H__ */ From patchwork Tue Apr 26 21:44:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102446 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1848991qge; Tue, 26 Apr 2016 14:47:51 -0700 (PDT) X-Received: by 10.66.62.106 with SMTP id x10mr6949915par.136.1461707270922; Tue, 26 Apr 2016 14:47:50 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si5399504paw.5.2016.04.26.14.47.50; Tue, 26 Apr 2016 14:47:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788AbcDZVpa (ORCPT + 29 others); Tue, 26 Apr 2016 17:45:30 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:58296 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbcDZVp0 (ORCPT ); Tue, 26 Apr 2016 17:45:26 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LnFtp-1bMHvz3KpB-00hKDR; Tue, 26 Apr 2016 23:44:51 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 7/8] char/genrtc: disallow building on Alpha Date: Tue, 26 Apr 2016 23:44:11 +0200 Message-Id: <1461707052-1337718-8-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:Bs9peEVr1AVnKuL2byYQVF5LlxOxdHfDlKyTdv/sarHijJ9i5al 9TDFuhwQdPztANrp0yvv5rRjEiuWyFfFND+/2NYDnpbvvvVXQknhopqAoP9zpvGVkRaRUER 3JiIxjssJuAN3RoPMe1c4a1I/EmXQ8IlDghJvSrmlC2dWXFZJmFVB5ACHtFgRY6SZlIG7eq kAa5wdh2isSh4F0VQKyNw== X-UI-Out-Filterresults: notjunk:1; V01:K0:ObW0x+54NAs=:CbY84Rb0NXyHX8HuuReVQE gGBcVRijGZebo5y1M+OgG0BgtqDfR2KQlU/njzRNR9Vv9uBAGkq89jQ2srJBR+a8t0a16eCdQ OaDY3UY0Fqg0sFVM3gMsXQNq8/vbrN46MadkgXcm59mWJjegoHK11RN3Ox/2Bph83j8Pa/Zbw 2+KiGpb3dP1PPCtgmSraUEnBUZZTNLoC8zilXoYSBV6AHHBMrnzEpMTk7/6DFFFt7sYqpgD8t IM8tHlfoIU0rXhDaMB1X6N3vB4UJgBKsS7kbKv+35yP95mFi2LmPJ+u/nAO+f//6u/WNs+PCl 8dctboMMFgGZRbaKzC5M2Yt4jP+EGbxfOsFbFcdZVZyGm6hvZI8ElYdcsLMKWNTEn7VL6zxUq oONt7UWaHY7aGBB8IMYZ+G1lNayuEq3f0bTWCqP3EUL4D5om4ET1PEuh++SJotwcHTpYbGGT1 Hqraiv0p1H1wiedFznIjkM9ZMFihUl3K4eKYEnXANhIR2T4AeeZKxc5rSXEJkrwI0K9L8u0jZ l4NyJyR43R/E1D9nC3frSbEUrh+OWZmOc2UaiGS+1mLYucTHmnmIJOFnYbAr3AbM1VmHqBovJ JwbucOkibn/CA4q75YMec8atNQE82NumGipYECRFhl9nFS74ZffWqT1tuIJKUMZP0ZtWqDWJN lQ/Z8yuy8zMKMcOaWRJBu929IVaNHxcvfW8tePK4m+XRldjS2ZZ96cREPKVtArF2nXzc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The genrtc driver serves no purpose on Alpha because it drives the same hardware as the original rtc.c driver, and the newer rtc-generic.c or rtc-cmos.c drivers on architectures that use the asm-generic/rtc.h header. The defconfig uses CONFIG_RTC=y, so this driver is not used by default. At one point it was used to abstract a quirk for the "Marvel" platform, but it does not do this any more after the code was moved into yet another driver in arch/alpha/kernel/rtc.c. Signed-off-by: Arnd Bergmann --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 9bdb629fbaae..697510325b1d 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -328,7 +328,7 @@ config JS_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" depends on RTC!=y - depends on ALPHA || M68K || MN10300 || PARISC || PPC + depends on M68K || MN10300 || PARISC || PPC ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you From patchwork Tue Apr 26 21:44:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102449 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1848401qge; Tue, 26 Apr 2016 14:46:17 -0700 (PDT) X-Received: by 10.98.48.71 with SMTP id w68mr6874088pfw.18.1461707177297; Tue, 26 Apr 2016 14:46:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id td3si5392400pac.24.2016.04.26.14.46.16; Tue, 26 Apr 2016 14:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753300AbcDZVpv (ORCPT + 29 others); Tue, 26 Apr 2016 17:45:51 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:52041 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752998AbcDZVpr (ORCPT ); Tue, 26 Apr 2016 17:45:47 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0Lr6Rz-1bP1km2K5T-00eYnH; Tue, 26 Apr 2016 23:44:52 +0200 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , tony.luck@intel.com, geert@linux-m68k.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, rth@twiddle.net, ink@jurassic.park.msu.ru, linux-alpha@vger.kernel.org, x86@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [PATCH 8/8] char/genrtc: disallow building on mn10300 Date: Tue, 26 Apr 2016 23:44:12 +0200 Message-Id: <1461707052-1337718-9-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461707052-1337718-1-git-send-email-arnd@arndb.de> References: <1461707052-1337718-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:+nhMOiH3amIU1G8S/bwKbpBLYn5CymGTkSSi1bny9Ga9VBd29/p YpFPvKhL/ESnpbnENKjgYtMTUPkGpY+jiLxdPe/Z5egf9v0Eo0Eg4hB+S2NpoT/L7+Xtkw+ s8l0c23fJxLKLPjvsATypw+ISclMWq78OKoH3cnnaQRzp/2WggIU8DBthG+bt2aLCPT0Q+B 83qOjoTY8wK8EGsorcAWQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:NzbE4idL4m4=:8avghEqXO8QVVV7K7AkquS rOBXQet6GDKjIYHlEX+uL5UcxPJ+JQdSmvDN8teGZkc34HfbMTR6SCA7SXjiKk5TYFh4B7oX4 tWpQ4ovYAucKRDXIn6iApCl4ZuVhNkCdWe4DUeGISr5PRsO2GoDrtWD/QcqdMU8CJbuU4pY6/ ylJc/t57C6DBtTQeit3M1eiFvtc3Zh07J0hOvfbahVr3HdKNoseeL2PBmco8uSqTHGkox6PQ2 dO8HTw0gzX3pIANieADsE6Soo8wPegYHI6gytUV/h8rKX5PifM8IZpsMzJaBX/Mrie3Fu4vz7 tZd7QzNCzVlcrmQcT9hinmmyfF383X0cUjiES8Kh3FoZJai6Lh+bu7vkDn/pvCFa/LLwDeY2z uyPcd7sjfulHjX0Iq6lAKl69FqK+oXSFSI0ZsCZDY5iZahzX6Im6B0GknBN/e3xSCCIMcKgpy qnrCmgVUT9tHzpkY6daESSGn9v2PHYyW9Jy0BP3xTjRSBm3PIVegqyhTWJsvNU2GonYVdz/Y/ kyBHBSbXqwa6QpHin7sAw+zx6ZgXjuQq85Muq04viJrepr2MtQbRFvF855YDY7sEOAESnfI4x K7ragg9FoF2XKaHmmk5D6L72Kv6LesI5lfE3H6unpAYZ6koB0MttEG4a5T9yD/Pf/j9LvGJjQ yycr5RbSQ0974izaEF4Ys4G2ILUPj1Q+rIrY6kY6oU90kcfArV3QlynHocZmA82VA+a0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The genrtc driver serves no purpose on mn10300 because it drives the same hardware as the original rtc.c driver, and the newer rtc-generic.c or rtc-cmos.c drivers on architectures that use the asm-generic/rtc.h header. I assume it was initially only added for completeness when the mn10300 port was done, but the older rtc.c driver was always used instead. It would be nice to change the architecture to use the rtc-cmos driver next, and remove support for the old rtc driver as well. Signed-off-by: Arnd Bergmann --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 697510325b1d..d17ed90ebc82 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -328,7 +328,7 @@ config JS_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" depends on RTC!=y - depends on M68K || MN10300 || PARISC || PPC + depends on M68K || PARISC || PPC ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you