linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/32] mtd: spi-nor: move vendor specific code into vendor modules
@ 2022-02-21 12:07 Michael Walle
  2022-02-21 12:07 ` [PATCH v4 01/32] mtd: spi-nor: atmel: unify function names Michael Walle
                   ` (32 more replies)
  0 siblings, 33 replies; 59+ messages in thread
From: Michael Walle @ 2022-02-21 12:07 UTC (permalink / raw)
  To: linux-mtd, linux-kernel
  Cc: Tudor Ambarus, Pratyush Yadav, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, yaliang.wang, Michael Walle

It turns out that most of the special status register handling is
specific for a particular vendor. I.e. Xilinx has some different
opcodes for the status register read, Micron has an additional FSR
register and Spansion has these flags integrated into the SR.

Create a callback to ready() where a flash chip can register its
own function. This will let us move all the vendor specific stuff
out of the core into the vendor modules.

As a preparation step, unify all function and object names in the
vendor modules. For the sake of consistency and better readability
of the code flow, I also converted the setup() callback to be
optional.

Please note that this is only compile-time tested.

Changes since v3:
 - fix spansion.c compilation, messed up the patch export. Sorry
   for the noise

Changes since v2:
 - use family_nor_ instead of just family_ prefix
 - fix function doc

Changes since v1:
 - rename/unify function names inside the vendor modules.
 - make local functions static
 - fix function doc typo
 - use late_init hook to set fsr_ready op
 - Use uppercase and period in comments
 - Add comments for the vendor flags
 - move coding style change in spi_nor_sr_ready() into own patch
 - new patch to add missing parenthesis in S3AN_INFO()
 - add missing function prefix rename patch for the spansion module

Michael Walle (32):
  mtd: spi-nor: atmel: unify function names
  mtd: spi-nor: catalyst: unify function names
  mtd: spi-nor: eon: unify function names
  mtd: spi-nor: esmt: unify function names
  mtd: spi-nor: everspin: unify function names
  mtd: spi-nor: fujitsu: unify function names
  mtd: spi-nor: gigadevice: unify function names
  mtd: spi-nor: intel: unify function names
  mtd: spi-nor: issi: unify function names
  mtd: spi-nor: macronix: unify function names
  mtd: spi-nor: micron-st: unify function names
  mtd: spi-nor: spansion: unify function names
  mtd: spi-nor: sst: unify function names
  mtd: spi-nor: winbond: unify function names
  mtd: spi-nor: xilinx: unify function names
  mtd: spi-nor: xmc: unify function names
  mtd: spi-nor: slightly refactor the spi_nor_setup()
  mtd: spi-nor: allow a flash to define its own ready() function
  mtd: spi-nor: export more function to be used in vendor modules
  mtd: spi-nor: guard _page_size parameter in S3AN_INFO()
  mtd: spi-nor: move all xilinx specifics into xilinx.c
  mtd: spi-nor: xilinx: rename vendor specific functions and defines
  mtd: spi-nor: xilinx: correct the debug message
  mtd: spi-nor: move all micron-st specifics into micron-st.c
  mtd: spi-nor: micron-st: convert USE_FSR to a manufacturer flag
  mtd: spi-nor: micron-st: rename vendor specific functions and defines
  mtd: spi-nor: spansion: slightly rework control flow in late_init()
  mtd: spi-nor: move all spansion specifics into spansion.c
  mtd: spi-nor: spansion: convert USE_CLSR to a manufacturer flag
  mtd: spi-nor: spansion: rename vendor specific functions and defines
  mtd: spi-nor: slightly change code style in spi_nor_sr_ready()
  mtd: spi-nor: renumber flags

 drivers/mtd/spi-nor/atmel.c      |  81 +++++-----
 drivers/mtd/spi-nor/catalyst.c   |   6 +-
 drivers/mtd/spi-nor/core.c       | 265 ++-----------------------------
 drivers/mtd/spi-nor/core.h       |  70 ++++----
 drivers/mtd/spi-nor/eon.c        |   6 +-
 drivers/mtd/spi-nor/esmt.c       |   6 +-
 drivers/mtd/spi-nor/everspin.c   |   6 +-
 drivers/mtd/spi-nor/fujitsu.c    |   6 +-
 drivers/mtd/spi-nor/gigadevice.c |   6 +-
 drivers/mtd/spi-nor/intel.c      |   6 +-
 drivers/mtd/spi-nor/issi.c       |  10 +-
 drivers/mtd/spi-nor/macronix.c   |  14 +-
 drivers/mtd/spi-nor/micron-st.c  | 258 ++++++++++++++++++++++++------
 drivers/mtd/spi-nor/spansion.c   | 168 +++++++++++++++-----
 drivers/mtd/spi-nor/sst.c        |  44 ++---
 drivers/mtd/spi-nor/winbond.c    |  29 ++--
 drivers/mtd/spi-nor/xilinx.c     |  97 +++++++++--
 drivers/mtd/spi-nor/xmc.c        |   6 +-
 include/linux/mtd/spi-nor.h      |  18 ---
 19 files changed, 578 insertions(+), 524 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-02-23 12:01 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 12:07 [PATCH v4 00/32] mtd: spi-nor: move vendor specific code into vendor modules Michael Walle
2022-02-21 12:07 ` [PATCH v4 01/32] mtd: spi-nor: atmel: unify function names Michael Walle
2022-02-22  7:23   ` Pratyush Yadav
2022-02-22  7:26     ` Michael Walle
2022-02-23 11:33       ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 02/32] mtd: spi-nor: catalyst: " Michael Walle
2022-02-23 11:33   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 03/32] mtd: spi-nor: eon: " Michael Walle
2022-02-23 11:33   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 04/32] mtd: spi-nor: esmt: " Michael Walle
2022-02-23 11:34   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 05/32] mtd: spi-nor: everspin: " Michael Walle
2022-02-23 11:34   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 06/32] mtd: spi-nor: fujitsu: " Michael Walle
2022-02-23 11:35   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 07/32] mtd: spi-nor: gigadevice: " Michael Walle
2022-02-23 11:35   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 08/32] mtd: spi-nor: intel: " Michael Walle
2022-02-23 11:35   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 09/32] mtd: spi-nor: issi: " Michael Walle
2022-02-23 11:36   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 10/32] mtd: spi-nor: macronix: " Michael Walle
2022-02-23 11:36   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 11/32] mtd: spi-nor: micron-st: " Michael Walle
2022-02-23 11:37   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 12/32] mtd: spi-nor: spansion: " Michael Walle
2022-02-23 11:37   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 13/32] mtd: spi-nor: sst: " Michael Walle
2022-02-23 11:38   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 14/32] mtd: spi-nor: winbond: " Michael Walle
2022-02-23 11:38   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 15/32] mtd: spi-nor: xilinx: " Michael Walle
2022-02-23 11:39   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 16/32] mtd: spi-nor: xmc: " Michael Walle
2022-02-23 11:40   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 17/32] mtd: spi-nor: slightly refactor the spi_nor_setup() Michael Walle
2022-02-21 12:07 ` [PATCH v4 18/32] mtd: spi-nor: allow a flash to define its own ready() function Michael Walle
2022-02-21 12:07 ` [PATCH v4 19/32] mtd: spi-nor: export more function to be used in vendor modules Michael Walle
2022-02-21 12:07 ` [PATCH v4 20/32] mtd: spi-nor: guard _page_size parameter in S3AN_INFO() Michael Walle
2022-02-22  7:26   ` Pratyush Yadav
2022-02-21 12:07 ` [PATCH v4 21/32] mtd: spi-nor: move all xilinx specifics into xilinx.c Michael Walle
2022-02-21 12:07 ` [PATCH v4 22/32] mtd: spi-nor: xilinx: rename vendor specific functions and defines Michael Walle
2022-02-23 11:51   ` Pratyush Yadav
2022-02-21 12:08 ` [PATCH v4 23/32] mtd: spi-nor: xilinx: correct the debug message Michael Walle
2022-02-21 12:08 ` [PATCH v4 24/32] mtd: spi-nor: move all micron-st specifics into micron-st.c Michael Walle
2022-02-21 12:08 ` [PATCH v4 25/32] mtd: spi-nor: micron-st: convert USE_FSR to a manufacturer flag Michael Walle
2022-02-21 12:08 ` [PATCH v4 26/32] mtd: spi-nor: micron-st: rename vendor specific functions and defines Michael Walle
2022-02-23 11:54   ` Pratyush Yadav
2022-02-21 12:08 ` [PATCH v4 27/32] mtd: spi-nor: spansion: slightly rework control flow in late_init() Michael Walle
2022-02-21 12:08 ` [PATCH v4 28/32] mtd: spi-nor: move all spansion specifics into spansion.c Michael Walle
2022-02-23 11:59   ` Pratyush Yadav
2022-02-21 12:08 ` [PATCH v4 29/32] mtd: spi-nor: spansion: convert USE_CLSR to a manufacturer flag Michael Walle
2022-02-21 12:08 ` [PATCH v4 30/32] mtd: spi-nor: spansion: rename vendor specific functions and defines Michael Walle
2022-02-23 12:01   ` Pratyush Yadav
2022-02-21 12:08 ` [PATCH v4 31/32] mtd: spi-nor: slightly change code style in spi_nor_sr_ready() Michael Walle
2022-02-23 12:00   ` Pratyush Yadav
2022-02-21 12:08 ` [PATCH v4 32/32] mtd: spi-nor: renumber flags Michael Walle
2022-02-22  8:59 ` [PATCH v4 00/32] mtd: spi-nor: move vendor specific code into vendor modules Tudor.Ambarus
2022-02-23 11:30   ` Pratyush Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).