mtd: spi-nor: parsers questions

Miquel Raynal miquel.raynal at bootlin.com
Thu Jun 15 00:38:53 PDT 2023


Hi Mauro,

mauro.lima at eclypsium.com wrote on Wed, 14 Jun 2023 18:19:45 -0300:

> Hey all!
> Looking for some help with mtd.
> I'm working on some changes for Intel's spi controller. We have a
> "BIOS" partition, composed of many parts with different offsets and
> could be spread within two chips in some cases (not necessarily of the
> same size).
> Right now the driver uses one partition that, in my system, is bigger
> than the first chip's size, so I'm getting the "size truncated to
> 0x..." log.
> All drivers using mtd_partitions know the partition information at
> compile time. This is not my case, we need to read the first portion
> of the chip to get the partition parts' offsets. So I found parsers,
> and the drivers using parsers make partitions within the chip's size.
> So my question is whether parsers could solve my truncation issue and
> whether parsers support this kind of multiple chip case.
> Thanks!

There is mtdconcat in the kernel but I don't think it will fit your
purpose. FYI I tried a few years ago to bring support for something
like this, unsuccessfully.

Link: https://lore.kernel.org/linux-devicetree/20191127105522.31445-1-miquel.raynal@bootlin.com/

You would need something like that and on top of it a dynamic partition
parser.

Cheers,
Miquèl



More information about the linux-mtd mailing list