From patchwork Wed Apr 27 22:34:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 615872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wm0-x237.google.com (mail-wm0-x237.google.com [IPv6:2a00:1450:400c:c09::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qwFC64xYSz9t73 for ; Thu, 28 Apr 2016 08:34:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=yIXaXlyD; dkim-atps=neutral Received: by mail-wm0-x237.google.com with SMTP id r12sf33152112wme.0 for ; Wed, 27 Apr 2016 15:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=TvH9eBSp2G3EgmnhPEPgExxN0xN92mVyQR69pte0oNA=; b=yIXaXlyDamqw5Ai7pe7R9WDibClxLLMAV3SHx8nHb8QYE3Un6rUPrkuRKkTSSdThQE 14dCa/vz2KQu6wm36uSNt8i4JGdb8GxqcQuRTw1wr5/RX5PTjXL3Ja74umySEO2jrjpo +y3B3t2LdD5LXcPlc+AQSWHotkDws9t41Hrp3/GJoEg13UM1VJf0pCdA9OMPv//d1Xnh ySFTICjtSaY/7odrEc9QVH/C0y2G1AIQO3F25xBp1+pp8xcBz8L+MsEmNILut/Ulxx1G sQxR+EfDKmkMMkfJotjBZPwddfu7Lb/voEGNB7RP8JQgi5qysaJ/zf/0+/dSdzkjGubn tKjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=TvH9eBSp2G3EgmnhPEPgExxN0xN92mVyQR69pte0oNA=; b=fly3zeJT9A/GZlbP3FZYsb9sKkCADpuq1qMq6e7vzZbKp8CFWYDi6LyujloRYsn+Le U6JZ0GPudJiUKKqHnYq5N2axGZfQvDa1iDiGAjQzlHO9l6kEmzSrgH5PbpdVB2eUzK8J XMfoLpOxymAMLtF6WMh+yKojyBq3OgOe+lp/sMxz7FKPSQd9x9WIYTnpqCcdKMP0BprK ef7LWkEhyQx/Pv985KabtPlg26ml8KrTYZbfP3aOdHSRvJtKVWDIX69bFG47t2QaVYov MJ6ZZdqDD5gR5QoiF7Fsl9Fch5P8bpwlQlFHeObVArVjBnH3fR5JVxVB1yADPHESBaoF Vl8w== Sender: rtc-linux@googlegroups.com X-Gm-Message-State: AOPr4FVjVPRCoZ86gfcmL+KgI8EIVi5xIF8+Sqv5r6iJ3ty/DlgTFgOWyLVEqVkTnREAFA== X-Received: by 10.28.145.74 with SMTP id t71mr78553wmd.3.1461796496527; Wed, 27 Apr 2016 15:34:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.28.134.15 with SMTP id i15ls1104216wmd.43.canary; Wed, 27 Apr 2016 15:34:56 -0700 (PDT) X-Received: by 10.28.184.199 with SMTP id i190mr1350096wmf.6.1461796496218; Wed, 27 Apr 2016 15:34:56 -0700 (PDT) Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.17.13]) by gmr-mx.google.com with ESMTPS id c69si528233wme.2.2016.04.27.15.34.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Apr 2016 15:34:56 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.13 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.13; Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0M4rAD-1btwjG25vB-00yz9Z; Thu, 28 Apr 2016 00:34:51 +0200 From: Arnd Bergmann To: Alexandre Belloni Cc: Arnd Bergmann , geert@linux-m68k.org, deller@gmx.de, benh@kernel.crashing.org, mpe@ellerman.id.au, dalias@libc.org, dhowells@redhat.com, linux-alpha@vger.kernel.org, a.zummo@towertech.it, linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-m68k@lists.linux-m68k.org, rtc-linux@googlegroups.com, linux-arch@vger.kernel.org Subject: [rtc-linux] [PATCH v3 08/16] char/genrtc: remove parisc support Date: Thu, 28 Apr 2016 00:34:22 +0200 Message-Id: <1461796470-1291527-9-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1461796470-1291527-1-git-send-email-arnd@arndb.de> References: <1461796470-1291527-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:hDlGA05dpdNMTEDjZR01lDPZsqpJtKQ5Fyet8yo2+a4sHfJ6dsd Cgn0o4JuI5z3elDVFaofzGczl2tOhUc5iNk61m/ah/K3utrf6kT9qrdiik5xjzDTONK8smR oG2dl6F7oeHqcNKWf2QQp/PrgYfPsX4+kuiGpOLd34zw97dPnEGZI86+I80J2HA+w5IgXmi K6mMdDLRfhids66T07Thw== X-UI-Out-Filterresults: notjunk:1; V01:K0:gDZghHuRU6A=:EiUrb1TMgWRtZdmOa5h+uD oi08FH2EvZ2qsrrsc6CZbEzHqZmP6d6Euq6hHwbKsBTmKPsXywU49B/0Wv4gwVRbS9EKJ9QuJ kQi6woqB4tukr8XPHNqGzCAAoeZ/M4eVDUKJcST4c5qEn7ePsD1jS/FSo2txE2gx9wq0nEerK jYzH/KZit8RahVIZ7mmacPTiVP3mI/E+xs9whvSjR7SzQy+9vrNT8EyRACAKhltfrQK7z98sf hWg3F/nRIt3qSfPJMMk7aR2+8S20S2BN90vZGdNKdYaGEsJN4zrc3ld0uE3OHweTQKbp1Usgl LbMTbMPM6jctXnMIxC92B954+RE6FZhEC/izWPv0YqHUUVIAaXf4XGvOrphef9qztn42E5FN0 xwP3Nd1bAFhRmnqTr0zwJgp+Iq8p3BX7qLqOA+W/lbHMnTqOH+b7oSTWqT7tJQ7r+44XbaG2t JQmkbLOAV1gsUhmDLyfDKis8P2cCyqZgW1etWXqa4C3oZlTm4Ak0E837SNLFjxg+57+ZmMU8H 8z5UcYVzGILhRC/eb+NwSmp0MqXoPuV1r8TmTuXGs36al6dOTOt6GjIEUGm3hgN3mN5dO6oxv c7CcD0zEdxh++OpjsvUQHfmNhUZxPOEJdys022j4cLf5yh+I2a5EngL6+26rZO233dHdkdpwA UAb7sXmDGNoJMsgGNSw8uL73n/I+7bg9GDkg58F6HDdYDhcB+iVsI8nwmeq7JPQC0LOk= X-Original-Sender: arnd@arndb.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.227.17.13 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mailfrom=arnd@arndb.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , This architecture selects RTC_CLASS unconditionally, so the GEN_RTC has not worked here for a long time. Now we can remove both the asm/rtc.h header and the Kconfig dependency for CONFIG_GEN_RTC. Signed-off-by: Arnd Bergmann --- arch/parisc/include/asm/rtc.h | 131 ------------------------------------------ drivers/char/Kconfig | 2 +- 2 files changed, 1 insertion(+), 132 deletions(-) delete mode 100644 arch/parisc/include/asm/rtc.h diff --git a/arch/parisc/include/asm/rtc.h b/arch/parisc/include/asm/rtc.h deleted file mode 100644 index 099d641a42c2..000000000000 --- a/arch/parisc/include/asm/rtc.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * include/asm-parisc/rtc.h - * - * Copyright 2002 Randolph CHung - * - * Based on: include/asm-ppc/rtc.h and the genrtc driver in the - * 2.4 parisc linux tree - */ - -#ifndef __ASM_RTC_H__ -#define __ASM_RTC_H__ - -#ifdef __KERNEL__ - -#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)) - -/* How many days come before each month (0-12). */ -static const unsigned short int __mon_yday[2][13] = -{ - /* Normal years. */ - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - /* Leap years. */ - { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } -}; - -static inline unsigned int get_rtc_time(struct rtc_time *wtime) -{ - struct pdc_tod tod_data; - long int days, rem, y; - const unsigned short int *ip; - - memset(wtime, 0, sizeof(*wtime)); - if (pdc_tod_read(&tod_data) < 0) - return RTC_24H | RTC_BATT_BAD; - - // most of the remainder of this function is: -// Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc. -// This was originally a part of the GNU C Library. -// It is distributed under the GPL, and was swiped from offtime.c - - - days = tod_data.tod_sec / SECS_PER_DAY; - rem = tod_data.tod_sec % SECS_PER_DAY; - - wtime->tm_hour = rem / SECS_PER_HOUR; - rem %= SECS_PER_HOUR; - wtime->tm_min = rem / 60; - wtime->tm_sec = rem % 60; - - y = 1970; - -#define DIV(a, b) ((a) / (b) - ((a) % (b) < 0)) -#define LEAPS_THRU_END_OF(y) (DIV (y, 4) - DIV (y, 100) + DIV (y, 400)) - - while (days < 0 || days >= (__isleap (y) ? 366 : 365)) - { - /* Guess a corrected year, assuming 365 days per year. */ - long int yg = y + days / 365 - (days % 365 < 0); - - /* Adjust DAYS and Y to match the guessed year. */ - days -= ((yg - y) * 365 - + LEAPS_THRU_END_OF (yg - 1) - - LEAPS_THRU_END_OF (y - 1)); - y = yg; - } - wtime->tm_year = y - 1900; - - ip = __mon_yday[__isleap(y)]; - for (y = 11; days < (long int) ip[y]; --y) - continue; - days -= ip[y]; - wtime->tm_mon = y; - wtime->tm_mday = days + 1; - - return RTC_24H; -} - -static int set_rtc_time(struct rtc_time *wtime) -{ - u_int32_t secs; - - secs = mktime(wtime->tm_year + 1900, wtime->tm_mon + 1, wtime->tm_mday, - wtime->tm_hour, wtime->tm_min, wtime->tm_sec); - - if(pdc_tod_set(secs, 0) < 0) - return -1; - else - return 0; - -} - -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__ */ diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index d17ed90ebc82..abab6e565c60 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 || PARISC || PPC + depends on M68K || 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