All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] mtd: spi-nor: split SFDP, ID database, and fixups
@ 2026-10-16  1:43 ` Takahiro Kuwano via B4 Relay
  0 siblings, 0 replies; 15+ messages in thread
From: Takahiro Kuwano @ 2026-10-16  1:43 UTC (permalink / raw)
  To: u-boot
  Cc: Tom Rini, Vignesh R, Raymond Mao, Vincent Jardin, Fabio Estevam,
	Eugen Hristev, Takahiro Kuwano

The spi-nor-core.c contains optional logics like SFDP and manufcaturer
specific fixups. The spi-nor-ids.c has single large ID database. There
are many #ifdef directives in those files and that negatively affects
readability and maintainability.

This series, as the first step of cleanup, move SFDP logic, IDs, and
fixups to newly source files. Reworking, renaming, and reformating
existing code is not a scope of this series and further cleanup will be
taken place in follow-up patches.

Here is the code size impact when applying this series.
Measured by my AMD Zynq-7000 (ARM32) environment with SFDP and all
manufcaturers are enabled.

SPI-NOR:
            text    data     bss     dec     hex filename
BEFORE    720685   14084       0  734769   b3631 u-boot
AFTER     721827   14156       0  735983   b3aef u-boot
DELTA      +1142     +72

TINY:
            text    data     bss     dec     hex filename
BEFORE     77399    3128     248   80775   13b87 spl/u-boot-spl
AFTER      77589    3200     248   81037   13c8d spl/u-boot-spl
DELTA       +190     +72

Changes in v3:
- Expose manufacturers table so that sandbox can look up
- Update sandbox to handle manufacturers table
- Link to v2: https://lore.kernel.org/u-boot/20260924-split-sfdp-id-v2-0-aafc70e0b657@infineon.com/
Changes in v2:
- Rebase on top of next
- Link to v1: https://lore.kernel.org/u-boot/20260612-split-id-table-into-vendor-files-v1-0-dfaaa82cc6f0@infineon.com/

Signed-off-by: Takahiro Kuwano <takahiro.kuwano@infineon.com>
---
Takahiro Kuwano (4):
      mtd: spi-nor: move SFDP logic out of the core
      mtd: spi-nor: import manufacturer driver concept from Linux
      mtd: spi-nor: move flash info entries to manufacturer drivers
      mtd: spi-nor: move fixups to manufacturer drivers

 drivers/mtd/spi/Makefile        |   18 +
 drivers/mtd/spi/atmel.c         |   28 +
 drivers/mtd/spi/dosilicon.c     |   25 +
 drivers/mtd/spi/eon.c           |   23 +
 drivers/mtd/spi/fujitsu.c       |   27 +
 drivers/mtd/spi/gigadevice.c    |  140 ++
 drivers/mtd/spi/issi.c          |   84 ++
 drivers/mtd/spi/macronix.c      |  154 +++
 drivers/mtd/spi/micron-st.c     |  169 +++
 drivers/mtd/spi/puya.c          |   56 +
 drivers/mtd/spi/sandbox.c       |   33 +-
 drivers/mtd/spi/sf_internal.h   |  136 +-
 drivers/mtd/spi/sfdp.c          |  720 ++++++++++
 drivers/mtd/spi/sfdp.h          |  152 +++
 drivers/mtd/spi/siliconkaiser.c |   18 +
 drivers/mtd/spi/spansion.c      |  700 ++++++++++
 drivers/mtd/spi/spi-nor-core.c  | 2751 +++++++--------------------------------
 drivers/mtd/spi/spi-nor-ids.c   |  753 +----------
 drivers/mtd/spi/spi-nor-tiny.c  |   11 +-
 drivers/mtd/spi/sst.c           |   34 +
 drivers/mtd/spi/winbond.c       |  250 ++++
 drivers/mtd/spi/xmc.c           |   27 +
 drivers/mtd/spi/xtx.c           |   54 +
 drivers/mtd/spi/zbit.c          |   19 +
 include/linux/mtd/spi-nor.h     |    2 +
 25 files changed, 3404 insertions(+), 2980 deletions(-)
---
base-commit: ed869863c7e2aca50d57a05d843830dd843138c4
change-id: 20261016-split-sfdp-id-v3-f5602435a540

Best regards,
-- 
Takahiro Kuwano <takahiro.kuwano@infineon.com>


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

end of thread, other threads:[~2026-10-22  8:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16  1:43 [PATCH v3 0/4] mtd: spi-nor: split SFDP, ID database, and fixups Takahiro Kuwano
2026-10-16  1:43 ` Takahiro Kuwano via B4 Relay
2026-10-16  1:43 ` [PATCH v3 1/4] mtd: spi-nor: move SFDP logic out of the core Takahiro Kuwano
2026-10-16  1:43   ` Takahiro Kuwano via B4 Relay
2026-10-16  1:43 ` [PATCH v3 2/4] mtd: spi-nor: import manufacturer driver concept from Linux Takahiro Kuwano
2026-10-16  1:43   ` Takahiro Kuwano via B4 Relay
2026-10-16  1:43 ` [PATCH v3 3/4] mtd: spi-nor: move flash info entries to manufacturer drivers Takahiro Kuwano
2026-10-16  1:43   ` Takahiro Kuwano via B4 Relay
2026-10-16  1:43 ` [PATCH v3 4/4] mtd: spi-nor: move fixups " Takahiro Kuwano
2026-10-16  1:43   ` Takahiro Kuwano via B4 Relay
2026-10-16 18:26 ` [PATCH v3 0/4] mtd: spi-nor: split SFDP, ID database, and fixups Tom Rini
2026-10-21  1:42   ` Takahiro.Kuwano
2026-10-21 14:37     ` Tom Rini
2026-10-22  2:58       ` Takahiro.Kuwano
2026-10-22  8:44 ` Bastien Curutchet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.