]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
MIPS: Loongson64: Remove dead RTC code
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Mon, 20 Apr 2020 13:45:25 +0000 (21:45 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 20 Apr 2020 17:36:21 +0000 (19:36 +0200)
RTC is now enabled by devicetree. So platform code is
no longer needed.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/mach-loongson64/mc146818rtc.h [deleted file]
arch/mips/loongson64/Kconfig
arch/mips/loongson64/Makefile
arch/mips/loongson64/rtc.c [deleted file]
arch/mips/loongson64/time.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 (file)
index ebdccfe..0000000
+++ /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 */
index 48b29c198acf3ad9fb6d270fbab8dd9bffea77de..c386b8a3c753c8b8c1a0b7fb334a93f69ab7af95 100644 (file)
@@ -14,8 +14,4 @@ config RS780_HPET
          If unsure, say Yes.
 
 
-config LOONGSON_MC146818
-       bool
-       default n
-
 endif # MACH_LOONGSON64
index b7f40b179c717815efd72a27c527d819356561e1..32b8c224852f35540a4a5b9b1547768d925498e8 100644 (file)
@@ -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 (file)
index 8d7628c..0000000
+++ /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);
index 1245f22cec84777b809495761d00694fbfa718e0..91e842b58365f8c3c527d6134f2e2f830bde5295 100644 (file)
@@ -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;
-}