From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: linux-mips@vger.kernel.org
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Rob Herring <robh+dt@kernel.org>, Huacai Chen <chenhc@lemote.com>,
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 [thread overview]
Message-ID: <20200420134536.210475-1-jiaxun.yang@flygoat.com> (raw)
In-Reply-To: <20200420073347.157230-1-jiaxun.yang@flygoat.com>
RTC is now enabled by devicetree. So platform code is
no longer needed.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
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 <linux/io.h>
-
-#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 <apatard@mandriva.com>
- */
-
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/mc146818rtc.h>
-
-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 <asm/mc146818-time.h>
+
#include <asm/time.h>
#include <asm/hpet.h>
@@ -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
next prev parent reply other threads:[~2020-04-20 13:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 7:33 [PATCH RESEND 0/5] Loongson64: RS780E clean-ups Jiaxun Yang
2020-04-20 7:33 ` [PATCH RESEND 1/5] MIPS: Loongson64: Remove dead RTC code Jiaxun Yang
2020-04-20 12:06 ` maobibo
2020-04-20 12:13 ` Jiaxun Yang
2020-04-20 13:04 ` maobibo
2020-04-20 13:15 ` Jiaxun Yang
2020-04-20 7:33 ` [PATCH RESEND 2/5] MIPS: Loongson64: Make RS780E ACPI as a platform driver Jiaxun Yang
2020-04-20 7:33 ` [PATCH RESEND 3/5] dt-bindings: Document Loongson RS780E PCH ACPI Controller Jiaxun Yang
2020-04-20 7:33 ` [PATCH RESEND 4/5] MIPS: DTS: Loongson64: Add ACPI Controller Node Jiaxun Yang
2020-04-20 7:33 ` [PATCH RESEND 5/5] MIPS: Loongson64: Mark RS780 HPET as broken Jiaxun Yang
2020-04-20 9:07 ` [PATCH RESEND 0/5] Loongson64: RS780E clean-ups Thomas Bogendoerfer
2020-04-20 9:31 ` Jiaxun Yang
2020-04-20 13:45 ` Jiaxun Yang [this message]
2020-04-20 13:45 ` [PATCH v2 2/5] MIPS: Loongson64: Make RS780E ACPI as a platform driver Jiaxun Yang
2020-04-20 13:45 ` [PATCH v2 3/5] dt-bindings: Document Loongson RS780E PCH ACPI Controller Jiaxun Yang
2020-04-20 13:45 ` [PATCH v2 4/5] MIPS: DTS: Loongson64: Add ACPI Controller Node Jiaxun Yang
2020-04-20 13:45 ` [PATCH v2 5/5] MIPS: Loongson64: Mark RS780 HPET as broken Jiaxun Yang
2020-04-20 17:40 ` [PATCH v2 1/5] MIPS: Loongson64: Remove dead RTC code Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200420134536.210475-1-jiaxun.yang@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=chenhc@lemote.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®