From patchwork Fri Sep 18 11:21:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 313175 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp1225178ilg; Fri, 18 Sep 2020 04:22:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9Tf9Ya3vX6/Dq3cJ3O9NfwnAbUgK9dIJnvcXn+ZWs1ZPgmztbhEkPXQ6A/dEuPb3Oydhd X-Received: by 2002:a50:ec12:: with SMTP id g18mr28531735edr.309.1600428175309; Fri, 18 Sep 2020 04:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600428175; cv=none; d=google.com; s=arc-20160816; b=LfF7gtlPCEOFUczWLw/+3O4NRGrGZ6c1KMYpefjXTIuPqYPN4cmp0tEbn50dHsGJ8p OfCEjKbgp5SGcbjp1Io1aJeQejgzmoYTp1ZvQw8bsCWLEaKZ6jIOr1f3SVqzOiI/k4J/ BZpg62bBn+r/C6mb/tCaYYhoPGdTP3JnKZQshpgPkskwlTzpIVFv6BIuh4KjxcXbsObz NiB+PyJrXtjSE0Ir/nwBy3+kcOcYSJ0Wourp2YspYO60Oo6N7Fx6y0XMrlMvO9YSO21U QMf73/R9dBluab6h7roWBW/MF40Bivur3myrL+vb37ZcZRblg8pdnsTrzrwH6E9DlmVK kqBw== 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 :message-id:date:subject:cc:to:from; bh=GHzzTT5cIAwKG219Rna8KA56o5vBlpEUK1q8HQPTuPg=; b=IlFNN9P+VIzEYovY0/uEojg5fvrfcj0Tg0cTQuSbQJdySMVV6UNY38LZJkprW+6MZC Ldbqgm2MMufaPKgVBLS22bzD9CVFE4d78Q95E1ZPWDVY8gBSR7WP9RnbZnsT8+bjXGdD T3q/3bGOECjxjiMH2HkEzgYLrLAvuRPmLvP3VJo8gKhpMAIYqYFKEU/cceu5HOG+5pHY AcwxQ6cmcR6afzKxwodJTvZQcZLozv6eOMATUcMolHOKVhgc0Crazo38GfmNmEFr2qQh SB1q8Nj//1PiHA7WN/JV7u0aOcU/azo2YZnvFaP7axoMHfAP251+SbZ0agEIQbRchCzx 7i9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 t22si2152714edi.341.2020.09.18.04.22.55; Fri, 18 Sep 2020 04:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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 devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726064AbgIRLWy (ORCPT + 6 others); Fri, 18 Sep 2020 07:22:54 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:33906 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725900AbgIRLWy (ORCPT ); Fri, 18 Sep 2020 07:22:54 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1F4EFB19B69D7C9B0CE8; Fri, 18 Sep 2020 19:22:52 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.253) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 19:22:45 +0800 From: Zhen Lei To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , "Alexey Brodkin" , Vineet Gupta , devicetree , linux-snps-arc , linux-kernel CC: Zhen Lei , Sebastian Hesselbarth , Haoyu Lv , Libin , Kefeng Wang Subject: [PATCH v5 0/6] irqchip: dw-apb-ictl: support hierarchy irq domain Date: Fri, 18 Sep 2020 19:21:56 +0800 Message-ID: <20200918112202.3418-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.253] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org v4 --> v5: 1. Add WARN_ON(1) in set_handle_irq() if !GENERIC_IRQ_MULTI_HANDLER 2. Convert "snps,dw-apb-ictl.txt" to "snps,dw-apb-ictl.yaml" 3. Fix the errors detected by "snps,dw-apb-ictl.yaml" on arch/arc v3 --> v4: 1. remove "gc->chip_types[0].chip.irq_eoi = irq_gc_noop;", the "chip.irq_eoi" hook is not needed by handle_level_irq(). Thanks for Marc Zyngier's review. 2. Add a new patch: define an empty function set_handle_irq() if !GENERIC_IRQ_MULTI_HANDLER to avoid compilation error on arch/arc system. v2 --> v3: 1. change (1 << hwirq) to BIT(hwirq). 2. change __exception_irq_entry to __irq_entry, so we can "#include " instead of "#include ". Ohterwise, an compilation error will be reported on arch/csky. drivers/irqchip/irq-dw-apb-ictl.c:20:10: fatal error: asm/exception.h: No such file or directory 3. use "if (!parent || (np == parent))" to determine whether it is primary interrupt controller. 4. make the primary interrupt controller case also use function handle_level_irq(), I used handle_fasteoi_irq() as flow_handler before. 5. Other minor changes are not detailed. v1 --> v2: According to Marc Zyngier's suggestion, discard adding an independent SD5203-VIC driver, but make the dw-apb-ictl irqchip driver to support hierarchy irq domain. It was originally available only for secondary interrupt controller, now it can also be used as primary interrupt controller. The related dt-bindings is updated appropriately. Add "Suggested-by: Marc Zyngier ". Add "Tested-by: Haoyu Lv ". v1: The interrupt controller of SD5203 SoC is VIC(vector interrupt controller), it's based on Synopsys DesignWare APB interrupt controller (dw_apb_ictl) IP, but it can not directly use dw_apb_ictl driver. The main reason is that VIC is used as primary interrupt controller and dw_apb_ictl driver worked for secondary interrupt controller. So add a new driver: "hisilicon,sd5203-vic". Zhen Lei (6): genirq: define an empty function set_handle_irq() if !GENERIC_IRQ_MULTI_HANDLER irqchip: dw-apb-ictl: prepare for support hierarchy irq domain irqchip: dw-apb-ictl: support hierarchy irq domain dt-bindings: dw-apb-ictl: support hierarchy irq domain dt-bindings: dw-apb-ictl: convert to json-schema ARC: [dts] fix the errors detected by dtbs_check .../interrupt-controller/snps,dw-apb-ictl.txt | 31 -------- .../interrupt-controller/snps,dw-apb-ictl.yaml | 75 +++++++++++++++++++ arch/arc/boot/dts/axc001.dtsi | 2 +- arch/arc/boot/dts/axc003.dtsi | 2 +- arch/arc/boot/dts/axc003_idu.dtsi | 2 +- arch/arc/boot/dts/vdk_axc003.dtsi | 2 +- arch/arc/boot/dts/vdk_axc003_idu.dtsi | 2 +- drivers/irqchip/Kconfig | 2 +- drivers/irqchip/irq-dw-apb-ictl.c | 83 ++++++++++++++++++---- include/linux/irq.h | 6 ++ 10 files changed, 158 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/snps,dw-apb-ictl.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/snps,dw-apb-ictl.yaml -- 1.8.3