From: "Rafał Miłecki" <zajec5@gmail.com>
To: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
Rob Herring <robh+dt@kernel.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-mtd@lists.infradead.org,
"Rafał Miłecki" <rafal@milecki.pl>,
"Jonas Gorski" <jonas.gorski@gmail.com>
Subject: [PATCH V2 2/2] mtd: parsers: trx: add of_match_table with the new DT binding
Date: Tue, 26 Jun 2018 00:05:08 +0200 [thread overview]
Message-ID: <20180625220508.21242-2-zajec5@gmail.com> (raw)
In-Reply-To: <20180625220508.21242-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
This allows using TRX parser to find TRX partitions on flash device
described in DT using a proper binding. It's useful for devices storing
firmware on a separated flash and having rootfs partition in it.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Update to support only the "brcm,trx" binding
---
drivers/mtd/parsers/parser_trx.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mtd/parsers/parser_trx.c b/drivers/mtd/parsers/parser_trx.c
index df360a75e1eb..f580a41a52b8 100644
--- a/drivers/mtd/parsers/parser_trx.c
+++ b/drivers/mtd/parsers/parser_trx.c
@@ -116,9 +116,16 @@ static int parser_trx_parse(struct mtd_info *mtd,
return i;
};
+static const struct of_device_id mtd_parser_trx_of_match_table[] = {
+ { .compatible = "brcm,trx" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, mtd_parser_trx_of_match_table);
+
static struct mtd_part_parser mtd_parser_trx = {
.parse_fn = parser_trx_parse,
.name = "trx",
+ .of_match_table = mtd_parser_trx_of_match_table,
};
module_mtd_part_parser(mtd_parser_trx);
--
2.13.7
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2018-06-25 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 10:44 [PATCH 1/2] dt-bindings: mtd: document Broadcom's TRX firmware format binding Rafał Miłecki
2018-06-12 10:44 ` [PATCH 2/2] mtd: parsers: trx: add of_match_table with the new DT binding Rafał Miłecki
2018-06-25 21:21 ` [PATCH 1/2] dt-bindings: mtd: document Broadcom's TRX firmware format binding Rob Herring
2018-06-25 21:33 ` Rafał Miłecki
2018-06-25 21:51 ` Rob Herring
2018-06-25 22:05 ` [PATCH V2 " Rafał Miłecki
2018-06-25 22:05 ` Rafał Miłecki [this message]
2018-06-26 14:21 ` Rob Herring
2018-07-07 10:01 ` Boris Brezillon
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=20180625220508.21242-2-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=jonas.gorski@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mark.rutland@arm.com \
--cc=rafal@milecki.pl \
--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).