SPI flash dependency rework
Subsystems (2)
cover SPI flash dependency rework
Currently TARGET_* and ARCH_* selects multiple spi related CONFIG options. If dependency order of spi related CONFIG options is reverse, they are selected as dependencies when needed.
Oskari Lemmela (1):
spi: Kconfig: change dependency order
drivers/mtd/spi/Kconfig | 28 ++++++++++++------ drivers/spi/Kconfig | 63 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 16 deletions(-)
Signature · 1 line
2.17.1
RFC PATCH 1/1 spi: Kconfig: change dependency order
SPI Kconfig logic is changed to reverse dependencies. Dependencies are not needed to be defined in the defconfig.
--- drivers/mtd/spi/Kconfig | 28 ++++++++++++------ drivers/spi/Kconfig | 63 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 16 deletions(-)
drivers/mtd/spi/Kconfig +19 -9
@@ -17,7 +17,8 @@ config DM_SPI_FLASH config SPI_FLASH_SANDBOX bool "Support sandbox SPI flash device" - depends on SANDBOX && DM_SPI_FLASH + depends on SANDBOX + select DM_SPI_FLASH help Since sandbox cannot access real devices, an emulation mechanism is provided instead. Drivers can be connected up to the sandbox SPI
@@ -27,6 +28,8 @@ config SPI_FLASH_SANDBOX config SPI_FLASH bool "Legacy SPI Flash Interface support" + imply CMD_SF + select SPI help Enable the legacy SPI flash support. This will include basic standard support for things like probing, read / write, and
@@ -36,7 +39,7 @@ config SPI_FLASH config SPI_FLASH_BAR bool "SPI flash Bank/Extended address register support" - depends on SPI_FLASH + select SPI_FLASH help Enable the SPI flash Bank/Extended address register support. Bank/Extended address registers are used to access the flash
@@ -44,66 +47,72 @@ config SPI_FLASH_BAR config SF_DUAL_FLASH bool "SPI DUAL flash memory support" - depends on SPI_FLASH + select SPI_FLASH help Enable this option to support two flash memories connected to a single controller. Currently Xilinx Zynq qspi supports this. -if SPI_FLASH - config SPI_FLASH_ATMEL bool "Atmel SPI flash support" + select SPI_FLASH help Add support for various Atmel SPI flash chips (AT45xxx and AT25xxx) config SPI_FLASH_EON bool "EON SPI flash support" + select SPI_FLASH help Add support for various EON SPI flash chips (EN25xxx) config SPI_FLASH_GIGADEVICE bool "GigaDevice SPI flash support" + select SPI_FLASH help Add support for various GigaDevice SPI flash chips (GD25xxx) config SPI_FLASH_ISSI bool "ISSI SPI flash support" + select SPI_FLASH help Add support for various ISSI SPI flash chips (ISxxx) config SPI_FLASH_MACRONIX bool "Macronix SPI flash support" + select SPI_FLASH help Add support for various Macronix SPI flash chips (MX25Lxxx) config SPI_FLASH_SPANSION bool "Spansion SPI flash support" + select SPI_FLASH help Add support for various Spansion SPI flash chips (S25FLxxx) config SPI_FLASH_STMICRO bool "STMicro SPI flash support" + select SPI_FLASH help Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx) config SPI_FLASH_SST bool "SST SPI flash support" + select SPI_FLASH help Add support for various SST SPI flash chips (SST25xxx) config SPI_FLASH_WINBOND bool "Winbond SPI flash support" + select SPI_FLASH help Add support for various Winbond SPI flash chips (W25xxx) config SPI_FLASH_XMC bool "XMC SPI flash support" + select SPI_FLASH help Add support for various XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) SPI flash chips (XM25xxx) -endif - config SPI_FLASH_USE_4K_SECTORS bool "Use small 4096 B erase sectors" depends on SPI_FLASH
@@ -121,7 +130,8 @@ config SPI_FLASH_USE_4K_SECTORS config SPI_FLASH_DATAFLASH bool "AT45xxx DataFlash support" - depends on SPI_FLASH && DM_SPI_FLASH + select SPI_FLASH + select DM_SPI_FLASH help Enable the access for SPI-flash-based AT45xxx DataFlash chips. DataFlash is a kind of SPI flash. Most AT45 chips have two buffers
@@ -136,7 +146,7 @@ config SPI_FLASH_DATAFLASH config SPI_FLASH_MTD bool "SPI Flash MTD support" - depends on SPI_FLASH + select SPI_FLASH help Enable the MTD support for spi flash layer, this adapter is for translating mtd_read/mtd_write commands into spi_flash_read/write
drivers/spi/Kconfig +56 -7
359 lines not on this page · raw message
Signature · 1 line
2.17.1
RFC PATCH 1/1 spi: Kconfig: change dependency order
Quoted 8 lines · Oskari Lemmela
SPI
Kconfiglogic is changed to reverse dependencies. Dependencies are not needed to be defined in the defconfig.Signed-off-by Oskari Lemmela <[email protected]>--- drivers/mtd/spi/Kconfig | 28 ++++++++++++------ drivers/spi/Kconfig | 63 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 16 deletions(-)
I think, conceptually, this takes things in the wrong direction. The general order is "Enable DM for $subsystem, convert a driver", "Enable DM on all drivers in $subsystem". I think SPI is at, or nearly now at, the point where DM_SPI/DM_SPI_xxx go away / become SPI / are selected by SPI/etc.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190222/9fc30140/attachment.sig>