From: Michael Walle <michael@walle.cc>
To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Tudor Ambarus <tudor.ambarus@microchip.com>,
Pratyush Yadav <p.yadav@ti.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
yaliang.wang@windriver.com, Michael Walle <michael@walle.cc>
Subject: [PATCH v3 00/32] mtd: spi-nor: move vendor specific code into vendor modules
Date: Mon, 21 Feb 2022 09:52:04 +0100 [thread overview]
Message-ID: <20220221085236.1452024-1-michael@walle.cc> (raw)
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 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 | 164 ++++++++++++++-----
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, 576 insertions(+), 522 deletions(-)
--
2.30.2
next reply other threads:[~2022-02-21 8:53 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 8:52 Michael Walle [this message]
2022-02-21 8:52 ` [PATCH v3 01/32] mtd: spi-nor: atmel: unify function names Michael Walle
2022-02-21 8:52 ` [PATCH v3 02/32] mtd: spi-nor: catalyst: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 03/32] mtd: spi-nor: eon: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 04/32] mtd: spi-nor: esmt: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 05/32] mtd: spi-nor: everspin: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 06/32] mtd: spi-nor: fujitsu: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 07/32] mtd: spi-nor: gigadevice: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 08/32] mtd: spi-nor: intel: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 09/32] mtd: spi-nor: issi: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 10/32] mtd: spi-nor: macronix: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 11/32] mtd: spi-nor: micron-st: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 12/32] mtd: spi-nor: spansion: " Michael Walle
2022-02-21 12:15 ` kernel test robot
2022-02-21 8:52 ` [PATCH v3 13/32] mtd: spi-nor: sst: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 14/32] mtd: spi-nor: winbond: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 15/32] mtd: spi-nor: xilinx: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 16/32] mtd: spi-nor: xmc: " Michael Walle
2022-02-21 8:52 ` [PATCH v3 17/32] mtd: spi-nor: slightly refactor the spi_nor_setup() Michael Walle
2022-02-21 8:52 ` [PATCH v3 18/32] mtd: spi-nor: allow a flash to define its own ready() function Michael Walle
2022-02-21 8:52 ` [PATCH v3 19/32] mtd: spi-nor: export more function to be used in vendor modules Michael Walle
2022-02-21 8:52 ` [PATCH v3 20/32] mtd: spi-nor: guard _page_size parameter in S3AN_INFO() Michael Walle
2022-02-21 8:52 ` [PATCH v3 21/32] mtd: spi-nor: move all xilinx specifics into xilinx.c Michael Walle
2022-02-21 8:52 ` [PATCH v3 22/32] mtd: spi-nor: xilinx: rename vendor specific functions and defines Michael Walle
2022-02-21 8:52 ` [PATCH v3 23/32] mtd: spi-nor: xilinx: correct the debug message Michael Walle
2022-02-21 8:52 ` [PATCH v3 24/32] mtd: spi-nor: move all micron-st specifics into micron-st.c Michael Walle
2022-02-21 8:52 ` [PATCH v3 25/32] mtd: spi-nor: micron-st: convert USE_FSR to a manufacturer flag Michael Walle
2022-02-21 8:52 ` [PATCH v3 26/32] mtd: spi-nor: micron-st: rename vendor specific functions and defines Michael Walle
2022-02-21 8:52 ` [PATCH v3 27/32] mtd: spi-nor: spansion: slightly rework control flow in late_init() Michael Walle
2022-02-21 8:52 ` [PATCH v3 28/32] mtd: spi-nor: move all spansion specifics into spansion.c Michael Walle
2022-02-21 8:52 ` [PATCH v3 29/32] mtd: spi-nor: spansion: convert USE_CLSR to a manufacturer flag Michael Walle
2022-02-21 8:52 ` [PATCH v3 30/32] mtd: spi-nor: spansion: rename vendor specific functions and defines Michael Walle
2022-02-21 8:52 ` [PATCH v3 31/32] mtd: spi-nor: slightly change code style in spi_nor_sr_ready() Michael Walle
2022-02-21 8:52 ` [PATCH v3 32/32] mtd: spi-nor: renumber flags Michael Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220221085236.1452024-1-michael@walle.cc \
--to=michael@walle.cc \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=p.yadav@ti.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
--cc=yaliang.wang@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®