-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: import pending patches adding support for NVMEM on UBI and MMC
Similar to supporting nvmem-layouts on MTD devices, also allow referencing UBI and MMC devices in DT. Signed-off-by: Daniel Golle <[email protected]>
- Loading branch information
Showing
22 changed files
with
1,876 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -266,7 +266,7 @@ Signed-off-by: Phil Elwell <[email protected]> | |
static inline int mmc_blk_part_switch(struct mmc_card *card, | ||
unsigned int part_type); | ||
static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, | ||
@@ -3040,6 +3047,8 @@ static int mmc_blk_probe(struct mmc_card | ||
@@ -3049,6 +3056,8 @@ static int mmc_blk_probe(struct mmc_card | ||
{ | ||
struct mmc_blk_data *md; | ||
int ret = 0; | ||
|
@@ -275,7 +275,7 @@ Signed-off-by: Phil Elwell <[email protected]> | |
|
||
/* | ||
* Check that the card supports the command class(es) we need. | ||
@@ -3047,7 +3056,16 @@ static int mmc_blk_probe(struct mmc_card | ||
@@ -3056,7 +3065,16 @@ static int mmc_blk_probe(struct mmc_card | ||
if (!(card->csd.cmdclass & CCC_BLOCK_READ)) | ||
return -ENODEV; | ||
|
||
|
@@ -293,7 +293,7 @@ Signed-off-by: Phil Elwell <[email protected]> | |
|
||
card->complete_wq = alloc_workqueue("mmc_complete", | ||
WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); | ||
@@ -3062,6 +3080,17 @@ static int mmc_blk_probe(struct mmc_card | ||
@@ -3071,6 +3089,17 @@ static int mmc_blk_probe(struct mmc_card | ||
goto out_free; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
target/linux/generic/pending-6.1/450-01-dt-bindings-mtd-add-basic-bindings-for-UBI.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
From ffbbe7d66872ff8957dad2136133e28a1fd5d437 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Golle <[email protected]> | ||
Date: Mon, 7 Aug 2023 22:51:05 +0100 | ||
Subject: [PATCH 01/15] dt-bindings: mtd: add basic bindings for UBI | ||
|
||
Add basic bindings for UBI devices and volumes. | ||
|
||
Signed-off-by: Daniel Golle <[email protected]> | ||
--- | ||
.../bindings/mtd/partitions/linux,ubi.yaml | 65 +++++++++++++++++++ | ||
.../bindings/mtd/partitions/ubi-volume.yaml | 35 ++++++++++ | ||
2 files changed, 100 insertions(+) | ||
create mode 100644 Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml | ||
create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml | ||
|
||
--- /dev/null | ||
+++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml | ||
@@ -0,0 +1,65 @@ | ||
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause | ||
+%YAML 1.2 | ||
+--- | ||
+$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml# | ||
+$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
+ | ||
+title: Unsorted Block Images | ||
+ | ||
+description: | | ||
+ UBI ("Unsorted Block Images") is a volume management system for raw | ||
+ flash devices which manages multiple logical volumes on a single | ||
+ physical flash device and spreads the I/O load (i.e wear-leveling) | ||
+ across the whole flash chip. | ||
+ | ||
+maintainers: | ||
+ - Daniel Golle <[email protected]> | ||
+ | ||
+allOf: | ||
+ - $ref: partition.yaml# | ||
+ | ||
+properties: | ||
+ compatible: | ||
+ const: linux,ubi | ||
+ | ||
+ volumes: | ||
+ type: object | ||
+ description: UBI Volumes | ||
+ | ||
+ patternProperties: | ||
+ "^ubi-volume-.*$": | ||
+ $ref: /schemas/mtd/partitions/ubi-volume.yaml# | ||
+ | ||
+ unevaluatedProperties: false | ||
+ | ||
+required: | ||
+ - compatible | ||
+ | ||
+unevaluatedProperties: false | ||
+ | ||
+examples: | ||
+ - | | ||
+ partitions { | ||
+ compatible = "fixed-partitions"; | ||
+ #address-cells = <1>; | ||
+ #size-cells = <1>; | ||
+ | ||
+ partition@0 { | ||
+ reg = <0x0 0x100000>; | ||
+ label = "bootloader"; | ||
+ read-only; | ||
+ }; | ||
+ | ||
+ partition@100000 { | ||
+ reg = <0x100000 0x1ff00000>; | ||
+ label = "ubi"; | ||
+ compatible = "linux,ubi"; | ||
+ | ||
+ volumes { | ||
+ ubi-volume-caldata { | ||
+ volid = <2>; | ||
+ volname = "rf"; | ||
+ }; | ||
+ }; | ||
+ }; | ||
+ }; | ||
--- /dev/null | ||
+++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml | ||
@@ -0,0 +1,35 @@ | ||
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause | ||
+%YAML 1.2 | ||
+--- | ||
+$id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml# | ||
+$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
+ | ||
+title: UBI volume | ||
+ | ||
+description: | | ||
+ This binding describes a single UBI volume. Volumes can be matches either | ||
+ by their ID or their name, or both. | ||
+ | ||
+maintainers: | ||
+ - Daniel Golle <[email protected]> | ||
+ | ||
+properties: | ||
+ volid: | ||
+ $ref: "/schemas/types.yaml#/definitions/uint32" | ||
+ description: | ||
+ Match UBI volume ID | ||
+ | ||
+ volname: | ||
+ $ref: "/schemas/types.yaml#/definitions/string" | ||
+ description: | ||
+ Match UBI volume ID | ||
+ | ||
+anyOf: | ||
+ - required: | ||
+ - volid | ||
+ | ||
+ - required: | ||
+ - volname | ||
+ | ||
+# This is a generic file other binding inherit from and extend | ||
+additionalProperties: true |
48 changes: 48 additions & 0 deletions
48
...nux/generic/pending-6.1/450-02-dt-bindings-mtd-ubi-volume-allow-UBI-volumes-to-prov.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
From e4dad3aa5c3ab9c553555dd23c0b85f725f2eb51 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Golle <[email protected]> | ||
Date: Mon, 7 Aug 2023 22:53:01 +0100 | ||
Subject: [PATCH 02/15] dt-bindings: mtd: ubi-volume: allow UBI volumes to | ||
provide NVMEM | ||
|
||
UBI volumes may be used to contain NVMEM bits, typically device MAC | ||
addresses or wireless radio calibration data. | ||
|
||
Signed-off-by: Daniel Golle <[email protected]> | ||
--- | ||
.../devicetree/bindings/mtd/partitions/linux,ubi.yaml | 10 ++++++++++ | ||
.../devicetree/bindings/mtd/partitions/ubi-volume.yaml | 5 +++++ | ||
2 files changed, 15 insertions(+) | ||
|
||
--- a/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml | ||
+++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml | ||
@@ -59,6 +59,16 @@ examples: | ||
ubi-volume-caldata { | ||
volid = <2>; | ||
volname = "rf"; | ||
+ | ||
+ nvmem-layout { | ||
+ compatible = "fixed-layout"; | ||
+ #address-cells = <1>; | ||
+ #size-cells = <1>; | ||
+ | ||
+ eeprom@0 { | ||
+ reg = <0x0 0x1000>; | ||
+ }; | ||
+ }; | ||
}; | ||
}; | ||
}; | ||
--- a/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml | ||
+++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml | ||
@@ -24,6 +24,11 @@ properties: | ||
description: | ||
Match UBI volume ID | ||
|
||
+ nvmem-layout: | ||
+ $ref: /schemas/nvmem/layouts/nvmem-layout.yaml# | ||
+ description: | ||
+ This container may reference an NVMEM layout parser. | ||
+ | ||
anyOf: | ||
- required: | ||
- volid |
Oops, something went wrong.