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: 615342 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qvcBN6sMQz9t3q for ; Wed, 27 Apr 2016 07:47:08 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qvcBN5yZwzDqBM for ; Wed, 27 Apr 2016 07:47:08 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qvc8t6YYpzDq9s for ; Wed, 27 Apr 2016 07:45:50 +1000 (AEST) 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 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= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dalias@libc.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, dhowells@redhat.com, alexandre.belloni@free-electrons.com, linux-arch@vger.kernel.org, rtc-linux@googlegroups.com, deller@gmx.de, x86@kernel.org, jejb@parisc-linux.org, geert@linux-m68k.org, Arnd Bergmann , ink@jurassic.park.msu.ru, rth@twiddle.net, a.zummo@towertech.it, tony.luck@intel.com, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, yasutake.koichi@jp.panasonic.com, linuxppc-dev@lists.ozlabs.org MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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(-) 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__ */