public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mtd: spi-nor: parsers questions
@ 2023-06-14 21:19 Mauro Lima
  2023-06-15  7:38 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Lima @ 2023-06-14 21:19 UTC (permalink / raw)
  To: linux-mtd; +Cc: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra

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!

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mtd: spi-nor: parsers questions
  2023-06-14 21:19 mtd: spi-nor: parsers questions Mauro Lima
@ 2023-06-15  7:38 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2023-06-15  7:38 UTC (permalink / raw)
  To: Mauro Lima; +Cc: linux-mtd, Richard Weinberger, Vignesh Raghavendra

Hi Mauro,

mauro.lima@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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-15  7:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 21:19 mtd: spi-nor: parsers questions Mauro Lima
2023-06-15  7:38 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox