From patchwork Tue Oct 31 02:36:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 13440983 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCD06C4332F for ; Tue, 31 Oct 2023 02:36:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233204AbjJaCgz (ORCPT ); Mon, 30 Oct 2023 22:36:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233193AbjJaCgz (ORCPT ); Mon, 30 Oct 2023 22:36:55 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6FF7DEE; Mon, 30 Oct 2023 19:36:51 -0700 (PDT) Received: from loongson.cn (unknown [112.20.110.17]) by gateway (Coremail) with SMTP id _____8Dxl+hCaEBlN941AA--.3869S3; Tue, 31 Oct 2023 10:36:50 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.110.17]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axzy85aEBla0Q3AA--.53709S3; Tue, 31 Oct 2023 10:36:47 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , Jiaxun Yang , linux-mips@vger.kernel.org, lvjianmin@loongson.cn, WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Binbin Zhou Subject: [PATCH v3 1/5] dt-bindings: interrupt-controller: loongson,liointc: Standardize the naming of 'loongson,parent-int-map' Date: Tue, 31 Oct 2023 10:36:36 +0800 Message-Id: X-Mailer: git-send-email 2.39.3 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Axzy85aEBla0Q3AA--.53709S3 X-CM-SenderInfo: p2kr3uplqex0o6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj93XoW7CF4rZFy8Cr1DXw45GF1rGrX_yoW8CF1kpF sxCw1DGr48tF17A390qa4vyF1fZFn5A3ZrWFZ7JayxAFWDXw1DXrW3KF15A3W3GrWUXFy7 XryrKayUKa47AabCm3ZEXasCq-sJn29KB7ZKAUJUUUUf529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUAVWUtwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU tVWrXwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY 6r1j6r4UMxCIbckI1I0E14v26r126r1DMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8XTm3UUUUU== Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Since the 'loongson,parent_int_map' attribute naming is non-standard, we should use 'loongson,parent-int-map' instead. Also, 'loongson,parent_int_map' should be marked as deprecated. Signed-off-by: Binbin Zhou --- .../interrupt-controller/loongson,liointc.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml index 00b570c82903..0d9511b8a792 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml @@ -55,6 +55,7 @@ properties: const: 2 loongson,parent_int_map: + deprecated: true description: | This property points how the children interrupts will be mapped into CPU interrupt lines. Each cell refers to a parent interrupt line from 0 to 3 @@ -65,14 +66,21 @@ properties: minItems: 4 maxItems: 4 + loongson,parent-int-map: + description: | + Exactly the same as 'loongson,parent_int_map', we just replaced the + unstandardized use of underscores. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 4 + maxItems: 4 + required: - compatible - reg - interrupts - interrupt-controller - '#interrupt-cells' - - loongson,parent_int_map - + - loongson,parent-int-map unevaluatedProperties: false @@ -109,11 +117,10 @@ examples: interrupts = <2>, <3>; interrupt-names = "int0", "int1"; - loongson,parent_int_map = <0xf0ffffff>, /* int0 */ + loongson,parent-int-map = <0xf0ffffff>, /* int0 */ <0x0f000000>, /* int1 */ <0x00000000>, /* int2 */ <0x00000000>; /* int3 */ - }; ... From patchwork Tue Oct 31 02:36:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 13440985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64B97C4167D for ; Tue, 31 Oct 2023 02:37:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234857AbjJaChE (ORCPT ); Mon, 30 Oct 2023 22:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234748AbjJaChC (ORCPT ); Mon, 30 Oct 2023 22:37:02 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9C19DF7; Mon, 30 Oct 2023 19:36:54 -0700 (PDT) Received: from loongson.cn (unknown [112.20.110.17]) by gateway (Coremail) with SMTP id _____8BxpPBDaEBlQt41AA--.40033S3; Tue, 31 Oct 2023 10:36:51 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.110.17]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axzy85aEBla0Q3AA--.53709S4; Tue, 31 Oct 2023 10:36:50 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , Jiaxun Yang , linux-mips@vger.kernel.org, lvjianmin@loongson.cn, WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Binbin Zhou Subject: [PATCH v3 2/5] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names Date: Tue, 31 Oct 2023 10:36:37 +0800 Message-Id: X-Mailer: git-send-email 2.39.3 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Axzy85aEBla0Q3AA--.53709S4 X-CM-SenderInfo: p2kr3uplqex0o6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj93XoWxZw15ZF4kKrWrXFy7tFW3CFX_yoW5ArWfpa y7CanFgF48KF13Z3y8t340krnxZr93AwnIkan7J3y7GFsFq34UXr13tF95JF4fGrWIqa4j vryFgayfGFyjyabCm3ZEXasCq-sJn29KB7ZKAUJUUUUf529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUAVWUtwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU tVWrXwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxkF7I0En4kS14v26r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY 6r1j6r4UMxCIbckI1I0E14v26r126r1DMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26ryj6F1UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8XTm3UUUUU== Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org As we know, the Loongson-2K0500 is a single-core CPU, and the core1-related register (isr1) does not exist, and we need a separate declaration. This fixes dtbs_check warning: DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg-names: ['main', 'isr0'] is too short From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: Unevaluated properties are not allowed ('reg-names' was unexpected) From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg: [[0, 534844416, 0, 64], [0, 534843456, 0, 8]] is too short From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: reg-names: ['main', 'isr0'] is too short From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml Signed-off-by: Binbin Zhou Acked-by: Jiaxun Yang --- .../loongson,liointc.yaml | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml index 0d9511b8a792..7393d7dfbe82 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml @@ -11,8 +11,13 @@ maintainers: description: | This interrupt controller is found in the Loongson-3 family of chips and - Loongson-2K1000 chip, as the primary package interrupt controller which + Loongson-2K series chips, as the primary package interrupt controller which can route local I/O interrupt to interrupt lines of cores. + Be aware of the following points. + 1.The Loongson-2K0500 is a single core CPU, the isr1 register could not be defined; + 2.The Loongson-2K0500/2K1000 has 64 device interrupt sources as inputs, so we + need to define two nodes in dts{i} to describe the "0-31" and "32-61" interrupt + sources respectively. allOf: - $ref: /schemas/interrupt-controller.yaml# @@ -29,10 +34,14 @@ properties: maxItems: 3 reg-names: - items: - - const: main - - const: isr0 - - const: isr1 + oneOf: + - items: + - const: main + - const: isr0 + - items: + - const: main + - const: isr0 + - const: isr1 interrupt-controller: true @@ -94,7 +103,8 @@ if: then: properties: reg: - minItems: 3 + minItems: 2 + maxItems: 3 required: - reg-names From patchwork Tue Oct 31 02:36:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 13440984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BBF0C4167D for ; Tue, 31 Oct 2023 02:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233193AbjJaCg7 (ORCPT ); Mon, 30 Oct 2023 22:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230409AbjJaCg6 (ORCPT ); Mon, 30 Oct 2023 22:36:58 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 44FE9FA; Mon, 30 Oct 2023 19:36:55 -0700 (PDT) Received: from loongson.cn (unknown [112.20.110.17]) by gateway (Coremail) with SMTP id _____8CxRuhFaEBlTd41AA--.51808S3; Tue, 31 Oct 2023 10:36:53 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.110.17]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axzy85aEBla0Q3AA--.53709S5; Tue, 31 Oct 2023 10:36:51 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , Jiaxun Yang , linux-mips@vger.kernel.org, lvjianmin@loongson.cn, WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Binbin Zhou Subject: [PATCH v3 3/5] dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check for interrupt-names Date: Tue, 31 Oct 2023 10:36:38 +0800 Message-Id: <7fae3ce932b455effcf73ff0208f4776959f2f44.1698717154.git.zhoubinbin@loongson.cn> X-Mailer: git-send-email 2.39.3 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Axzy85aEBla0Q3AA--.53709S5 X-CM-SenderInfo: p2kr3uplqex0o6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj93XoWxZw15ZF4kKrWrWw4UAr1DurX_yoW5XFy3pF ZrC3ZrXr4UtF13uw4kt340k3ZxZrn8AwnxCa93C3y7GFsFqa48Xr4aqF95XF4rG3yfXa42 qryF9ayIga47JabCm3ZEXasCq-sJn29KB7ZKAUJUUUUf529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBSb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r126r13M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_Gr1j6F4UJwAaw2AFwI0_JF0_Jw1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2 xF0cIa020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ Wrv_ZF1lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x 0EwIxGrwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE bVWUJVW8JwCFI7km07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVW5JVW7JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42 xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF 7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUsDDJDUUUU Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The Loongson-2K0500/2K1000 CPUs have 64 interrupt sources as inputs, and a route-mapped node handles up to 32 interrupt sources, so two liointc nodes are defined in dts{i}. Of course, we need to ensure that the routing outputs (intx) of the two nodes cannot conflict. For example, in Loongson-2K1000, 'int0' is typically used by the liointc0 node, then the liointc1 node can only use the outputs starting with 'int1'. So "interrupt-names" should be defined by "pattern". This fixes dtbs_check warning: DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: interrupt-names:0: 'int0' was expected From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: Unevaluated properties are not allowed ('interrupt-names' was unexpected) From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml DTC_CHK arch/loongarch/boot/dts/loongson-2k1000-ref.dtb arch/loongarch/boot/dts/loongson-2k1000-ref.dtb: interrupt-controller@1fe01440: interrupt-names:0: 'int0' was expected From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k1000-ref.dtb: interrupt-controller@1fe01440: Unevaluated properties are not allowed ('interrupt-names' was unexpected) From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml Signed-off-by: Binbin Zhou --- .../bindings/interrupt-controller/loongson,liointc.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml index 7393d7dfbe82..a90c609d351e 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml @@ -54,11 +54,9 @@ properties: interrupt-names: description: List of names for the parent interrupts. items: - - const: int0 - - const: int1 - - const: int2 - - const: int3 + pattern: int[0-3] minItems: 1 + maxItems: 4 '#interrupt-cells': const: 2 @@ -87,6 +85,7 @@ required: - compatible - reg - interrupts + - interrupt-names - interrupt-controller - '#interrupt-cells' - loongson,parent-int-map From patchwork Tue Oct 31 02:36:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 13440986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2645C4167D for ; Tue, 31 Oct 2023 02:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234748AbjJaChL (ORCPT ); Mon, 30 Oct 2023 22:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234835AbjJaChJ (ORCPT ); Mon, 30 Oct 2023 22:37:09 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1FE57F4; Mon, 30 Oct 2023 19:37:04 -0700 (PDT) Received: from loongson.cn (unknown [112.20.110.17]) by gateway (Coremail) with SMTP id _____8Bx5fBNaEBld941AA--.40552S3; Tue, 31 Oct 2023 10:37:01 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.110.17]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxH91LaEBlgEQ3AA--.55486S2; Tue, 31 Oct 2023 10:37:00 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , Jiaxun Yang , linux-mips@vger.kernel.org, lvjianmin@loongson.cn, WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Binbin Zhou Subject: [PATCH v3 4/5] irqchip/loongson-liointc: Fix 'loongson,parent_int_map' parse Date: Tue, 31 Oct 2023 10:36:57 +0800 Message-Id: <40fb5e2b35d613f1116d31876fbf79c94bec4fd1.1698717154.git.zhoubinbin@loongson.cn> X-Mailer: git-send-email 2.39.3 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxH91LaEBlgEQ3AA--.55486S2 X-CM-SenderInfo: p2kr3uplqex0o6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj93XoW7Zr47Cr48trW8KrWUWr1xJFc_yoW8Jw1fpF srC390kr45Ka47urs8ta4vka4Sy3WYkFZrGFWxCa4SvFn5J34kZF15AF1DCF4fCr45GayY qr40qFWUGa15CFcCm3ZEXasCq-sJn29KB7ZKAUJUUUUf529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBSb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_Gr1j6F4UJwAaw2AFwI0_JF0_Jw1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2 xF0cIa020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ Wrv_ZF1lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x 0EwIxGrwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE bVWUJVW8JwCFI7km07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_GFv_WrylIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVW7JVWDJwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42 xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF 7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUVOJeDUUUU Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org While 'loongson,parent_int_map' is deprecated, we need to make sure that both forms can be parsed. Signed-off-by: Binbin Zhou --- drivers/irqchip/irq-loongson-liointc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index e4b33aed1c97..add2e0a955b8 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -330,6 +330,7 @@ static int __init liointc_of_init(struct device_node *node, bool have_parent = FALSE; int sz, i, index, revision, err = 0; struct resource res; + const char *prop_name = "loongson,parent-int-map"; if (!of_device_is_compatible(node, "loongson,liointc-2.0")) { index = 0; @@ -350,8 +351,12 @@ static int __init liointc_of_init(struct device_node *node, if (!have_parent) return -ENODEV; + if (!of_find_property(node, prop_name, &i)) + /* Fallback to 'loongson,parent_int_map', although it is deprecated. */ + prop_name = "loongson,parent_int_map"; + sz = of_property_read_variable_u32_array(node, - "loongson,parent_int_map", + prop_name, &parent_int_map[0], LIOINTC_NUM_PARENT, LIOINTC_NUM_PARENT); From patchwork Tue Oct 31 02:36:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 13440987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D08EC4332F for ; Tue, 31 Oct 2023 02:37:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236003AbjJaCha (ORCPT ); Mon, 30 Oct 2023 22:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235376AbjJaChW (ORCPT ); Mon, 30 Oct 2023 22:37:22 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5D743FD; Mon, 30 Oct 2023 19:37:08 -0700 (PDT) Received: from loongson.cn (unknown [112.20.110.17]) by gateway (Coremail) with SMTP id _____8Cx7+tOaEBli941AA--.38784S3; Tue, 31 Oct 2023 10:37:02 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.110.17]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxH91LaEBlgEQ3AA--.55486S3; Tue, 31 Oct 2023 10:37:01 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , Jiaxun Yang , linux-mips@vger.kernel.org, lvjianmin@loongson.cn, WANG Xuerui , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Binbin Zhou Subject: [PATCH v3 5/5] MIPS: Loongson64: DTS: Fix 'loongson,parent_int_map' references Date: Tue, 31 Oct 2023 10:36:58 +0800 Message-Id: X-Mailer: git-send-email 2.39.3 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxH91LaEBlgEQ3AA--.55486S3 X-CM-SenderInfo: p2kr3uplqex0o6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj93XoWxZr13XFyxAFWkJw4fCw1DXFc_yoW5tr1fpw 13Aa18Gw4xKr17A398G34UJr1fZF90yFZrWF4xGFWxA39aga4UXr1fJF1rJrs3GrW5Xa42 9r1vgrWUKFy8CabCm3ZEXasCq-sJn29KB7ZKAUJUUUUf529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUBvb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAF wI0_Gr1j6F4UJwAaw2AFwI0_JF0_Jw1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2 xF0cIa020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ Wrv_ZF1lYx0Ex4A2jsIE14v26F4j6r4UJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2 Ij64vIr41lc7CjxVAaw2AFwI0_Jw0_GFyl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Y z7v_Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x 8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r4a6rW5MIIYrxkI7VAKI48JMIIF0xvE 2Ix0cI8IcVAFwI0_Ar0_tr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26F4j6r4UJwCI42IY6x AIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Cr0_Gr1UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07j2XdUUUUUU= Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Since 'loongson,parent_int_map' has been deprecated, replace all relevant references in the MIPS loongson dts{i} with 'loongson,parent-int-map'. Signed-off-by: Binbin Zhou --- arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi | 4 ++-- arch/mips/boot/dts/loongson/loongson64c-package.dtsi | 2 +- arch/mips/boot/dts/loongson/loongson64g-package.dtsi | 2 +- arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi index f878f47e4501..36f499a3772e 100644 --- a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi +++ b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi @@ -71,7 +71,7 @@ liointc0: interrupt-controller@1fe11400 { interrupts = <2>; interrupt-names = "int0"; - loongson,parent_int_map = <0xffffffff>, /* int0 */ + loongson,parent-int-map = <0xffffffff>, /* int0 */ <0x00000000>, /* int1 */ <0x00000000>, /* int2 */ <0x00000000>; /* int3 */ @@ -91,7 +91,7 @@ liointc1: interrupt-controller@1fe11440 { interrupts = <3>; interrupt-names = "int1"; - loongson,parent_int_map = <0x00000000>, /* int0 */ + loongson,parent-int-map = <0x00000000>, /* int0 */ <0xffffffff>, /* int1 */ <0x00000000>, /* int2 */ <0x00000000>; /* int3 */ diff --git a/arch/mips/boot/dts/loongson/loongson64c-package.dtsi b/arch/mips/boot/dts/loongson/loongson64c-package.dtsi index 5bb876a4de52..38de0108e804 100644 --- a/arch/mips/boot/dts/loongson/loongson64c-package.dtsi +++ b/arch/mips/boot/dts/loongson/loongson64c-package.dtsi @@ -35,7 +35,7 @@ liointc: interrupt-controller@3ff01400 { interrupts = <2>, <3>; interrupt-names = "int0", "int1"; - loongson,parent_int_map = <0xf0ffffff>, /* int0 */ + loongson,parent-int-map = <0xf0ffffff>, /* int0 */ <0x0f000000>, /* int1 */ <0x00000000>, /* int2 */ <0x00000000>; /* int3 */ diff --git a/arch/mips/boot/dts/loongson/loongson64g-package.dtsi b/arch/mips/boot/dts/loongson/loongson64g-package.dtsi index d4314f62ccc2..8972adcb83d6 100644 --- a/arch/mips/boot/dts/loongson/loongson64g-package.dtsi +++ b/arch/mips/boot/dts/loongson/loongson64g-package.dtsi @@ -32,7 +32,7 @@ liointc: interrupt-controller@3ff01400 { interrupts = <2>, <3>; interrupt-names = "int0", "int1"; - loongson,parent_int_map = <0x00ffffff>, /* int0 */ + loongson,parent-int-map = <0x00ffffff>, /* int0 */ <0xff000000>, /* int1 */ <0x00000000>, /* int2 */ <0x00000000>; /* int3 */ diff --git a/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts b/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts index d0588d81e0c2..88642fee1bbd 100644 --- a/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts +++ b/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts @@ -34,7 +34,7 @@ liointc: interrupt-controller@3ff01400 { interrupts = <2>, <3>; interrupt-names = "int0", "int1"; - loongson,parent_int_map = <0x00000001>, /* int0 */ + loongson,parent-int-map = <0x00000001>, /* int0 */ <0xfffffffe>, /* int1 */ <0x00000000>, /* int2 */ <0x00000000>; /* int3 */