From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CABEC433FE for ; Mon, 7 Dec 2020 08:49:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A28B230F9 for ; Mon, 7 Dec 2020 08:49:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726419AbgLGItA (ORCPT ); Mon, 7 Dec 2020 03:49:00 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:9108 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbgLGIs7 (ORCPT ); Mon, 7 Dec 2020 03:48:59 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CqH4n6GR9zLyDk; Mon, 7 Dec 2020 16:47:37 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.9) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Dec 2020 16:48:06 +0800 From: Zhen Lei To: Lubomir Rintel , Pavel Machek , "Arnd Bergmann" , Rob Herring , linux-arm-kernel , devicetree , linux-kernel CC: Zhen Lei Subject: [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs Date: Mon, 7 Dec 2020 16:47:51 +0800 Message-ID: <20201207084752.1665-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.177.9] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v1 --> v2: Update the patch description and subject. I'm going to describe the detailed analysis here, because I don't want the patch description to be too long. 0) make ARCH=arm CROSS_COMPILE=arm-linux-gnu- dtbs -j24 2>err.txt vim err.txt arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #address-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #size-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' 1) mmp2.dtsi is included by mmp2-olpc-xo-1-75.dts, and the content of ssp3 node is: arch/arm/boot/dts/mmp2.dtsi:472 ssp3: spi@d4037000 { compatible = "marvell,mmp2-ssp"; reg = <0xd4037000 0x1000>; clocks = <&soc_clocks MMP2_CLK_SSP2>; interrupts = <20>; #address-cells = <1>; #size-cells = <0>; <-------- #size-cells = <0> status = "disabled"; }; arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225 &ssp3 { /delete-property/ #address-cells; <-------- #address-cells is deleted here /delete-property/ #size-cells; <-------- #size-cells is deleted here spi-slave; status = "okay"; ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>; slave { compatible = "olpc,xo1.75-ec"; spi-cpha; cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>; }; }; 2) scripts/dtc/checks.c: check_spi_bus_bridge() requires that the values of both #address-cells and #size-cells must be zero, when the node have "spi-slave" property. if (get_property(node, "spi-slave")) spi_addr_cells = 0; if (node_addr_cells(node) != spi_addr_cells) FAIL(c, dti, node, "incorrect #address-cells for SPI bus"); if (node_size_cells(node) != 0) FAIL(c, dti, node, "incorrect #size-cells for SPI bus"); 3) But both #address-cells and #size-cells properties are deleted. So the return value of node_addr_cells(node) is 2, and the return value of node_size_cells(node) is 1. #define node_addr_cells(n) \ (((n)->addr_cells == -1) ? 2 : (n)->addr_cells) #define node_size_cells(n) \ (((n)->size_cells == -1) ? 1 : (n)->size_cells) 4) The checks in 2) failed, so the above 0) warnings is displayed. v1: Patch 5/6. https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2341407.html Zhen Lei (1): ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DFBAC433FE for ; Mon, 7 Dec 2020 08:49:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 070E022B30 for ; Mon, 7 Dec 2020 08:49:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 070E022B30 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=EmpMRyM0TzOrR1VU/LAPVCdZ//gCqG8FJkU+3TVZxQs=; b=LHP/U046C3SgkkrokttTG0yeh/ f8OXwUv1f7FEM5RkfwiePVvMbBjWBQbaf4XO2uXYqoviAOngWFKPWB5ogpmm6ySROLcw2AXOQh1AC 6J+YdSGcagX3LPaZqZE3juOIC/HpTxNPcBd2GFcTy510YBPtzgVEyc49XJqyOS+v5n5R7cuwHOjiu wxjp9QEZPEaMHDQW84x4uoSiMw0Zlw/u6c10fRmx8Io34U32RLkT9+Lv2Bep95Z9zioIvYK65LbaP dMOOdP2//OTon0ogz9wGCQv8AAQ+W3yiI+aCVvSF8LIR3day7/fLaWq7Nyy5u2jAy1xTwyCjKjhDV PahmMVig==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmCC9-0004Sk-DT; Mon, 07 Dec 2020 08:48:33 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmCC4-0004R1-8L for linux-arm-kernel@lists.infradead.org; Mon, 07 Dec 2020 08:48:29 +0000 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CqH4n6GR9zLyDk; Mon, 7 Dec 2020 16:47:37 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.9) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Dec 2020 16:48:06 +0800 From: Zhen Lei To: Lubomir Rintel , Pavel Machek , "Arnd Bergmann" , Rob Herring , linux-arm-kernel , devicetree , linux-kernel Subject: [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs Date: Mon, 7 Dec 2020 16:47:51 +0800 Message-ID: <20201207084752.1665-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.9] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201207_034828_554530_8806CB51 X-CRM114-Status: GOOD ( 10.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhen Lei Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org v1 --> v2: Update the patch description and subject. I'm going to describe the detailed analysis here, because I don't want the patch description to be too long. 0) make ARCH=arm CROSS_COMPILE=arm-linux-gnu- dtbs -j24 2>err.txt vim err.txt arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #address-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2.dtsi:472.23-480.6: Warning (spi_bus_bridge): /soc/apb@d4000000/spi@d4037000: incorrect #size-cells for SPI bus also defined at arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225.7-237.3 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dtb: Warning (spi_bus_reg): Failed prerequisite 'spi_bus_bridge' 1) mmp2.dtsi is included by mmp2-olpc-xo-1-75.dts, and the content of ssp3 node is: arch/arm/boot/dts/mmp2.dtsi:472 ssp3: spi@d4037000 { compatible = "marvell,mmp2-ssp"; reg = <0xd4037000 0x1000>; clocks = <&soc_clocks MMP2_CLK_SSP2>; interrupts = <20>; #address-cells = <1>; #size-cells = <0>; <-------- #size-cells = <0> status = "disabled"; }; arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts:225 &ssp3 { /delete-property/ #address-cells; <-------- #address-cells is deleted here /delete-property/ #size-cells; <-------- #size-cells is deleted here spi-slave; status = "okay"; ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>; slave { compatible = "olpc,xo1.75-ec"; spi-cpha; cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>; }; }; 2) scripts/dtc/checks.c: check_spi_bus_bridge() requires that the values of both #address-cells and #size-cells must be zero, when the node have "spi-slave" property. if (get_property(node, "spi-slave")) spi_addr_cells = 0; if (node_addr_cells(node) != spi_addr_cells) FAIL(c, dti, node, "incorrect #address-cells for SPI bus"); if (node_size_cells(node) != 0) FAIL(c, dti, node, "incorrect #size-cells for SPI bus"); 3) But both #address-cells and #size-cells properties are deleted. So the return value of node_addr_cells(node) is 2, and the return value of node_size_cells(node) is 1. #define node_addr_cells(n) \ (((n)->addr_cells == -1) ? 2 : (n)->addr_cells) #define node_size_cells(n) \ (((n)->size_cells == -1) ? 1 : (n)->size_cells) 4) The checks in 2) failed, so the above 0) warnings is displayed. v1: Patch 5/6. https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2341407.html Zhen Lei (1): ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel