[PATCH 0/2] Discover current address mode by CRC

tkuw584924 at gmail.com tkuw584924 at gmail.com
Fri Aug 12 01:06:31 PDT 2022


From: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>

Hello,

I introduced this series based on the discussion [0].

Patch#1 is needed to use READ_4B(13h) for offline CRC calculation. This
can replace spi_nor_read_raw() in SFDP, if it is OK.

Path#2 implements address mode discovery by:
  - determine factory default from BFPT DWORD16
  - read 4 bytes from address 0 by 13h opcode
  - calculate CRC from 4 byte data by offline
  - perform data integrity CRC op
  - read data integrity CRC register by Read Any Reg with 3- and/or 4-byte
    address bytes to determine the current address mode

[0] https://patchwork.ozlabs.org/project/linux-mtd/patch/e47ed0aa3e1a6fdca7689434ce7dea99ff4826e7.1659764848.git.Takahiro.Kuwano@infineon.com/

Takahiro Kuwano (2):
  mtd: spi-nor: core: Add a helper to read with alternative method
  mtd: spi-nor: spansion: Discover current address mode by CRC

 drivers/mtd/spi-nor/core.c     |  48 ++++++++++++
 drivers/mtd/spi-nor/core.h     |   2 +
 drivers/mtd/spi-nor/sfdp.h     |   1 +
 drivers/mtd/spi-nor/spansion.c | 130 +++++++++++++++++++++++++++++++++
 4 files changed, 181 insertions(+)

-- 
2.25.1




More information about the linux-mtd mailing list