From: Bernhard Frauendienst <kernel@nospam.obeliks.de>
To: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@bootlin.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: Bernhard Frauendienst <kernel@nospam.obeliks.de>,
Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/3] mtd concat device driver
Date: Sat, 8 Sep 2018 15:13:42 +0200 [thread overview]
Message-ID: <20180908131345.8145-1-kernel@nospam.obeliks.de> (raw)
Hi everybody,
my router firmware concatenates two identical flash chips into a single
mtd using mtd_concat_create(), and sets up partitions in a way where one
of them crosses the chip boundary. When porting OpenWRT support for the
board from a mach-file based setup to a device-tree based one, I found
that there is no generic way to create a mtd_concat device from within
the dts. The following patches attempt to provide that possibility.
This is a third roll of that patch series, the first one can be seen at
[1]. The second one [2] was a blunder of my own making. Apologies for
not being able to address the correct recipients two times in a row.
In the first discussion, concerns were raised that a driver for a
"virtual" device like this might have no place in the device tree
system. However, I would argue that specifying a composite device is
very similar to specifying the partitions of a mtd, which can also done
in the device tree. In fact, I believe this is the only way to be able
to specify the partitions of such a concat device in the dts file (but
I'm happy to be corrected if I'm mistaken).
I have made the example in the dt-binding documentation a bit more
expressive in this detail.
In the second roll I have also addressed all issues that reviewers have
brought up so far, hopefully to their satisfaction. These were mainly
whitespace fixes and improved comments.
Best regards,
Bernhard
[1] http://lists.infradead.org/pipermail/linux-mtd/2018-September/083832.html
[2] https://lkml.org/lkml/2018/9/7/1015
Bernhard Frauendienst (3):
mtd: core: add get_mtd_device_by_node
dt-bindings: add bindings for mtd-concat devices
mtd: mtdconcat: add dt driver for concat devices
.../devicetree/bindings/mtd/mtd-concat.txt | 36 +++++
drivers/mtd/Kconfig | 2 +
drivers/mtd/Makefile | 3 +
drivers/mtd/composite/Kconfig | 12 ++
drivers/mtd/composite/Makefile | 6 +
drivers/mtd/composite/virt_concat.c | 128 ++++++++++++++++++
drivers/mtd/mtdcore.c | 38 ++++++
include/linux/mtd/mtd.h | 2 +
8 files changed, 228 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/mtd-concat.txt
create mode 100644 drivers/mtd/composite/Kconfig
create mode 100644 drivers/mtd/composite/Makefile
create mode 100644 drivers/mtd/composite/virt_concat.c
--
2.18.0
next reply other threads:[~2018-09-08 13:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-08 13:13 Bernhard Frauendienst [this message]
2018-09-08 13:13 ` [PATCH v3 1/3] mtd: core: add get_mtd_device_by_node Bernhard Frauendienst
2018-09-08 13:13 ` [PATCH v3 2/3] dt-bindings: add bindings for mtd-concat devices Bernhard Frauendienst
2018-09-10 10:51 ` Rafał Miłecki
2018-09-10 12:13 ` Bernhard Frauendienst
2018-09-10 12:17 ` Bernhard Frauendienst
2018-09-08 13:13 ` [PATCH v3 3/3] mtd: mtdconcat: add dt driver for concat devices Bernhard Frauendienst
2018-09-10 21:47 ` Rob Herring
2018-09-14 13:42 ` Bernhard Frauendienst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180908131345.8145-1-kernel@nospam.obeliks.de \
--to=kernel@nospam.obeliks.de \
--cc=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mark.rutland@arm.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).