kernel: add driver for virtual mtd_concat devices
authorBernhard Frauendienst <openwrt@nospam.obeliks.de>
Sat, 25 Aug 2018 10:48:54 +0000 (12:48 +0200)
committerJohn Crispin <john@phrozen.org>
Mon, 10 Sep 2018 07:35:07 +0000 (09:35 +0200)
commit3370e104954191eeab97df7cd07146d7c48e180d
tree9842041d2c8d95e78d2b40a7803518ba3440d26f
parent7768f115349da48f44478f0c5b79f89ffa54c3f4
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>
target/linux/generic/pending-4.14/495-mtd-core-add-get_mtd_device_by_node.patch [new file with mode: 0644]
target/linux/generic/pending-4.14/496-dt-bindings-add-bindings-for-mtd-concat-devices.patch [new file with mode: 0644]
target/linux/generic/pending-4.14/497-mtd-mtdconcat-add-dt-driver-for-concat-devices.patch [new file with mode: 0644]