[PATCHv4 1/3] spi: Move DM_SPI_FLASH to Kconfig (for NXP's ls1043a)

Priyanka Jain (OSS) priyanka.jain at oss.nxp.com
Wed Jun 3 09:19:46 CEST 2020


>-----Original Message-----
>From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Zhiqiang Hou
>Sent: Tuesday, June 2, 2020 6:41 PM
>To: u-boot at lists.denx.de; lokeshvutla at ti.com; afd at ti.com; hs at denx.de;
>sjg at chromium.org; feng.li_2 at nxp.com; Alison Wang
><alison.wang at nxp.com>; sumit.garg at nxp.com;
>eugen.hristev at microchip.com; patrick.delaunay at st.com;
>jagan at amarulasolutions.com; vigneshr at ti.com; joe.hershberger at ni.com;
>sr at denx.de; wd at denx.de; lukma at denx.de; miquel.raynal at bootlin.com;
>marex at denx.de; bmeng.cn at gmail.com; simon.k.r.goldschmidt at gmail.com;
>markus.klotzbuecher at kistler.com; baruch at tkos.co.il; hws at denx.de;
>mrjoel at lixil.net; agust at denx.de; Priyanka Jain <priyanka.jain at nxp.com>;
>Madalin Bucur (OSS) <madalin.bucur at oss.nxp.com>; Gervais, Francois
><FGervais at distech-controls.com>; Udit Agarwal <udit.agarwal at nxp.com>
>Cc: Z.q. Hou <zhiqiang.hou at nxp.com>
>Subject: [PATCHv4 1/3] spi: Move DM_SPI_FLASH to Kconfig (for NXP's
>ls1043a)
>
>From: Lukasz Majewski <lukma at denx.de>
>
>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 at denx.de>
>Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
>---
>V4:
> - Rebase the patch, no change intended.
>
> arch/arm/Kconfig                 | 4 ++++
> include/configs/ls1043a_common.h | 2 --
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index
>21df1c415f..28b8e9354f 100644
>--- a/arch/arm/Kconfig
>+++ b/arch/arm/Kconfig
>@@ -1501,6 +1501,8 @@ config TARGET_LS1043AQDS
> 	select BOARD_LATE_INIT
> 	select SUPPORT_SPL
> 	select FSL_DDR_INTERACTIVE if !SPL
>+	select FSL_DSPI if !SPL_NO_DSPI
>+	select DM_SPI_FLASH if FSL_DSPI && !SPL_NO_DSPI
Since you have already added check for !SPL_NO_DSPI in previous statement, no need to add here.
> 	imply SCSI
> 	imply SCSI_AHCI
> 	help
>@@ -1515,6 +1517,8 @@ config TARGET_LS1043ARDB
> 	select BOARD_EARLY_INIT_F
> 	select BOARD_LATE_INIT
> 	select SUPPORT_SPL
>+	select FSL_DSPI if !SPL_NO_DSPI
>+	select DM_SPI_FLASH if FSL_DSPI && !SPL_NO_DSPI
Since you have already added check for !SPL_NO_DSPI in previous statement, no need to add here.
> 	help
> 	  Support for Freescale LS1043ARDB platform.
>
>diff --git a/include/configs/ls1043a_common.h
>b/include/configs/ls1043a_common.h
>index 985f40412c..0857b15fe0 100644
>--- a/include/configs/ls1043a_common.h
>+++ b/include/configs/ls1043a_common.h
>@@ -176,9 +176,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 */
>--
>2.17.1
Thanks
Priyanka


More information about the U-Boot mailing list