[PATCH v4 0/2] mtd: spi: nor: force mtd name to "nor%d"

Patrick Delaunay patrick.delaunay at foss.st.com
Wed Sep 22 18:29:06 CEST 2021


This serie is a V4 for [1].

Now the SPI nor are named "norN" with N after the CFI nor device:
"nor0" to "norM" => N= M+1.

See also an other proposal from Marek (not working after test)
"mtd: spi-nor: Fix SF MTDIDS when registering multiple MTDs with
DM enabled"

http://patchwork.ozlabs.org/project/uboot/list/?series=262362

The first patch of the serie fixed the compilation issues around
'cfi_flash_num_flash_banks' found in CI:

https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/9138

[1] Series: mtd: spi: nor: force mtd name to "nor%d"
http://patchwork.ozlabs.org/project/uboot/list/?series=262632&state=*
http://patchwork.ozlabs.org/project/uboot/list/?series=262017&state=*
http://patchwork.ozlabs.org/project/uboot/list/?series=262013&state=*

Patrick


Changes in v4:
- introduce macro MTD_NAME_SIZE for mtd_name size and use MTD_DEV_TYPE
  to retrieved the "nor" string.

Changes in v3:
- NEW: solve compilation issue when CONFIG_SYS_MAX_FLASH_BANKS is used
- start index after the last CFI device, use CONFIG_SYS_MAX_FLASH_BANKS

Changes in v2:
- correct commit message

Patrick Delaunay (2):
  mtd: cfi_flash: use cfi_flash_num_flash_banks only when supported
  mtd: spi: nor: force mtd name to "nor%d"

 drivers/mtd/spi/spi-nor-core.c | 17 ++++++++++++++---
 include/dm/device.h            |  3 ++-
 include/linux/mtd/spi-nor.h    |  2 ++
 include/mtd.h                  |  4 ++++
 include/mtd/cfi_flash.h        |  8 +++++++-
 5 files changed, 29 insertions(+), 5 deletions(-)

-- 
2.25.1



More information about the U-Boot mailing list