Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1606910pxb; Thu, 4 Mar 2021 16:10:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTBrIbY1mUxeMo+8gp1aXnD5VuAvVQPp2SpHNIKeHZySjDkxblZx/FgZK5HhNYFk3HaQdt X-Received: by 2002:a05:6e02:1a0f:: with SMTP id s15mr6456799ild.244.1614903049904; Thu, 04 Mar 2021 16:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903049; cv=none; d=google.com; s=arc-20160816; b=owFQiYOOGa5mLlJTrxQRcNRDIgQxEHsmIbos/lAY4OyqU0QOhRGmvVrdhGNiAofpn0 LQNTkqzSWkho9Ad1uPJ3AMGqdvH53FO1AKBQWgQOHES6160yMGgMKTMAndpkK269agFV rrNajkzMz54L5hE0lG5bhFjMpnCbG529vOh4zhvgHVgFETvL1WICV1RLcng6Q+W3AIdQ KVaCa2mRZ2IemRl8vx23H55t8TdIs/4MJYro5oB6A4q8+4jXVFhAfkeliG/bGF5AnNF6 k2GtaUgM7Fz9jk+5s95vUyPht5Jyrkx05L6zC2DwDJM3YgcrxIt7R5ld5Us17tD/0atd /dYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FTehXMkTrrjNbxeo1fjdDr8R/AyrZZNIajBWQoGHJqk=; b=AIy+gedj4TywORFQ4kPGDLCSvZO5UHNe9i3oKr45Kt1I66AnEntwBAdpWdZYZITH6N W+uFjxe32FBqUv/lfBeBxdvEHQW+IKhNQqMC2Q1z5UsSq7+MWgWrP+rIiaFLwfw9MMYX TiFL9YRSqoPZQcHlnw9aC+KgS0Jffm2i1HRUJbWtu9EJHv3qQX3mWqer2dWBeXxLwHsM B36zJwi82Fg748WKy5nauplBOqzF773NkXsC5/F2/BXaXo2lKNvrR21OuVX5Z3xKRyZn H6AtQHXUc+jS/V8sx/PgwgkaDiFqT8CFWb2/PBmPa3V7eTjkXDtArLtyFBYznSeK8oPd jxZA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si661682ilq.58.2021.03.04.16.10.25; Thu, 04 Mar 2021 16:10:49 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239391AbhCDLCd (ORCPT + 99 others); Thu, 4 Mar 2021 06:02:33 -0500 Received: from mail.loongson.cn ([114.242.206.163]:59822 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239167AbhCDLBv (ORCPT ); Thu, 4 Mar 2021 06:01:51 -0500 Received: from localhost.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxn_DpvUBgUFAUAA--.3851S3; Thu, 04 Mar 2021 19:01:00 +0800 (CST) From: Qing Zhang To: Huacai Chen , Jiaxun Yang , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] MIPS: Loongson64: Remove unused sysconf members Date: Thu, 4 Mar 2021 19:00:56 +0800 Message-Id: <20210304110057.22144-2-zhangqing@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210304110057.22144-1-zhangqing@loongson.cn> References: <20210304110057.22144-1-zhangqing@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8b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Jr1lIxAIcVC2z280aVCY1x 0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8E38UUUUUU== X-CM-SenderInfo: x2kd0wptlqwqxorr0wxvrqhubq/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't need them anymore, They are uniform on all Loongson64 systems and have been fixed in DeviceTree.loongson3_platform_init is replaced with DTS + driver. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang --- .../include/asm/mach-loongson64/boot_param.h | 9 ---- arch/mips/loongson64/Makefile | 2 +- arch/mips/loongson64/env.c | 20 --------- arch/mips/loongson64/platform.c | 42 ------------------- 4 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 arch/mips/loongson64/platform.c diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h index 4592841b6b0c..1c1cdf57137e 100644 --- a/arch/mips/include/asm/mach-loongson64/boot_param.h +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h @@ -207,20 +207,11 @@ struct loongson_system_configuration { u16 reserved_cpus_mask; enum loongson_cpu_type cputype; enum loongson_bridge_type bridgetype; - u64 ht_control_base; - u64 pci_mem_start_addr; - u64 pci_mem_end_addr; - u64 pci_io_base; u64 restart_addr; u64 poweroff_addr; u64 suspend_addr; u64 vgabios_addr; u32 dma_mask_bits; - char ecname[32]; - u32 nr_uarts; - struct uart_device uarts[MAX_UARTS]; - u32 nr_sensors; - struct sensor_device sensors[MAX_SENSORS]; u64 workarounds; void (*early_config)(void); }; diff --git a/arch/mips/loongson64/Makefile b/arch/mips/loongson64/Makefile index cc76944b1a9d..e806280bbb85 100644 --- a/arch/mips/loongson64/Makefile +++ b/arch/mips/loongson64/Makefile @@ -2,7 +2,7 @@ # # Makefile for Loongson-3 family machines # -obj-$(CONFIG_MACH_LOONGSON64) += cop2-ex.o platform.o dma.o \ +obj-$(CONFIG_MACH_LOONGSON64) += cop2-ex.o dma.o \ setup.o init.o env.o time.o reset.o \ obj-$(CONFIG_SMP) += smp.o diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c index 51a5d050a94c..1821d461b606 100644 --- a/arch/mips/loongson64/env.c +++ b/arch/mips/loongson64/env.c @@ -95,7 +95,6 @@ void __init prom_init_env(void) loongson_freqctrl[1] = 0x900010001fe001d0; loongson_freqctrl[2] = 0x900020001fe001d0; loongson_freqctrl[3] = 0x900030001fe001d0; - loongson_sysconf.ht_control_base = 0x90000EFDFB000000; loongson_sysconf.workarounds = WORKAROUND_CPUFREQ; break; case Legacy_3B: @@ -118,7 +117,6 @@ void __init prom_init_env(void) loongson_freqctrl[1] = 0x900020001fe001d0; loongson_freqctrl[2] = 0x900040001fe001d0; loongson_freqctrl[3] = 0x900060001fe001d0; - loongson_sysconf.ht_control_base = 0x90001EFDFB000000; loongson_sysconf.workarounds = WORKAROUND_CPUHOTPLUG; break; default: @@ -136,9 +134,6 @@ void __init prom_init_env(void) loongson_sysconf.cores_per_node - 1) / loongson_sysconf.cores_per_node; - loongson_sysconf.pci_mem_start_addr = eirq_source->pci_mem_start_addr; - loongson_sysconf.pci_mem_end_addr = eirq_source->pci_mem_end_addr; - loongson_sysconf.pci_io_base = eirq_source->pci_io_start_addr; loongson_sysconf.dma_mask_bits = eirq_source->dma_mask_bits; if (loongson_sysconf.dma_mask_bits < 32 || loongson_sysconf.dma_mask_bits > 64) @@ -153,23 +148,8 @@ void __init prom_init_env(void) loongson_sysconf.poweroff_addr, loongson_sysconf.restart_addr, loongson_sysconf.vgabios_addr); - memset(loongson_sysconf.ecname, 0, 32); - if (esys->has_ec) - memcpy(loongson_sysconf.ecname, esys->ec_name, 32); loongson_sysconf.workarounds |= esys->workarounds; - loongson_sysconf.nr_uarts = esys->nr_uarts; - if (esys->nr_uarts < 1 || esys->nr_uarts > MAX_UARTS) - loongson_sysconf.nr_uarts = 1; - memcpy(loongson_sysconf.uarts, esys->uarts, - sizeof(struct uart_device) * loongson_sysconf.nr_uarts); - - loongson_sysconf.nr_sensors = esys->nr_sensors; - if (loongson_sysconf.nr_sensors > MAX_SENSORS) - loongson_sysconf.nr_sensors = 0; - if (loongson_sysconf.nr_sensors) - memcpy(loongson_sysconf.sensors, esys->sensors, - sizeof(struct sensor_device) * loongson_sysconf.nr_sensors); pr_info("CpuClock = %u\n", cpu_clock_freq); /* Read the ID of PCI host bridge to detect bridge type */ diff --git a/arch/mips/loongson64/platform.c b/arch/mips/loongson64/platform.c deleted file mode 100644 index 9674ae1361a8..000000000000 --- a/arch/mips/loongson64/platform.c +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (C) 2009 Lemote Inc. - * Author: Wu Zhangjin, wuzhangjin@gmail.com - * Xiang Yu, xiangy@lemote.com - * Chen Huacai, chenhc@lemote.com - */ - -#include -#include -#include -#include -#include -#include -#include - -static int __init loongson3_platform_init(void) -{ - int i; - struct platform_device *pdev; - - if (loongson_sysconf.ecname[0] != '\0') - platform_device_register_simple(loongson_sysconf.ecname, -1, NULL, 0); - - for (i = 0; i < loongson_sysconf.nr_sensors; i++) { - if (loongson_sysconf.sensors[i].type > SENSOR_FAN) - continue; - - pdev = kzalloc(sizeof(struct platform_device), GFP_KERNEL); - if (!pdev) - return -ENOMEM; - - pdev->name = loongson_sysconf.sensors[i].name; - pdev->id = loongson_sysconf.sensors[i].id; - pdev->dev.platform_data = &loongson_sysconf.sensors[i]; - platform_device_register(pdev); - } - - return 0; -} - -arch_initcall(loongson3_platform_init); -- 2.20.1