[PATCH v3 0/2] mtd: spi-nor: OTP support

Michael Walle michael at walle.cc
Tue Feb 16 11:28:05 EST 2021

The first version of this patchset was posted over a year ago and since
then, there was not a single comment. I have to admit, this is rather
frustrating. I've now stripped down the patchset to only two patches and
moved the code into an own module otp.c. If you like, I can also add myself
to a reviewer for the OTP code.

This patchset implements the MTD OTP functions to allow access to the SPI
OTP data. Specific support is added for Winbond flash chips.

In the past there was already an attempt by Rahul Bedarkar to add this, but
there was no response. These patches are slightly based on his work.


Changes since v2:
 - improved commit messages
 - add buffer size check in spi_nor_mtd_otp_info(). just to be sure, the
   buffer is hardcoded to 4k by the mtd subsys
 - moved all code to otp.c
 - dropped the patches introduced in v2

Changes since v1:
 - added methods for Macronix and similar flashes
 - added patch to cleanup/consolidate code in core.c

Michael Walle (2):
  mtd: spi-nor: add OTP support
  mtd: spi-nor: implement OTP support for Winbond and similar flashes

 drivers/mtd/spi-nor/Makefile  |   1 +
 drivers/mtd/spi-nor/core.c    |  10 +-
 drivers/mtd/spi-nor/core.h    |  56 ++++++
 drivers/mtd/spi-nor/otp.c     | 313 ++++++++++++++++++++++++++++++++++
 drivers/mtd/spi-nor/winbond.c |  17 +-
 include/linux/mtd/spi-nor.h   |   9 +
 6 files changed, 403 insertions(+), 3 deletions(-)
 create mode 100644 drivers/mtd/spi-nor/otp.c


More information about the linux-mtd mailing list