]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: Move DM_SPI_FLASH and SPI_FLASH_DATAFLASH to Kconfig (for ls1021aXXX)
authorLukasz Majewski <lukma@denx.de>
Thu, 4 Jun 2020 15:11:52 +0000 (23:11 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 29 Jun 2020 17:34:43 +0000 (13:34 -0400)
This patch moves the CONFIG_DM_SPI_FLASH and CONFIG_SPI_FLASH_DATAFLASH
to be defined in Kconfig, not in board specific header file
(include/configs/<board>.h).

Before this change the CONFIG_DM_SPI_FLASH was not set in .config (so it
was not possible to use CONFIG_IS_ENABLED(DM_SPI_FLASH) in SPI DM/DTS
converted drivers), but it was set in u-boot.cfg file.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
arch/arm/Kconfig
include/configs/ls1021aiot.h
include/configs/ls1021aqds.h
include/configs/ls1021atwr.h

index 714c81e1a974cb4e23867e9fe70ee89770c0c00e..fb1e38de0c4e6b2180af02531c15bac259f2a888 100644 (file)
@@ -1456,6 +1456,8 @@ config TARGET_LS1021AQDS
        select SUPPORT_SPL
        select SYS_FSL_DDR
        select FSL_DDR_INTERACTIVE
+       select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
+       select SPI_FLASH_DATAFLASH if FSL_DSPI || FSL_QSPI
        imply SCSI
 
 config TARGET_LS1021ATWR
@@ -1469,6 +1471,7 @@ config TARGET_LS1021ATWR
        select CPU_V7_HAS_VIRT
        select LS1_DEEP_SLEEP
        select SUPPORT_SPL
+       select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
        imply SCSI
 
 config TARGET_LS1021ATSN
@@ -1493,6 +1496,7 @@ config TARGET_LS1021AIOT
        select CPU_V7_HAS_NONSEC
        select CPU_V7_HAS_VIRT
        select SUPPORT_SPL
+       select DM_SPI_FLASH if FSL_DSPI || FSL_QSPI
        imply SCSI
        help
          Support for Freescale LS1021AIOT platform.
@@ -1945,5 +1949,3 @@ config SPL_LDSCRIPT
        default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
        default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
        default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
-
-
index 59d65f88917b8a2ec2c5fbd3a043d0e8578a47cd..b0a150dbfb14d189f5e213c01d4d6d6aa768e86f 100644 (file)
 #define CONFIG_SPI_FLASH_SPANSION
 #endif
 
-/* DM SPI */
-#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
-#define CONFIG_DM_SPI_FLASH
-#endif
-
 /*
  * eTSEC
  */
index e069467b53ea88ea6e135bc9b60047918fdbfe7b..0779b595c30c116bfe3d7dc39ae75bb508dfeb25 100644 (file)
@@ -363,11 +363,6 @@ unsigned long get_board_ddr_clk(void);
  * MMC
  */
 
-/* DM SPI */
-#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
-#define CONFIG_DM_SPI_FLASH
-#endif
-
 /*
  * Video
  */
index 53a10ba4dd6b34369e325b0ed0f013d004a7a948..16c30d09dc73e4105e4406b62a295f6f4cee7fa3 100644 (file)
  * MMC
  */
 
-/* DM SPI */
-#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
-#define CONFIG_DM_SPI_FLASH
-#endif
-
 /*
  * Video
  */