All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
@ 2020-12-07  8:47 ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2020-12-07  8:47 UTC (permalink / raw)
  To: Lubomir Rintel, Pavel Machek, Arnd Bergmann, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: Zhen Lei

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
@ 2020-12-07  8:47 ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2020-12-07  8:47 UTC (permalink / raw)
  To: Lubomir Rintel, Pavel Machek, Arnd Bergmann, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: Zhen Lei

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
  2020-12-07  8:47 ` Zhen Lei
@ 2020-12-07  8:47   ` Zhen Lei
  -1 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2020-12-07  8:47 UTC (permalink / raw)
  To: Lubomir Rintel, Pavel Machek, Arnd Bergmann, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: Zhen Lei

The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node
have "spi-slave" property must with "#address-cells = <0>" and
"#size-cells = <0>". But currently both "#address-cells" and "#size-cells"
properties are deleted, the corresponding default values are 2 and 1. As a
result, the check fails and below warnings is displayed.

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'

Because the value of "#size-cells" is already defined as zero in the node
"ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to
explicitly add "#address-cells = <0>" and keep "#size-cells" no change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
index adde62d6fce73b9..82da44dacba7172 100644
--- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
+++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
@@ -224,7 +224,7 @@
 
 &ssp3 {
 	/delete-property/ #address-cells;
-	/delete-property/ #size-cells;
+	#address-cells = <0>;
 	spi-slave;
 	status = "okay";
 	ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
-- 
1.8.3



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
@ 2020-12-07  8:47   ` Zhen Lei
  0 siblings, 0 replies; 10+ messages in thread
From: Zhen Lei @ 2020-12-07  8:47 UTC (permalink / raw)
  To: Lubomir Rintel, Pavel Machek, Arnd Bergmann, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: Zhen Lei

The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node
have "spi-slave" property must with "#address-cells = <0>" and
"#size-cells = <0>". But currently both "#address-cells" and "#size-cells"
properties are deleted, the corresponding default values are 2 and 1. As a
result, the check fails and below warnings is displayed.

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'

Because the value of "#size-cells" is already defined as zero in the node
"ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to
explicitly add "#address-cells = <0>" and keep "#size-cells" no change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
index adde62d6fce73b9..82da44dacba7172 100644
--- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
+++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
@@ -224,7 +224,7 @@
 
 &ssp3 {
 	/delete-property/ #address-cells;
-	/delete-property/ #size-cells;
+	#address-cells = <0>;
 	spi-slave;
 	status = "okay";
 	ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
-- 
1.8.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
  2020-12-07  8:47   ` Zhen Lei
@ 2020-12-08 13:58     ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2020-12-08 13:58 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Lubomir Rintel, Pavel Machek, Arnd Bergmann, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel

On Mon, Dec 7, 2020 at 9:47 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node
> have "spi-slave" property must with "#address-cells = <0>" and
> "#size-cells = <0>". But currently both "#address-cells" and "#size-cells"
> properties are deleted, the corresponding default values are 2 and 1. As a
> result, the check fails and below warnings is displayed.
>
> 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'
>
> Because the value of "#size-cells" is already defined as zero in the node
> "ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to
> explicitly add "#address-cells = <0>" and keep "#size-cells" no change.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Right, I already sent the same patch earlier.

Lubomir, can I apply this to the fixes branch?

>  arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
> index adde62d6fce73b9..82da44dacba7172 100644
> --- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
> +++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
> @@ -224,7 +224,7 @@
>
>  &ssp3 {
>         /delete-property/ #address-cells;
> -       /delete-property/ #size-cells;
> +       #address-cells = <0>;
>         spi-slave;
>         status = "okay";
>         ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
> --
> 1.8.3
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
@ 2020-12-08 13:58     ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2020-12-08 13:58 UTC (permalink / raw)
  To: Zhen Lei
  Cc: devicetree, Arnd Bergmann, linux-kernel, Lubomir Rintel,
	Rob Herring, Pavel Machek, linux-arm-kernel

On Mon, Dec 7, 2020 at 9:47 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node
> have "spi-slave" property must with "#address-cells = <0>" and
> "#size-cells = <0>". But currently both "#address-cells" and "#size-cells"
> properties are deleted, the corresponding default values are 2 and 1. As a
> result, the check fails and below warnings is displayed.
>
> 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'
>
> Because the value of "#size-cells" is already defined as zero in the node
> "ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to
> explicitly add "#address-cells = <0>" and keep "#size-cells" no change.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Right, I already sent the same patch earlier.

Lubomir, can I apply this to the fixes branch?

>  arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
> index adde62d6fce73b9..82da44dacba7172 100644
> --- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
> +++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
> @@ -224,7 +224,7 @@
>
>  &ssp3 {
>         /delete-property/ #address-cells;
> -       /delete-property/ #size-cells;
> +       #address-cells = <0>;
>         spi-slave;
>         status = "okay";
>         ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
> --
> 1.8.3
>
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
  2020-12-08 13:58     ` Arnd Bergmann
@ 2020-12-09  7:02       ` Leizhen (ThunderTown)
  -1 siblings, 0 replies; 10+ messages in thread
From: Leizhen (ThunderTown) @ 2020-12-09  7:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lubomir Rintel, Pavel Machek, Arnd Bergmann, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel



On 2020/12/8 21:58, Arnd Bergmann wrote:
> On Mon, Dec 7, 2020 at 9:47 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node
>> have "spi-slave" property must with "#address-cells = <0>" and
>> "#size-cells = <0>". But currently both "#address-cells" and "#size-cells"
>> properties are deleted, the corresponding default values are 2 and 1. As a
>> result, the check fails and below warnings is displayed.
>>
>> 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'
>>
>> Because the value of "#size-cells" is already defined as zero in the node
>> "ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to
>> explicitly add "#address-cells = <0>" and keep "#size-cells" no change.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> 
> Right, I already sent the same patch earlier.

Oh, sorry, I don't known it. If you send it earlier, please apply your patch!

> 
> Lubomir, can I apply this to the fixes branch?

This fix is really should be considered to merge into v5.10.

> 
>>  arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
>> index adde62d6fce73b9..82da44dacba7172 100644
>> --- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
>> +++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
>> @@ -224,7 +224,7 @@
>>
>>  &ssp3 {
>>         /delete-property/ #address-cells;
>> -       /delete-property/ #size-cells;
>> +       #address-cells = <0>;
>>         spi-slave;
>>         status = "okay";
>>         ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
>> --
>> 1.8.3
>>
>>
> 
> .
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
@ 2020-12-09  7:02       ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 10+ messages in thread
From: Leizhen (ThunderTown) @ 2020-12-09  7:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: devicetree, Arnd Bergmann, linux-kernel, Lubomir Rintel,
	Rob Herring, Pavel Machek, linux-arm-kernel



On 2020/12/8 21:58, Arnd Bergmann wrote:
> On Mon, Dec 7, 2020 at 9:47 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> The check_spi_bus_bridge() in scripts/dtc/checks.c requires that the node
>> have "spi-slave" property must with "#address-cells = <0>" and
>> "#size-cells = <0>". But currently both "#address-cells" and "#size-cells"
>> properties are deleted, the corresponding default values are 2 and 1. As a
>> result, the check fails and below warnings is displayed.
>>
>> 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'
>>
>> Because the value of "#size-cells" is already defined as zero in the node
>> "ssp3: spi@d4037000" in arch/arm/boot/dts/mmp2.dtsi. So we only need to
>> explicitly add "#address-cells = <0>" and keep "#size-cells" no change.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> 
> Right, I already sent the same patch earlier.

Oh, sorry, I don't known it. If you send it earlier, please apply your patch!

> 
> Lubomir, can I apply this to the fixes branch?

This fix is really should be considered to merge into v5.10.

> 
>>  arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
>> index adde62d6fce73b9..82da44dacba7172 100644
>> --- a/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
>> +++ b/arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
>> @@ -224,7 +224,7 @@
>>
>>  &ssp3 {
>>         /delete-property/ #address-cells;
>> -       /delete-property/ #size-cells;
>> +       #address-cells = <0>;
>>         spi-slave;
>>         status = "okay";
>>         ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
>> --
>> 1.8.3
>>
>>
> 
> .
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
  2020-12-07  8:47 ` Zhen Lei
@ 2020-12-09 20:28   ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2020-12-09 20:28 UTC (permalink / raw)
  To: linux-arm-kernel, Lubomir Rintel, Zhen Lei, Rob Herring,
	devicetree, linux-kernel, Pavel Machek
  Cc: Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

On Mon, 7 Dec 2020 16:47:51 +0800, Zhen Lei wrote:
> 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'
> 
> [...]

I picked your version instead of my own.

Applied to arm/fixes, thanks!

[1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
      commit: a0cab089baf3048020de7bee53bccd598747126a

       Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
@ 2020-12-09 20:28   ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2020-12-09 20:28 UTC (permalink / raw)
  To: linux-arm-kernel, Lubomir Rintel, Zhen Lei, Rob Herring,
	devicetree, linux-kernel, Pavel Machek
  Cc: Arnd Bergmann

From: Arnd Bergmann <arnd@arndb.de>

On Mon, 7 Dec 2020 16:47:51 +0800, Zhen Lei wrote:
> 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'
> 
> [...]

I picked your version instead of my own.

Applied to arm/fixes, thanks!

[1/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs
      commit: a0cab089baf3048020de7bee53bccd598747126a

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-12-09 20:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07  8:47 [PATCH v2 0/1] ARM: dts: mmp2-olpc-xo-1-75: clear the warnings when make dtbs Zhen Lei
2020-12-07  8:47 ` Zhen Lei
2020-12-07  8:47 ` [PATCH v2 1/1] " Zhen Lei
2020-12-07  8:47   ` Zhen Lei
2020-12-08 13:58   ` Arnd Bergmann
2020-12-08 13:58     ` Arnd Bergmann
2020-12-09  7:02     ` Leizhen (ThunderTown)
2020-12-09  7:02       ` Leizhen (ThunderTown)
2020-12-09 20:28 ` [PATCH v2 0/1] " Arnd Bergmann
2020-12-09 20:28   ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.