[v5,0/4] MTD concat
mbox series

Message ID 20191127105522.31445-1-miquel.raynal@bootlin.com
Headers show
  • MTD concat
Related show


Miquel Raynal Nov. 27, 2019, 10:55 a.m. UTC

A year ago Bernhard Frauendienst started an effort to bring MTD
devices concatenation generic [1]. Today I also need this
concatenation to be possible in order to support configurations where
two MTD devices are treated like one bigger in order to be able to
define partitions across chip boundaries.

After having talked with Mark Brown, Boris Brezillon and Rob Herring,
the only approach which seems acceptable is to add a property in the
partitions nodes to describe which partitions should be concatenated
in a virtual device.

At first I changed a bit the code logic and style, keeping the logic
from the original version. Since the last bindings change, I rewrote
almost all the driver, so I took ownership on it, keeping Bernhard in
a 'Suggested-by' tag.

I would like to add another way to concatenate devices: with module
parameters/arguments on the cmdline. This is easily doable in a second


[1] https://lwn.net/ml/linux-kernel/20180907173515.19990-1-kernel@nospam.obeliks.de/

Bernhard Frauendienst (1):
  mtd: Add get_mtd_device_by_node() helper

Miquel Raynal (3):
  dt-bindings: mtd: Describe MTD partitions concatenation
  mtd: concat: Fix a comment referring to an unknown symbol
  mtd: Add driver for concatenating devices

 .../devicetree/bindings/mtd/partition.txt     |   1 +
 drivers/mtd/Kconfig                           |   8 +
 drivers/mtd/Makefile                          |   1 +
 drivers/mtd/mtd_virt_concat.c                 | 240 ++++++++++++++++++
 drivers/mtd/mtdconcat.c                       |   5 +-
 drivers/mtd/mtdcore.c                         |  38 +++
 include/linux/mtd/mtd.h                       |   2 +
 7 files changed, 291 insertions(+), 4 deletions(-)
 create mode 100644 drivers/mtd/mtd_virt_concat.c