spi: Kconfig: Mark CONFIG_SPI as Legacy spi support
Subsystems (2)
PATCH 1/3 spi: Kconfig: Mark CONFIG_SPI as Legacy spi support
CONFIG_SPI is mandatory for SPI support even if the given board has dm or non-dm versions, so mark CONFIG_SPI as non-dm config option and move the respective non-dm drivers below to that.
This eventually reduce the explicit CONFIG_SPI enablement for dm version spi drivers.
--- drivers/spi/Kconfig | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/spi/Kconfig +12 -5
@@ -1,7 +1,4 @@ -menuconfig SPI - bool "SPI Support" - -if SPI +menu "SPI Support" config DM_SPI bool "Enable Driver Model for SPI drivers"
@@ -294,6 +291,14 @@ config ZYNQMP_GQSPI endif # if DM_SPI +config SPI + bool "Legacy SPI support" + help + Enable the legacy SPI support. This will include legacy SPI + interface code for non-dm SPI drivers. + +if SPI + config SOFT_SPI bool "Soft SPI driver" help
@@ -387,4 +392,6 @@ config OMAP3_SPI (McSPI). This driver be used to access SPI chips on platforms embedding this OMAP3 McSPI IP core. -endif # menu "SPI Support" +endif # if SPI + +endmenu # menu "SPI Support"
Signature · 1 line
2.18.0.321.gffc6fa0e3
PATCH 2/3 mtd: spi: Kconfig: Update CONFIG_SPI_FLASH
1) CONFIG_SPI_FLASH is not just a legacy code, but it has common core code which handle both dm and non-dm spi flash code. So fix the info text to make it clear globally.
2) Since it's flash core it shouldn't depends on legacy SPI, so remove the 'depends on SPI'
--- drivers/mtd/spi/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/mtd/spi/Kconfig +2 -3
@@ -26,11 +26,10 @@ config SPI_FLASH_SANDBOX stored in a file on the host filesystem. config SPI_FLASH - bool "Legacy SPI Flash Interface support" - depends on SPI + bool "SPI Flash Core Interface support" select SPI_MEM help - Enable the legacy SPI flash support. This will include basic + Enable the SPI flash Core support. This will include basic standard support for things like probing, read / write, and erasing through cmd_sf interface.
Signature · 1 line
2.18.0.321.gffc6fa0e3
Vignesh R
maintainerPATCH 2/3 mtd: spi: Kconfig: Update CONFIG_SPI_FLASH
Hi,
Quoted 18 lines · Jagan Teki
1)
CONFIG_SPI_FLASHis not just a legacy code, but it has common core code which handle both dm and non-dm spi flash code. So fix the info text to make it clear globally.2) Since it's flash core it shouldn't depends on legacy SPI, so remove the 'depends on SPI'
Cc Vignesh R <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/mtd/spi/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/mtd/spi/Kconfig +0
-0
drivers/mtd/spi/Kconfig config SPI_FLASH_SANDBOX · line 29
Quoted 6 lines
drivers/mtd/spi/Kconfig +1
-2@@ -26,11 +26,10 @@ config SPI_FLASH_SANDBOX stored in a file on the host filesystem. config SPI_FLASH - bool "Legacy SPI Flash Interface support" - depends on SPI + bool "SPI Flash Core Interface support"
Nit, since we have SPI NAND flash as well, should description be updated to say SPI NOR Flash instead of SPI Flash?
Quoted 8 lines
drivers/mtd/spi/Kconfig +1
-1select SPI_MEM help - Enable the legacy SPI flash support. This will include basic + Enable the SPI flash Core support. This will include basic standard support for things like probing, read / write, and erasing through cmd_sf interface.
Signature · 2 lines
Regards Vignesh
PATCH 2/3 mtd: spi: Kconfig: Update CONFIG_SPI_FLASH
Quoted 24 lines · Vignesh R
Hi,
Quoted 20 lines · Jagan Teki
1)
CONFIG_SPI_FLASHis not just a legacy code, but it has common core code which handle both dm and non-dm spi flash code. So fix the info text to make it clear globally.2) Since it's flash core it shouldn't depends on legacy SPI, so remove the 'depends on SPI'
Cc Vignesh R <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/mtd/spi/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/mtd/spi/Kconfig +0
-0@@ -26,11 +26,10 @@ config SPI_FLASH_SANDBOX stored in a file on the host filesystem.
Quoted 7 lines
drivers/mtd/spi/Kconfig config SPI_FLASH_SANDBOX · line 29
Quoted 4 lines
drivers/mtd/spi/Kconfig +1
-2config SPI_FLASH - bool "Legacy SPI Flash Interface support" - depends on SPI + bool "SPI Flash Core Interface support"Nit, since we have SPI NAND flash as well, should description be updated to say SPI NOR Flash instead of SPI Flash?
True, I have bundle of changes even for configs to rename till those are in lets go with as we are.
PATCH 3/3 mtd: spi: Kconfig: Select SPI_FLASH if DM_SPI_FLASH
In reply to Jagan TekiDM_SPI_FLASH should require spi flash interface code for dm version, so select SPI_FLASH core by default if any board enabled DM_SPI_FLASH.
This overcome the explicit enablement of CONFIG_SPI_FLASH on respective boards when DM_SPI_FLASH being used.
--- drivers/mtd/spi/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/spi/Kconfig +1 -0
@@ -3,6 +3,7 @@ menu "SPI Flash Support" config DM_SPI_FLASH bool "Enable Driver Model for SPI flash" depends on DM && DM_SPI + select SPI_FLASH help Enable driver model for SPI flash. This SPI flash interface (spi_flash_probe(), spi_flash_write(), etc.) is then
Signature · 1 line
2.18.0.321.gffc6fa0e3
Vignesh R
maintainerPATCH 3/3 mtd: spi: Kconfig: Select SPI_FLASH if DM_SPI_FLASH
Quoted 17 lines · Jagan Teki
DM_SPI_FLASHshould require spi flash interface code for dm version, so selectSPI_FLASHcore by default if any board enabledDM_SPI_FLASH.This overcome the explicit enablement of
CONFIG_SPI_FLASHon respective boards whenDM_SPI_FLASHbeing used.Quoted 1 line
Cc Vignesh R <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/mtd/spi/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/mtd/spi/Kconfig +0
-0
drivers/mtd/spi/Kconfig menu "SPI Flash Support" · line 6
Quoted 4 lines
drivers/mtd/spi/Kconfig +1
-0@@ -3,6 +3,7 @@ menu "SPI Flash Support" config DM_SPI_FLASH bool "Enable Driver Model for SPI flash" depends on DM && DM_SPI + select SPI_FLASH
How about imply instead of select since there is no compile time dependency?
Quoted 4 lines
drivers/mtd/spi/Kconfig +0
-0help Enable driver model for SPI flash. This SPI flash interface (spi_flash_probe(), spi_flash_write(), etc.) is then
Signature · 2 lines
Regards Vignesh
PATCH 3/3 mtd: spi: Kconfig: Select SPI_FLASH if DM_SPI_FLASH
Quoted 16 lines · Vignesh R
Quoted 12 lines · Jagan Teki
DM_SPI_FLASHshould require spi flash interface code for dm version, so selectSPI_FLASHcore by default if any board enabledDM_SPI_FLASH.This overcome the explicit enablement of
CONFIG_SPI_FLASHon respective boards whenDM_SPI_FLASHbeing used.Quoted 1 line
Cc Vignesh R <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- drivers/mtd/spi/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 11 lines
drivers/mtd/spi/Kconfig menu "SPI Flash Support" · line 6
Quoted 9 lines
drivers/mtd/spi/Kconfig +1
-0@@ -3,6 +3,7 @@ menu "SPI Flash Support" config DM_SPI_FLASH bool "Enable Driver Model for SPI flash" depends on DM && DM_SPI + select SPI_FLASHHow about imply instead of select since there is no compile time dependency?
Yes we can, since DM_SPI_FLASH by default require SPI_FLASH I have used select.
Vignesh R
maintainerPATCH 1/3 spi: Kconfig: Mark CONFIG_SPI as Legacy spi support
In reply to Jagan TekiQuoted 9 lines · Jagan Teki
CONFIG_SPIis mandatory for SPI support even if the given board has dm or non-dm versions, so markCONFIG_SPIas non-dm config option and move the respective non-dm drivers below to that.This eventually reduce the explicit
CONFIG_SPIenablement for dm version spi drivers.Cc Vignesh R <[email protected]>Signed-off-by Jagan Teki <[email protected]>
Quoted 41 lines
--- drivers/spi/Kconfig | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)drivers/spi/Kconfig +12
-5@@ -1,7 +1,4 @@ -menuconfig SPI - bool "SPI Support" - -if SPI +menu "SPI Support" config DM_SPI bool "Enable Driver Model for SPI drivers"@@ -294,6 +291,14 @@ config ZYNQMP_GQSPI endif # if DM_SPI +config SPI + bool "Legacy SPI support" + help + Enable the legacy SPI support. This will include legacy SPI + interface code for non-dm SPI drivers. + +if SPI + config SOFT_SPI bool "Soft SPI driver" help@@ -387,4 +392,6 @@ config OMAP3_SPI (McSPI). This driver be used to access SPI chips on platforms embedding this OMAP3 McSPI IP core. -endif # menu "SPI Support" +endif # if SPI + +endmenu # menu "SPI Support"
Signature · 2 lines
Regards Vignesh