From: Ian Goegebuer <goegebuer@google.com>
To: Vignesh Raghavendra <vigneshr@ti.com>
Cc: "Ronald G . Minnich" <rminnich@google.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Jethro Beekman <jethro@fortanix.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Sverdlin <alexander.sverdlin@nokia.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Ian Goegebuer <goegebuer@google.com>
Subject: [PATCH] mtd: parser: cmdline: Support MTD names containing one or more colons
Date: Wed, 23 Dec 2020 13:56:30 -0800 [thread overview]
Message-ID: <20201223215630.1917891-1-goegebuer@google.com> (raw)
In-Reply-To: <1887c783-7a80-a71c-949f-c07c83c2d0fe@ti.com>
On Intel platforms, the usable SPI area is located several
MiB in from the start, to leave room for descriptors and
the Management Engine binary. Further, not all the remaining
space can be used, as the last 16 MiB contains firmware.
To make the SPI usable for mtdblock and other devices,
it is necessary to enable command line partitions so the
middle usable region can be specified.
Add a part_probes array which includes only "cmdelineparts",
and change to mtd_device_parse_register to use this part_probes.
Signed-off-by: "Ronald G. Minnich" <rminnich@google.com>
Signed-off-by: Ian Goegebuer <goegebuer@google.com>
---
drivers/mtd/spi-nor/controllers/intel-spi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/controllers/intel-spi.c b/drivers/mtd/spi-nor/controllers/intel-spi.c
index b54a56a68100..9de38851c411 100644
--- a/drivers/mtd/spi-nor/controllers/intel-spi.c
+++ b/drivers/mtd/spi-nor/controllers/intel-spi.c
@@ -903,6 +903,8 @@ static const struct spi_nor_controller_ops intel_spi_controller_ops = {
.erase = intel_spi_erase,
};
+static const char * const part_probes[] = { "cmdlinepart", NULL };
+
struct intel_spi *intel_spi_probe(struct device *dev,
struct resource *mem, const struct intel_spi_boardinfo *info)
{
@@ -950,7 +952,8 @@ struct intel_spi *intel_spi_probe(struct device *dev,
if (!ispi->writeable || !writeable)
ispi->nor.mtd.flags &= ~MTD_WRITEABLE;
- ret = mtd_device_register(&ispi->nor.mtd, &part, 1);
+ ret = mtd_device_parse_register(&ispi->nor.mtd, part_probes,
+ NULL, &part, 1);
if (ret)
return ERR_PTR(ret);
--
2.29.2.729.g45daf8777d-goog
next prev parent reply other threads:[~2020-12-23 21:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 15:26 [PATCH] mtd: spi-nor: controllers: intel-spi: Add support for command line partitions Ronald G. Minnich
2020-04-17 16:07 ` Mika Westerberg
2020-09-25 4:21 ` Vignesh Raghavendra
2020-12-23 21:56 ` Ian Goegebuer [this message]
2021-01-04 9:08 ` [PATCH] mtd: parser: cmdline: Support MTD names containing one or more colons Miquel Raynal
2021-01-04 16:24 ` Ron Minnich
2020-04-29 16:53 Ronald G. Minnich
2020-11-22 0:14 ` Sven Eckelmann
2020-11-27 16:32 ` ron minnich
2020-11-27 17:05 ` Sven Eckelmann
2020-11-27 17:16 ` ron minnich
2020-11-27 17:35 ` Sven Eckelmann
2020-11-27 18:54 ` ron minnich
2020-12-07 7:52 ` Sven Eckelmann
2020-12-07 15:24 ` ron minnich
2020-12-09 21:34 ` Ron Minnich
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=20201223215630.1917891-1-goegebuer@google.com \
--to=goegebuer@google.com \
--cc=alexander.sverdlin@nokia.com \
--cc=bbrezillon@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jethro@fortanix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mika.westerberg@linux.intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=rminnich@google.com \
--cc=tglx@linutronix.de \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®