[PATCH v5 00/10] mtd: spi-nor: Address mode discovery (BFPT method & current address mode)

Tudor Ambarus posted 10 patches 2 years, 10 months ago
Documentation/driver-api/mtd/spi-nor.rst |   3 -
drivers/mtd/spi-nor/core.c               |  85 +++++++++++++--
drivers/mtd/spi-nor/core.h               |   4 +
drivers/mtd/spi-nor/macronix.c           |   8 +-
drivers/mtd/spi-nor/micron-st.c          |  32 ++----
drivers/mtd/spi-nor/sfdp.c               |  11 ++
drivers/mtd/spi-nor/sfdp.h               |  27 +++++
drivers/mtd/spi-nor/spansion.c           | 131 ++++++++++++++++++++++-
drivers/mtd/spi-nor/winbond.c            |  24 +++--
include/linux/mtd/spi-nor.h              |   6 --
10 files changed, 272 insertions(+), 59 deletions(-)
[PATCH v5 00/10] mtd: spi-nor: Address mode discovery (BFPT method & current address mode)
Posted by Tudor Ambarus 2 years, 10 months ago
This is a new version of the following patch sets:
https://lore.kernel.org/linux-mtd/20220411125346.118274-1-tudor.ambarus@microchip.com/
https://lore.kernel.org/linux-mtd/20230315034004.5535-1-Takahiro.Kuwano@infineon.com/

Changes in v5:
- squash 6/11 and 7/11 to have a single point of failure in case
  regressions are determnined by bisecting. Update commit message.
- get rif of the now empty winbond_nor_default_init()
- s/sfdp_bits_set/SFDP_MASK_CHECK
- set micron-st's static spi_nor_set_4byte_addr_mode_wren_en4b_ex4 only
  when the 4byte addr mode method is not determined at BFPT parsing time
- reverse xmas tree for local variables in
  cypress_nor_set_addr_mode_nbytes.

Changes in v4:
- consider the BFPT retrieved address mode as an enumeration,
  manufacturers could support different methods at the same time
- split renaming of set_4byte_addr_mode methods in several patches for
  better clarity
- have initializations in a single line, even if bypasses the 80 chars
  limit, as they are < 100 chars anyway
- new patches that introduce spi_nor_set_4byte_addr_mode() and handle
  spi_nor_restore()
- clean Takahiro's patch

Takahiro Kuwano (1):
  mtd: spi-nor: spansion: Determine current address mode

Tudor Ambarus (9):
  mtd: spi-nor: core: Move generic method to core -
    micron_st_nor_set_4byte_addr_mode
  mtd: spi-nor: core: Update name and description of
    micron_st_nor_set_4byte_addr_mode
  mtd: spi-nor: core: Update name and description of
    spansion_set_4byte_addr_mode
  mtd: spi-nor: core: Update name and description of
    spi_nor_set_4byte_addr_mode
  mtd: spi-nor: core: Make spi_nor_set_4byte_addr_mode_brwr public
  mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data
  mtd: spi-nor: Stop exporting spi_nor_restore()
  mtd: spi-nor: core: Update flash's current address mode when changing
    address mode
  mtd: spi-nor: core: Introduce spi_nor_set_4byte_addr_mode()

 Documentation/driver-api/mtd/spi-nor.rst |   3 -
 drivers/mtd/spi-nor/core.c               |  85 +++++++++++++--
 drivers/mtd/spi-nor/core.h               |   4 +
 drivers/mtd/spi-nor/macronix.c           |   8 +-
 drivers/mtd/spi-nor/micron-st.c          |  32 ++----
 drivers/mtd/spi-nor/sfdp.c               |  11 ++
 drivers/mtd/spi-nor/sfdp.h               |  27 +++++
 drivers/mtd/spi-nor/spansion.c           | 131 ++++++++++++++++++++++-
 drivers/mtd/spi-nor/winbond.c            |  24 +++--
 include/linux/mtd/spi-nor.h              |   6 --
 10 files changed, 272 insertions(+), 59 deletions(-)

-- 
2.40.0.348.gf938b09366-goog
Re: [PATCH v5 00/10] mtd: spi-nor: Address mode discovery (BFPT method & current address mode)
Posted by Tudor Ambarus 2 years, 10 months ago
On Fri, 31 Mar 2023 07:45:56 +0000, Tudor Ambarus wrote:
> This is a new version of the following patch sets:
> https://lore.kernel.org/linux-mtd/20220411125346.118274-1-tudor.ambarus@microchip.com/
> https://lore.kernel.org/linux-mtd/20230315034004.5535-1-Takahiro.Kuwano@infineon.com/
> 
> Changes in v5:
> - squash 6/11 and 7/11 to have a single point of failure in case
>   regressions are determnined by bisecting. Update commit message.
> - get rif of the now empty winbond_nor_default_init()
> - s/sfdp_bits_set/SFDP_MASK_CHECK
> - set micron-st's static spi_nor_set_4byte_addr_mode_wren_en4b_ex4 only
>   when the 4byte addr mode method is not determined at BFPT parsing time
> - reverse xmas tree for local variables in
>   cypress_nor_set_addr_mode_nbytes.
> 
> [...]

Applied to git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git,
spi-nor/next branch. Thanks!

[01/10] mtd: spi-nor: core: Move generic method to core - micron_st_nor_set_4byte_addr_mode
        https://git.kernel.org/mtd/c/076aa4eac8b3
[02/10] mtd: spi-nor: core: Update name and description of micron_st_nor_set_4byte_addr_mode
        https://git.kernel.org/mtd/c/288df4378319
[03/10] mtd: spi-nor: core: Update name and description of spansion_set_4byte_addr_mode
        https://git.kernel.org/mtd/c/f1f1976224f3
[04/10] mtd: spi-nor: core: Update name and description of spi_nor_set_4byte_addr_mode
        https://git.kernel.org/mtd/c/d75c22f376f6
[05/10] mtd: spi-nor: core: Make spi_nor_set_4byte_addr_mode_brwr public
        https://git.kernel.org/mtd/c/3a4d5f4af9e6
[06/10] mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data
        https://git.kernel.org/mtd/c/4e53ab0c292d
[07/10] mtd: spi-nor: Stop exporting spi_nor_restore()
        https://git.kernel.org/mtd/c/7fe1b00d92ea
[08/10] mtd: spi-nor: core: Update flash's current address mode when changing address mode
        https://git.kernel.org/mtd/c/37513c56139b
[09/10] mtd: spi-nor: core: Introduce spi_nor_set_4byte_addr_mode()
        https://git.kernel.org/mtd/c/b6094ac83dd4
[10/10] mtd: spi-nor: spansion: Determine current address mode
        https://git.kernel.org/mtd/c/c87c9b11c53c

Cheers,
-- 
Tudor Ambarus <tudor.ambarus@linaro.org>