lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1704367382-29979-1-git-send-email-quic_zhenhuah@quicinc.com>
Date: Thu, 4 Jan 2024 19:23:02 +0800
From: Zhenhua Huang <quic_zhenhuah@...cinc.com>
To: <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
        <robh+dt@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>,
        <conor+dt@...nel.org>
CC: <linux-mtd@...ts.infradead.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <quic_tingweiz@...cinc.com>,
        <quic_bjorande@...cinc.com>, Zhenhua Huang <quic_zhenhuah@...cinc.com>
Subject: [PATCH] dt-bindings: mtd: Change the schema for nodename which includes "sram"

Node name which includes "sram" not only represents MTD devices, but also
lots of sram devices(eg, qcom,imem.yaml, rules in folder sram/*).

To avoid the conflicts, change the schema as:
 - if node name includes "sram", must select "compatible" to match
(I have listed all "comptible" string in mtd.yaml by searching
drivers/mtd/* to find applicable drivers)
 - if node name is nand/flash, use "nodename" to select.

Fixes: 7bdc671822e9 ("dt-bindings: mtd: physmap: Reuse the generic definitions")
Signed-off-by: Zhenhua Huang <quic_zhenhuah@...cinc.com>
---
Hello,

Tested a few devicetree nodes, which confirms:
"qcom,imem.yaml" which in sram/ not matches with mtd.yaml anymore.
All nodes include string "sram" must have "compatible" which listed in
mtd.yaml to be matched.

Current I just modify the rule for "sram" as it is definitely conflicting with
rules in sram/*. I have not much backgrounds on nand/flash whether they may have
similar conflicts.

 Documentation/devicetree/bindings/mtd/mtd.yaml | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index f322290..1704437 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -10,10 +10,28 @@ maintainers:
   - Miquel Raynal <miquel.raynal@...tlin.com>
   - Richard Weinberger <richard@....at>
 
-properties:
-  $nodename:
-    pattern: "^(flash|.*sram|nand)(@.*)?$"
+select:
+  if:
+    properties:
+      $nodename:
+        pattern: "^.*sram(@.*)?$"
+  then:
+    properties:
+      compatible:
+        enum:
+          - arm,vexpress-psram
+          - cypress,cy7c1019dv33-10zsxi
+          - microchip,48l640
+          - mtd-ram
+  else:
+    properties:
+      $nodename:
+        pattern: "^(flash|nand)(@.*)?$"
 
+  required:
+    - $nodename
+
+properties:
   label:
     description:
       User-defined MTD device name. Can be used to assign user friendly
-- 
2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ