aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch
diff options
context:
space:
mode:
authorBernhard Frauendienst <openwrt@nospam.obeliks.de>2018-08-25 12:48:54 +0200
committerJohn Crispin <john@phrozen.org>2018-09-10 09:35:07 +0200
commit3370e104954191eeab97df7cd07146d7c48e180d (patch)
tree9842041d2c8d95e78d2b40a7803518ba3440d26f /target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch
parent7768f115349da48f44478f0c5b79f89ffa54c3f4 (diff)
downloadupstream-3370e104954191eeab97df7cd07146d7c48e180d.tar.gz
upstream-3370e104954191eeab97df7cd07146d7c48e180d.tar.bz2
upstream-3370e104954191eeab97df7cd07146d7c48e180d.zip
kernel: add driver for virtual mtd_concat devices
Some systems require multiple flash chips to be concatenated and read as a single mtd device. The ar71xx target provides custom code to create such mtdconcat devices. When porting devices to ath79, however, there is no way to create such devices from within the device tree. This commit adds a driver for creating virtual mtd-concat devices to the ath79 target. Nodes must have a compatible = "virtual,mtd-concat" line, and define a list of devices to concat in the 'devices' property, for example: flash { compatible = "virtual,mtd-concat"; devices = <&flash0 &flash1>; }; The driver is added to the very end of the mtd Makefile to increase the likelyhood of all child devices already being loaded at the time of probing, preventing unnecessary deferred probes which might in turn cause other problems (like failure to load MAC addresses from art because the partitions are not loaded yet). Signed-off-by: Bernhard Frauendienst <openwrt@nospam.obeliks.de>
Diffstat (limited to 'target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch')
-rw-r--r--target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch b/target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch
new file mode 100644
index 0000000000..99fdb0dc0f
--- /dev/null
+++ b/target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch
@@ -0,0 +1,58 @@
+From 5734c6669fba7ddb5ef491ccff7159d15dba0b59 Mon Sep 17 00:00:00 2001
+From: Bernhard Frauendienst <kernel@nospam.obeliks.de>
+Date: Wed, 5 Sep 2018 01:32:51 +0200
+Subject: [PATCH 496/497] dt-bindings: add bindings for mtd-concat devices
+
+Document virtual mtd-concat device bindings.
+
+Signed-off-by: Bernhard Frauendienst <kernel@nospam.obeliks.de>
+---
+ .../devicetree/bindings/mtd/mtd-concat.txt | 36 +++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/mtd/mtd-concat.txt
+
+diff --git a/Documentation/devicetree/bindings/mtd/mtd-concat.txt b/Documentation/devicetree/bindings/mtd/mtd-concat.txt
+new file mode 100644
+index 000000000000..2daf3157b163
+--- /dev/null
++++ b/Documentation/devicetree/bindings/mtd/mtd-concat.txt
+@@ -0,0 +1,36 @@
++Virtual MTD concat device
++
++Requires properties:
++- devices: list of phandles to mtd nodes that should be concatenated
++
++Example:
++
++&spi {
++ flash0: flash@0 {
++ ...
++ };
++ flash1: flash@1 {
++ ...
++ };
++};
++
++flash {
++ compatible = "mtd-concat";
++
++ devices = <&flash0 &flash1>;
++
++ partitions {
++ compatible = "fixed-partitions";
++
++ partition@0 {
++ label = "boot";
++ reg = <0x0000000 0x0040000>;
++ read-only;
++ };
++
++ partition@40000 {
++ label = "firmware";
++ reg = <0x0040000 0x1fc0000>;
++ };
++ }
++}
+--
+2.18.0
+