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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240925214544.6114-5-ansuelsmth@gmail.com>
Date: Wed, 25 Sep 2024 23:45:24 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Jens Axboe <axboe@...nel.dk>,
	Jonathan Corbet <corbet@....net>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Richard Weinberger <richard@....at>,
	Vignesh Raghavendra <vigneshr@...com>,
	Christian Marangi <ansuelsmth@...il.com>,
	Simon Glass <sjg@...omium.org>,
	INAGAKI Hiroshi <musashino.open@...il.com>,
	Daniel Golle <daniel@...rotopia.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Christian Brauner <brauner@...nel.org>,
	Li Lingfeng <lilingfeng3@...wei.com>,
	Christian Heusel <christian@...sel.eu>,
	Rafał Miłecki <rafal@...ecki.pl>,
	linux-block@...r.kernel.org,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org,
	linux-mmc@...r.kernel.org,
	linux-mtd@...ts.infradead.org,
	Lorenzo Bianconi <lorenzo@...nel.org>
Subject: [RFC PATCH v2 4/5] dt-bindings: block: Generalize and introduce property for partitions

Generalize property from MTD partitions schema and introduce property for
block partitions defined in OF.

Partition schema for block devices is a reduced schema of the MTD as
only a few property are supported for it. (reg, label and read-only)

Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
---
 .../bindings/block/partitions/partition.yaml  | 33 +++++++++++++++++++
 .../bindings/block/partitions/partitions.yaml | 27 +++++++++++++++
 .../bindings/mtd/partitions/partition.yaml    | 10 ++----
 3 files changed, 62 insertions(+), 8 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/block/partitions/partition.yaml
 create mode 100644 Documentation/devicetree/bindings/block/partitions/partitions.yaml

diff --git a/Documentation/devicetree/bindings/block/partitions/partition.yaml b/Documentation/devicetree/bindings/block/partitions/partition.yaml
new file mode 100644
index 000000000000..b9b1d8139e56
--- /dev/null
+++ b/Documentation/devicetree/bindings/block/partitions/partition.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/block/partitions/partition.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Partition
+
+description: |
+  This binding describes a single flash partition. Each partition must have its
+  relative offset and size specified. Depending on partition function extra
+  properties can be used.
+
+maintainers:
+  - Christian Marangi <ansuelsmth@...il.com>
+
+properties:
+  reg:
+    description: partition's offset and size within the flash (in sector
+      block, 512byte)
+    maxItems: 1
+
+  label:
+    description: The label / name for this partition.
+
+  read-only:
+    description: This parameter, if present, is a hint that this partition
+      should only be mounted read-only. This is usually used for flash
+      partitions containing early-boot firmware images or data which should
+      not be clobbered.
+    type: boolean
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/block/partitions/partitions.yaml b/Documentation/devicetree/bindings/block/partitions/partitions.yaml
new file mode 100644
index 000000000000..9c161aac364d
--- /dev/null
+++ b/Documentation/devicetree/bindings/block/partitions/partitions.yaml
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/block/partitions/partitions.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Partitions
+
+description: |
+  This binding is generic and describes the content of the partitions container
+  node.
+
+maintainers:
+  - Christian Marangi <ansuelsmth@...il.com>
+
+properties:
+  '#address-cells':
+    enum: [1, 2]
+
+  '#size-cells':
+    enum: [1, 2]
+
+patternProperties:
+  "^partition@[0-9a-f]+$":
+    $ref: partition.yaml
+
+unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
index 80d0452a2a33..e822d3219b68 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
@@ -6,6 +6,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Partition
 
+$ref: /schemas/block/partitions/partition.yaml
+
 description: |
   This binding describes a single flash partition. Each partition must have its
   relative offset and size specified. Depending on partition function extra
@@ -28,19 +30,11 @@ maintainers:
 properties:
   reg:
     description: partition's offset and size within the flash
-    maxItems: 1
 
   label:
     description: The label / name for this partition. If omitted, the label
       is taken from the node name (excluding the unit address).
 
-  read-only:
-    description: This parameter, if present, is a hint that this partition
-      should only be mounted read-only. This is usually used for flash
-      partitions containing early-boot firmware images or data which should
-      not be clobbered.
-    type: boolean
-
   lock:
     description: Do not unlock the partition at initialization time (not
       supported on all devices)
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ