From patchwork Thu Jun 4 15:11:52 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: 1303577 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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 [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49d8Y93tBkz9sRK for ; Fri, 5 Jun 2020 01:18:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4355819A0; Thu, 4 Jun 2020 17:17:44 +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 D9E4B81734; Thu, 4 Jun 2020 17:17:41 +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 E6D19810DB for ; Thu, 4 Jun 2020 17:17:38 +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 93D041A163A; Thu, 4 Jun 2020 17:17:38 +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 3F9841A1640; Thu, 4 Jun 2020 17:17:26 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id F30B24030C; Thu, 4 Jun 2020 23:17:12 +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 2/3] spi: Move DM_SPI_FLASH and SPI_FLASH_DATAFLASH to Kconfig (for ls1021aXXX) Date: Thu, 4 Jun 2020 23:11:52 +0800 Message-Id: <20200604151153.3980-3-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 moves the CONFIG_DM_SPI_FLASH and CONFIG_SPI_FLASH_DATAFLASH to be defined in Kconfig, not in board specific header file (include/configs/.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 Signed-off-by: Hou Zhiqiang --- V5: - No change. arch/arm/Kconfig | 6 ++++-- include/configs/ls1021aiot.h | 6 ------ include/configs/ls1021aqds.h | 5 ----- include/configs/ls1021atwr.h | 5 ----- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5a9583d0cf..9c528eaec5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1447,6 +1447,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 @@ -1460,6 +1462,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 @@ -1484,6 +1487,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. @@ -1935,5 +1939,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 - - diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h index 6e94a2a4c9..8993fb2267 100644 --- a/include/configs/ls1021aiot.h +++ b/include/configs/ls1021aiot.h @@ -139,12 +139,6 @@ #define CONFIG_SPI_FLASH_SPANSION #endif -/* DM SPI */ -#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI) -#define CONFIG_CMD_SF -#define CONFIG_DM_SPI_FLASH -#endif - /* * eTSEC */ diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index e069467b53..0779b595c3 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -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 */ diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 53a10ba4dd..16c30d09dc 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -234,11 +234,6 @@ * MMC */ -/* DM SPI */ -#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI) -#define CONFIG_DM_SPI_FLASH -#endif - /* * Video */