[U-Boot,v2,2/4] spi: Move DM_SPI_FLASH to Kconfig (for NXP's ls1043a)
diff mbox series

Message ID 20190813134731.25024-3-lukma@denx.de
State New
Delegated to: Tom Rini
Headers show
Series
  • spi: Split CONFIG_DM_SPI* to CONFIG_{SPL_TPL}DM_SPI*
Related show

Commit Message

Lukasz Majewski Aug. 13, 2019, 1:47 p.m. UTC
This patch fixes issue with defining the DM_SPI_FLASH in the
configs/include/<board.h> instead of enabling this option in Kconfig.

The problem is that CONFIG_IS_ENABLED(DM_SPI_FLASH) shows false as there
is no DM_SPI_FLASH=y in .config (but the define is set in u-boot.cfg).

As a result conversion of DM_SPI_FLASH to using CONFIG_IS_ENABLED() is not
working properly.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

Changes in v2: None

 arch/arm/Kconfig                 | 4 ++++
 include/configs/ls1043a_common.h | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3f0e301d413d..656ac9c5432e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1395,6 +1395,8 @@  config TARGET_LS1043AQDS
 	select BOARD_LATE_INIT
 	select SUPPORT_SPL
 	select FSL_DDR_INTERACTIVE if !SPL
+	select FSL_DSPI if !SPL
+	select DM_SPI_FLASH if FSL_DSPI
 	imply SCSI
 	imply SCSI_AHCI
 	help
@@ -1409,6 +1411,8 @@  config TARGET_LS1043ARDB
 	select BOARD_EARLY_INIT_F
 	select BOARD_LATE_INIT
 	select SUPPORT_SPL
+	select FSL_DSPI if !SPL
+	select DM_SPI_FLASH if FSL_DSPI
 	help
 	  Support for Freescale LS1043ARDB platform.
 
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 70447a2183ee..fd8bf705cd84 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -165,9 +165,7 @@ 
 
 /*  DSPI  */
 #ifndef SPL_NO_DSPI
-#define CONFIG_FSL_DSPI
 #ifdef CONFIG_FSL_DSPI
-#define CONFIG_DM_SPI_FLASH
 #define CONFIG_SPI_FLASH_STMICRO	/* cs0 */
 #define CONFIG_SPI_FLASH_SST		/* cs1 */
 #define CONFIG_SPI_FLASH_EON		/* cs2 */