Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3798411ybz; Mon, 20 Apr 2020 09:38:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLffZWo6oAd5VpJXGhulqIb6yD9sP8gjf8uRC9NCApa7zl5TtQEHUW21p+oBvkaaMXn+hIh X-Received: by 2002:aa7:df92:: with SMTP id b18mr14977810edy.238.1587400696390; Mon, 20 Apr 2020 09:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587400696; cv=none; d=google.com; s=arc-20160816; b=lTRtdTDgyJwHScE6tuI8xHHmOJrIxTPThYh+hrLV7+YkQ8543sDj+xBkVlZyhpuayJ Tr/WTOtiZhkup++dROias7YTVRR9EK/3tfTpv0yZnuRZEuE3NQyncWpIHaAyqLBPEFTU nR4jMXAcizusumBR0TMzOul7QCxPGL/UtgdkU32XUl4nK0PbjLVP/xnahcCc+LbLA0no B41WJHKuiEztFNdHKwm4svlCyCSozRkwIdCW29MC4xPnpeP5IkA9mTjsSNlLfkVY7IJY /o+BHeN+1tp+xA4EzLxfDuTh0HSlLGV4VyT6RPCOPy2O14qGrBiscsI1sS6Tb990xBaM pwEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V7M4TZycLs2uRdEV0y9s6bWW/szVh9BvvAtvkL2rT3M=; b=E+xL9La9ODtYSTjUEtHLmcpQbGQaRqOcbc9inPOEO5AfGvBBKEedXTFHFOxE8Yvhvy huZPkgvS43X9pAaSeWg/zLrjYu9b8nSoWJc67Aez/52i6oNfu23yaoK0/aYvayf0Weis Bkc3mc63JHTsgLzNyk9Sg1BiG+WOrebMsEl8EVeR+tJQyjOEWLM7a05lMRmIajnj0iDs sFFQItLuov2EyUUlh5u/q6Tm+CFSzaa3Jzf9VAER0d79BTiEOxRBrC4E0wKsWQwecZJ1 VR3v5wlWEKG/5lueXXMTNkRggEsx8h7ZfwTzB8Ppom4JITUdqbk6oo+01POdKln0+VOr msgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=hicy5CuB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si801665edr.360.2020.04.20.09.37.53; Mon, 20 Apr 2020 09:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=hicy5CuB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728450AbgDTNqY (ORCPT + 99 others); Mon, 20 Apr 2020 09:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725944AbgDTNqY (ORCPT ); Mon, 20 Apr 2020 09:46:24 -0400 Received: from vultr.net.flygoat.com (vultr.net.flygoat.com [IPv6:2001:19f0:6001:3633:5400:2ff:fe8c:553]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10F50C061A0C; Mon, 20 Apr 2020 06:46:24 -0700 (PDT) Received: from localhost.localdomain (unknown [IPv6:2001:da8:20f:4430:250:56ff:fe9a:7470]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 0CFF820CD8; Mon, 20 Apr 2020 13:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1587390382; bh=pAU0GQtIe9CHI3zEvVQ1okUdMcuIoJdTgDyCDw9GKa0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hicy5CuBUVkL+GjmHHgahKbGXfIOV7xU5qO9uM1DXePwmgRRE+Qc080dMhME8SrEl ix8+eCtdGMwxqHABdEky2mXP0tgimZmn1VF/tEUlfTx/3c3XePU9wQG0w+NqWioJyE 2a43/4letXnP+yNs6W1ZyeT0U5FJQj9N1uUjqJniFGsaYKTsMGeFtQYalQoGI+zlOk eLD49M4zm/+ePKfoIXU7uBs4JCLyXYS9gugchvCOBzWMDIdBVHJnvxUSykZiYH32+M PhnIHd0pC7tOy20W2ru/Cn65pcWSyG931fnjQ5o933wzA70rQtsqU0Pa5r7dCvFk4J OoiGIp/R11hVQ== From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Thomas Bogendoerfer , Rob Herring , Huacai Chen , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] MIPS: Loongson64: Remove dead RTC code Date: Mon, 20 Apr 2020 21:45:25 +0800 Message-Id: <20200420134536.210475-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200420073347.157230-1-jiaxun.yang@flygoat.com> References: <20200420073347.157230-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RTC is now enabled by devicetree. So platform code is no longer needed. Signed-off-by: Jiaxun Yang --- v2: Rebase to mips-next --- .../include/asm/mach-loongson64/mc146818rtc.h | 36 ----------------- arch/mips/loongson64/Kconfig | 4 -- arch/mips/loongson64/Makefile | 1 - arch/mips/loongson64/rtc.c | 39 ------------------- arch/mips/loongson64/time.c | 8 +--- 5 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 arch/mips/include/asm/mach-loongson64/mc146818rtc.h delete mode 100644 arch/mips/loongson64/rtc.c diff --git a/arch/mips/include/asm/mach-loongson64/mc146818rtc.h b/arch/mips/include/asm/mach-loongson64/mc146818rtc.h deleted file mode 100644 index ebdccfee50be..000000000000 --- a/arch/mips/include/asm/mach-loongson64/mc146818rtc.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1998, 2001, 03, 07 by Ralf Baechle (ralf@linux-mips.org) - * - * RTC routines for PC style attached Dallas chip. - */ -#ifndef __ASM_MACH_LOONGSON64_MC146818RTC_H -#define __ASM_MACH_LOONGSON64_MC146818RTC_H - -#include - -#define RTC_PORT(x) (0x70 + (x)) -#define RTC_IRQ 8 - -static inline unsigned char CMOS_READ(unsigned long addr) -{ - outb_p(addr, RTC_PORT(0)); - return inb_p(RTC_PORT(1)); -} - -static inline void CMOS_WRITE(unsigned char data, unsigned long addr) -{ - outb_p(addr, RTC_PORT(0)); - outb_p(data, RTC_PORT(1)); -} - -#define RTC_ALWAYS_BCD 0 - -#ifndef mc146818_decode_year -#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1970) -#endif - -#endif /* __ASM_MACH_LOONGSON64_MC146818RTC_H */ diff --git a/arch/mips/loongson64/Kconfig b/arch/mips/loongson64/Kconfig index 48b29c198acf..c386b8a3c753 100644 --- a/arch/mips/loongson64/Kconfig +++ b/arch/mips/loongson64/Kconfig @@ -14,8 +14,4 @@ config RS780_HPET If unsure, say Yes. -config LOONGSON_MC146818 - bool - default n - endif # MACH_LOONGSON64 diff --git a/arch/mips/loongson64/Makefile b/arch/mips/loongson64/Makefile index b7f40b179c71..32b8c224852f 100644 --- a/arch/mips/loongson64/Makefile +++ b/arch/mips/loongson64/Makefile @@ -9,5 +9,4 @@ obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_RS780_HPET) += hpet.o obj-$(CONFIG_PCI) += pci.o -obj-$(CONFIG_LOONGSON_MC146818) += rtc.o obj-$(CONFIG_SUSPEND) += pm.o diff --git a/arch/mips/loongson64/rtc.c b/arch/mips/loongson64/rtc.c deleted file mode 100644 index 8d7628c0f513..000000000000 --- a/arch/mips/loongson64/rtc.c +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Lemote Fuloong platform support - * - * Copyright(c) 2010 Arnaud Patard - */ - -#include -#include -#include -#include - -static struct resource loongson_rtc_resources[] = { - { - .start = RTC_PORT(0), - .end = RTC_PORT(1), - .flags = IORESOURCE_IO, - }, { - .start = RTC_IRQ, - .end = RTC_IRQ, - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device loongson_rtc_device = { - .name = "rtc_cmos", - .id = -1, - .resource = loongson_rtc_resources, - .num_resources = ARRAY_SIZE(loongson_rtc_resources), -}; - - -static int __init loongson_rtc_platform_init(void) -{ - platform_device_register(&loongson_rtc_device); - return 0; -} - -device_initcall(loongson_rtc_platform_init); diff --git a/arch/mips/loongson64/time.c b/arch/mips/loongson64/time.c index 1245f22cec84..91e842b58365 100644 --- a/arch/mips/loongson64/time.c +++ b/arch/mips/loongson64/time.c @@ -6,7 +6,7 @@ * Copyright (C) 2009 Lemote Inc. * Author: Wu Zhangjin, wuzhangjin@gmail.com */ -#include + #include #include @@ -21,9 +21,3 @@ void __init plat_time_init(void) setup_hpet_timer(); #endif } - -void read_persistent_clock64(struct timespec64 *ts) -{ - ts->tv_sec = mc146818_get_cmos_time(); - ts->tv_nsec = 0; -} -- 2.26.0.rc2