* [PATCH 0/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers
@ 2021-05-20 11:54 Zhen Lei
2021-05-20 11:54 ` [PATCH 1/2] dt-bindings: serial: pl011: Delete an incorrect compatible string Zhen Lei
2021-05-20 11:54 ` [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
0 siblings, 2 replies; 7+ messages in thread
From: Zhen Lei @ 2021-05-20 11:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Arnd Bergmann, linux-serial, devicetree
Cc: Zhen Lei
Zhen Lei (2):
dt-bindings: serial: pl011: Delete an incorrect compatible string
dt-bindings: serial: pl011: Avoid matching device tree nodes of
variant pl011 drivers
.../devicetree/bindings/serial/pl011.yaml | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
--
2.21.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] dt-bindings: serial: pl011: Delete an incorrect compatible string
2021-05-20 11:54 [PATCH 0/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
@ 2021-05-20 11:54 ` Zhen Lei
2021-05-21 18:56 ` Rob Herring
2021-05-20 11:54 ` [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
1 sibling, 1 reply; 7+ messages in thread
From: Zhen Lei @ 2021-05-20 11:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Arnd Bergmann, linux-serial, devicetree
Cc: Zhen Lei
The compatible strings "zte,zx296702-uart" and "arm,primecell" are a
combination, but commit 89d4f98ae90d ("ARM: remove zte zx platform")
removes only the former. It is incorrect to match driver pl011 based only
on the remaining "arm,primecell". Delete it.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
Documentation/devicetree/bindings/serial/pl011.yaml | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
index 142187337c76..5ea00f8a283d 100644
--- a/Documentation/devicetree/bindings/serial/pl011.yaml
+++ b/Documentation/devicetree/bindings/serial/pl011.yaml
@@ -24,12 +24,9 @@ select:
properties:
compatible:
- oneOf:
- - items:
- - const: arm,pl011
- - const: arm,primecell
- - items:
- - const: arm,primecell
+ items:
+ - const: arm,pl011
+ - const: arm,primecell
reg:
maxItems: 1
--
2.21.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers
2021-05-20 11:54 [PATCH 0/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
2021-05-20 11:54 ` [PATCH 1/2] dt-bindings: serial: pl011: Delete an incorrect compatible string Zhen Lei
@ 2021-05-20 11:54 ` Zhen Lei
2021-05-21 1:29 ` Leizhen (ThunderTown)
2021-05-21 18:54 ` Rob Herring
1 sibling, 2 replies; 7+ messages in thread
From: Zhen Lei @ 2021-05-20 11:54 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Arnd Bergmann, linux-serial, devicetree
Cc: Zhen Lei
There is a variant driver of pl011, which may have a compatible string
written as: "arm,sbsa-uart", "arm,pl011". Because it contains "arm,pl011",
so the corresponding device tree nodes are also checked by this YAML file.
As a result, many flase warnings similar to the following are reported:
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dt.yaml:
serial@21c0000: compatible:0: 'arm,pl011' was expected
serial@21c0000: compatible:1: 'arm,primecell' was expected
Change to only check the device tree nodes that are matched exactly.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
Documentation/devicetree/bindings/serial/pl011.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
index 5ea00f8a283d..3683e4567645 100644
--- a/Documentation/devicetree/bindings/serial/pl011.yaml
+++ b/Documentation/devicetree/bindings/serial/pl011.yaml
@@ -16,9 +16,9 @@ allOf:
select:
properties:
compatible:
- contains:
- enum:
- - arm,pl011
+ items:
+ - const: arm,pl011
+ - const: arm,primecell
required:
- compatible
--
2.21.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers
2021-05-20 11:54 ` [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
@ 2021-05-21 1:29 ` Leizhen (ThunderTown)
2021-05-21 18:54 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Leizhen (ThunderTown) @ 2021-05-21 1:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Arnd Bergmann, linux-serial, devicetree
On 2021/5/20 19:54, Zhen Lei wrote:
> There is a variant driver of pl011, which may have a compatible string
> written as: "arm,sbsa-uart", "arm,pl011". Because it contains "arm,pl011",
> so the corresponding device tree nodes are also checked by this YAML file.
> As a result, many flase warnings similar to the following are reported:
>
> arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dt.yaml:
> serial@21c0000: compatible:0: 'arm,pl011' was expected
> serial@21c0000: compatible:1: 'arm,primecell' was expected
>
> Change to only check the device tree nodes that are matched exactly.
Hi, all:
This morning I rethought, and there's something wrong with this change.
The compatibles that are incorrectly written cannot be identified, for
example, only "arm,pl011". I'll think of something else.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> Documentation/devicetree/bindings/serial/pl011.yaml | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
> index 5ea00f8a283d..3683e4567645 100644
> --- a/Documentation/devicetree/bindings/serial/pl011.yaml
> +++ b/Documentation/devicetree/bindings/serial/pl011.yaml
> @@ -16,9 +16,9 @@ allOf:
> select:
> properties:
> compatible:
> - contains:
> - enum:
> - - arm,pl011
> + items:
> + - const: arm,pl011
> + - const: arm,primecell
> required:
> - compatible
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers
2021-05-20 11:54 ` [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
2021-05-21 1:29 ` Leizhen (ThunderTown)
@ 2021-05-21 18:54 ` Rob Herring
2021-05-24 2:12 ` Leizhen (ThunderTown)
1 sibling, 1 reply; 7+ messages in thread
From: Rob Herring @ 2021-05-21 18:54 UTC (permalink / raw)
To: Zhen Lei; +Cc: Greg Kroah-Hartman, Arnd Bergmann, linux-serial, devicetree
On Thu, May 20, 2021 at 6:54 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> There is a variant driver of pl011, which may have a compatible string
> written as: "arm,sbsa-uart", "arm,pl011". Because it contains "arm,pl011",
> so the corresponding device tree nodes are also checked by this YAML file.
> As a result, many flase warnings similar to the following are reported:
>
> arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dt.yaml:
> serial@21c0000: compatible:0: 'arm,pl011' was expected
> serial@21c0000: compatible:1: 'arm,primecell' was expected
The DT is wrong. The h/w is either a PL011 or it isn't. If it is, then
the compatible should be '"arm,pl011", "arm,primecell"'. There is no
point in making it 'arm,sbsa-uart' as the PL011 (and OS support for
it) predate SBSA (by a lot). If it is not a PL011 and only the SBSA
subset, then it should be "arm,sbsa-uart".
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: serial: pl011: Delete an incorrect compatible string
2021-05-20 11:54 ` [PATCH 1/2] dt-bindings: serial: pl011: Delete an incorrect compatible string Zhen Lei
@ 2021-05-21 18:56 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-05-21 18:56 UTC (permalink / raw)
To: Zhen Lei; +Cc: Greg Kroah-Hartman, Arnd Bergmann, linux-serial, devicetree
On Thu, May 20, 2021 at 6:54 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> The compatible strings "zte,zx296702-uart" and "arm,primecell" are a
> combination, but commit 89d4f98ae90d ("ARM: remove zte zx platform")
> removes only the former. It is incorrect to match driver pl011 based only
> on the remaining "arm,primecell". Delete it.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> Documentation/devicetree/bindings/serial/pl011.yaml | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers
2021-05-21 18:54 ` Rob Herring
@ 2021-05-24 2:12 ` Leizhen (ThunderTown)
0 siblings, 0 replies; 7+ messages in thread
From: Leizhen (ThunderTown) @ 2021-05-24 2:12 UTC (permalink / raw)
To: Rob Herring; +Cc: Greg Kroah-Hartman, Arnd Bergmann, linux-serial, devicetree
On 2021/5/22 2:54, Rob Herring wrote:
> On Thu, May 20, 2021 at 6:54 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>>
>> There is a variant driver of pl011, which may have a compatible string
>> written as: "arm,sbsa-uart", "arm,pl011". Because it contains "arm,pl011",
>> so the corresponding device tree nodes are also checked by this YAML file.
>> As a result, many flase warnings similar to the following are reported:
>>
>> arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-cx.dt.yaml:
>> serial@21c0000: compatible:0: 'arm,pl011' was expected
>> serial@21c0000: compatible:1: 'arm,primecell' was expected
>
> The DT is wrong. The h/w is either a PL011 or it isn't. If it is, then
> the compatible should be '"arm,pl011", "arm,primecell"'. There is no
> point in making it 'arm,sbsa-uart' as the PL011 (and OS support for
> it) predate SBSA (by a lot). If it is not a PL011 and only the SBSA
> subset, then it should be "arm,sbsa-uart".
Yes, I agree. I'll send a patch to fix the freescale's dts.
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:923: compatible = "arm,sbsa-uart","arm,pl011";
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:931: compatible = "arm,sbsa-uart","arm,pl011";
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:939: compatible = "arm,sbsa-uart","arm,pl011";
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi:947: compatible = "arm,sbsa-uart","arm,pl011";
arch/arm64/boot/dts/hisilicon/hip07.dtsi:1242: compatible = "arm,sbsa-uart";
>
> Rob
>
> .
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-05-24 2:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 11:54 [PATCH 0/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
2021-05-20 11:54 ` [PATCH 1/2] dt-bindings: serial: pl011: Delete an incorrect compatible string Zhen Lei
2021-05-21 18:56 ` Rob Herring
2021-05-20 11:54 ` [PATCH 2/2] dt-bindings: serial: pl011: Avoid matching device tree nodes of variant pl011 drivers Zhen Lei
2021-05-21 1:29 ` Leizhen (ThunderTown)
2021-05-21 18:54 ` Rob Herring
2021-05-24 2:12 ` Leizhen (ThunderTown)
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.