From patchwork Thu Jun 4 15:11:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 1303576 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49d8Xy5HCzz9sRK for ; Fri, 5 Jun 2020 01:17:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9584E81734; Thu, 4 Jun 2020 17:17:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id DD7EA810E0; Thu, 4 Jun 2020 17:17:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FBD3810E0 for ; Thu, 4 Jun 2020 17:17:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Zhiqiang.Hou@nxp.com Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 157E51A164A; Thu, 4 Jun 2020 17:17:36 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 693181A0251; Thu, 4 Jun 2020 17:17:24 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6BCE1402B3; Thu, 4 Jun 2020 23:17:10 +0800 (SGT) From: Zhiqiang Hou To: u-boot@lists.denx.de, lokeshvutla@ti.com, afd@ti.com, hs@denx.de, sjg@chromium.org, feng.li_2@nxp.com, alison.wang@nxp.com, sumit.garg@nxp.com, eugen.hristev@microchip.com, patrick.delaunay@st.com, jagan@amarulasolutions.com, vigneshr@ti.com, joe.hershberger@ni.com, sr@denx.de, wd@denx.de, lukma@denx.de, miquel.raynal@bootlin.com, marex@denx.de, bmeng.cn@gmail.com, simon.k.r.goldschmidt@gmail.com, markus.klotzbuecher@kistler.com, baruch@tkos.co.il, hws@denx.de, mrjoel@lixil.net, agust@denx.de, priyanka.jain@nxp.com, madalin.bucur@oss.nxp.com, fgervais@distech-controls.com, udit.agarwal@nxp.com Cc: Hou Zhiqiang Subject: [PATCHv5 1/3] spi: Move DM_SPI_FLASH to Kconfig (for NXP's ls1043a) Date: Thu, 4 Jun 2020 23:11:51 +0800 Message-Id: <20200604151153.3980-2-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200604151153.3980-1-Zhiqiang.Hou@nxp.com> References: <20200604151153.3980-1-Zhiqiang.Hou@nxp.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean From: Lukasz Majewski This patch fixes issue with defining the DM_SPI_FLASH in the configs/include/ 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 Signed-off-by: Hou Zhiqiang --- V5: - Remove the redundant condition check "!SPL_NO_DSPI" when selecting DM_SPI_FLASH. 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..5a9583d0cf 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 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 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 */