From: Zhen Lei <thunder.leizhen@huawei.com>
To: Lubomir Rintel <lkundrak@v3.sk>, Pavel Machek <pavel@ucw.cz>,
"Arnd Bergmann" <arnd@arndb.de>, Rob Herring <robh+dt@kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
devicetree <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
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 [thread overview]
Message-ID: <20201207084752.1665-1-thunder.leizhen@huawei.com> (raw)
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
next reply other threads:[~2020-12-07 8:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 8:47 Zhen Lei [this message]
2020-12-07 8:47 ` [PATCH v2 1/1] " Zhen Lei
2020-12-08 13:58 ` Arnd Bergmann
2020-12-09 7:02 ` Leizhen (ThunderTown)
2020-12-09 20:28 ` [PATCH v2 0/1] " Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201207084752.1665-1-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkundrak@v3.sk \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®