Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4974450ybb; Tue, 24 Mar 2020 08:39:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt3qMFrs29r7bZEh2yKJ8/09EDCffDc/AteKgolHR9Y6SbumH9U34Vk5DHp3QbYw1SJtj2S X-Received: by 2002:aca:5d83:: with SMTP id r125mr3925979oib.8.1585064372527; Tue, 24 Mar 2020 08:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585064372; cv=none; d=google.com; s=arc-20160816; b=EGHRfwRsN/klqQWYJ9qSGp7bbZXs8WecEPrxz91gDWiCR9/330OzsXNHSMNoiR7nJC 5a/6IzqOdW77OoJwyq13UWO7vF5dgP5L/ha0FL7v4B4GtzD3PuvBUuL7Ife0QGP9UPOc JcOSBtmmat1LvbgjizICjkPbxoX2b5U8qnMP9JCVLGo+E2T+15GifEgmc9hEObGWV3O3 UpFbCvhFFRe4PYXBgb/3gbIwL9i7uDGuEtPW4moIndp6duxOc4xrSIz3El2fDvPHj2DX ytOBiQ22hqpWVbkGAIdMvesS9YlZNSGQR6drAyOkaUZlHZdTqnrgaj38WgOlmjJCpMQh p8CQ== 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:date:subject:message-id:cc:to:from :dkim-signature; bh=c4pSrPeSV97w8bFNlp6bOa+S5k3Nj7plLKxawsPWKIg=; b=sJzjCSKe2ysjVqVJ0hfXNVevQtuluCzkUHwHZ6RKxkMg/5bpO/68Y6GJbSudFEyMHG FsCMVnIjnqNKau2AAUgURBFlbuWRht1FxQ6/OLyoPkbSSkJ4wHioAE4QHPwz66oZc5qH uLgckIzLjrlBYyKr95O5DHQg0eRhzPc9jA++PNs/3wr9HzqdtXx8LPXKcu4cge2BqT9m mh8mPMR9C/L4JWweHhTn2c5cDCxxYZohuCYhn8dl1me2FDBiTIKmRfy37we/wT25ZOWY 2KYkRIUyaM9+aXDdJPPE1KHBA4caNh6/VIXCSSkTi9kQEpvb5C3QUpykrVRm3G4/DkuZ yt7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=GJRBWI+Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si10128814otb.140.2020.03.24.08.39.19; Tue, 24 Mar 2020 08:39:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=GJRBWI+Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728657AbgCXPi3 (ORCPT + 99 others); Tue, 24 Mar 2020 11:38:29 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17886 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728825AbgCXPi0 (ORCPT ); Tue, 24 Mar 2020 11:38:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1585064195; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=c4pSrPeSV97w8bFNlp6bOa+S5k3Nj7plLKxawsPWKIg=; b=GJRBWI+Z5Ih2aPsDC2w+GUjLIPH1sGyVT9eooJwiZBI8LEPaDgdYtnyDJ7NRMSiG EDqyADUSQBNsbgM7fz60D+nIzcGzdCyhpy8e35tVHG4bch1MSJRwlVaehn8DwD3zev2 pMHpO9B8dx8Ll5Vn0AcdJWHjEmGakbtwQBCh/BYg= Received: from localhost.localdomain (39.155.141.144 [39.155.141.144]) by mx.zoho.com.cn with SMTPS id 1585064191128266.1534878130593; Tue, 24 Mar 2020 23:36:31 +0800 (CST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Mark Rutland , Thomas Bogendoerfer , Huacai Chen , Allison Randal , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Message-ID: <20200324153624.23109-1-jiaxun.yang@flygoat.com> Subject: [PATCH v6 00/11] Modernize Loongson64 Machine v6 Date: Tue, 24 Mar 2020 23:35:57 +0800 X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20190827085302.5197-1-jiaxun.yang@flygoat.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Loongson have a long history of contributing their code to mainline kernel. However, it seems like recent years, they are focusing on maintain a kernel= by themselves rather than contribute there code to the community. Kernel is progress rapidly too. Their code slept in mainline for a long per= oid without proper maintainance and became outdated. This patchset brings modern DeviceTree and irqchip support to the Loongson6= 4 machine, and leaves Loongson 2e/f alone since they are too legacy to touch. PCI and some legacy I/O device will be converted later, together with LS7A = PCH support. v1: - dt-bindings fixup according to Rob's comments - irqchip fixup according to Marc's comments - ls3-iointc: Make Core&IP map per-IRQ - Regenerate kconfigs - Typo & style improvements v2: - dt-bindings: Fix IOINTC, collect Rob's review tag - dtbs: Drop CPU Node, merge different ways according to Huacai and Paul's = comments v3: - Split code have been merged - Fix IOINTC binding to allow map any child IRQ to and parent - Convert "HTINTC" into "HTPIC", which mixed HT vectors processing and i825= 9 - Naming style fix according to Huacai's suggestions v4: - More naming related fixes v5: - irqchip fixes thanks to maz (see per file changelog) - Remove unnecessary details in dt-bindings - Credit Huacai with Co-developed-by v6: - HTPIC minor fix - device binding naming fix=20 --- Jiaxun Yang (11): irqchip: Add driver for Loongson I/O Local Interrupt Controller irqchip: loongson-liointc: Workaround LPC IRQ Errata dt-bindings: interrupt-controller: Add Loongson LIOINTC irqchip: Add driver for Loongson-3 HyperTransport PIC controller dt-bindings: interrupt-controller: Add Loongson-3 HTPIC irqchip: mips-cpu: Convert to simple domain MIPS: Loongson64: Drop legacy IRQ code dt-bindings: mips: Add loongson boards MIPS: Loongson64: Add generic dts MIPS: Loongson64: Load built-in dtbs MIPS: Loongson64: Move MIPS_CPU_IRQ_BASE .../interrupt-controller/loongson,htpic.yaml | 59 ++++ .../loongson,liointc.yaml | 93 ++++++ .../bindings/mips/loongson/devices.yaml | 27 ++ arch/mips/Kconfig | 6 +- arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/loongson/Makefile | 4 + .../boot/dts/loongson/loongson3-package.dtsi | 62 ++++ .../dts/loongson/loongson3_4core_rs780e.dts | 25 ++ .../dts/loongson/loongson3_8core_rs780e.dts | 25 ++ arch/mips/boot/dts/loongson/rs780e-pch.dtsi | 26 ++ arch/mips/include/asm/i8259.h | 1 + .../include/asm/mach-loongson64/boot_param.h | 2 + .../asm/mach-loongson64/builtin_dtbs.h | 13 + arch/mips/include/asm/mach-loongson64/irq.h | 32 +-- .../include/asm/mach-loongson64/loongson.h | 1 + arch/mips/loongson64/Makefile | 2 +- arch/mips/loongson64/env.c | 23 ++ arch/mips/loongson64/init.c | 6 + arch/mips/loongson64/irq.c | 162 ----------- arch/mips/loongson64/setup.c | 16 ++ arch/mips/loongson64/smp.c | 28 +- drivers/irqchip/Kconfig | 19 ++ drivers/irqchip/Makefile | 2 + drivers/irqchip/irq-loongson-htpic.c | 149 ++++++++++ drivers/irqchip/irq-loongson-liointc.c | 271 ++++++++++++++++++ drivers/irqchip/irq-mips-cpu.c | 2 +- 26 files changed, 844 insertions(+), 213 deletions(-) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/= loongson,htpic.yaml create mode 100644 Documentation/devicetree/bindings/interrupt-controller/= loongson,liointc.yaml create mode 100644 Documentation/devicetree/bindings/mips/loongson/devices= .yaml create mode 100644 arch/mips/boot/dts/loongson/Makefile create mode 100644 arch/mips/boot/dts/loongson/loongson3-package.dtsi create mode 100644 arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dts create mode 100644 arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dts create mode 100644 arch/mips/boot/dts/loongson/rs780e-pch.dtsi create mode 100644 arch/mips/include/asm/mach-loongson64/builtin_dtbs.h delete mode 100644 arch/mips/loongson64/irq.c create mode 100644 drivers/irqchip/irq-loongson-htpic.c create mode 100644 drivers/irqchip/irq-loongson-liointc.c --=20 2.26.0.rc2