[PATCH 0/7] mtd: spi-nor: Handle flash ID collisions

Tudor Ambarus tudor.ambarus at microchip.com
Fri Jul 2 07:41:03 PDT 2021


I've started working on the flash ID collisions problems, and also on the
read SFDP first idea, to stop the spagetti init of params. I see the
ID collision thing is a hot topic, so I post the first part of the work,
to gather comments. Entire series is just compile tested.

Introduce the manuf-id-collisions driver in order to address ID collisions
between manufacturers. manuf-id-collisions will be the place to add new
flash additions, where the manufacturer is ignorant enough, to not
implement the ID continuation scheme. flash_info entries will be added in
a first come, first served manner. Differentiation between flashes will be
done at runtime if possible. Where runtime differentiation is not possible,
new compatibles will be introduced, but this will be done as a last resort.
Every new flash addition that define the SFDP tables, should dump its SFDP
tables in the patch's comment section below the --- line, so that we can
reference it in case of collisions.

I can't dump the SFDP tables for the new flash additions, I'll need
support in case someone wants to add them.

Tudor Ambarus (7):
  mtd: spi-nor: core: Introduce SPI_NOR_PARSE_SFDP
  mtd: spi-nor: core: Report correct name in case of ID collisions
  mtd: spi-nor: macronix: Handle ID collision b/w MX25L3233F and
    MX25L3205D
  mtd: spi-nor: macronix: Handle ID collision b/w MX25L12805D and
    MX25L12835F
  mtd: spi-nor: Introduce Manufacturer ID collisions driver
  mtd: spi-nor: manuf-id-collisions: Add support for xt25f128b
  mtd: spi-nor: manuf-id-collisions: Add support for xm25qh64c

 drivers/mtd/spi-nor/Makefile              |  1 +
 drivers/mtd/spi-nor/core.c                |  9 ++++-
 drivers/mtd/spi-nor/core.h                |  5 +++
 drivers/mtd/spi-nor/macronix.c            | 49 +++++++++++++++++++++--
 drivers/mtd/spi-nor/manuf-id-collisions.c | 24 +++++++++++
 include/linux/mtd/spi-nor.h               |  2 +
 6 files changed, 85 insertions(+), 5 deletions(-)
 create mode 100644 drivers/mtd/spi-nor/manuf-id-collisions.c

-- 
2.25.1




More information about the linux-mtd mailing list