From patchwork Thu Dec 7 17:26:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 845708 X-Patchwork-Delegate: lukma@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yt2TT4X6kz9t3V for ; Fri, 8 Dec 2017 04:26:36 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id CE8B6C21FDA; Thu, 7 Dec 2017 17:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DDD17C21E14; Thu, 7 Dec 2017 17:26:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 97C14C21ED9; Thu, 7 Dec 2017 17:26:23 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id 3A185C21E14 for ; Thu, 7 Dec 2017 17:26:23 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB7HO6An022268; Thu, 7 Dec 2017 18:26:21 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2eq4s01r06-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 07 Dec 2017 18:26:21 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C822631; Thu, 7 Dec 2017 17:26:20 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A892F4E00; Thu, 7 Dec 2017 17:26:20 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 7 Dec 2017 18:26:20 +0100 Received: from localhost (10.201.23.85) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 7 Dec 2017 18:26:20 +0100 From: Patrick Delaunay To: Date: Thu, 7 Dec 2017 18:26:17 +0100 Message-ID: <1512667577-5068-1-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-12-07_07:, , signatures=0 Cc: benjaminzyoung@gmail.com, maxime.ripard@free-electrons.com Subject: [U-Boot] [PATCH] cmd: fastboot: Kconfig: solve config issue X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" When FASTBOOT is activated, only one the supported device is supported in code at the same time - CONFIG_FASTBOOT_FLASH_MMC_DEV - CONFIG_FASTBOOT_FLASH_NAND_DEV But Today the choice is not exclusive in Kconfig and that cause Kconfig issue when : - CONFIG_FASTBOOT, CONFIG_MMC, CONFIG_NAND are activated - CONFIG_FASTBOOT_FLASH_MMC_DEV = 0 - CONFIG_FASTBOOT_FLASH_NAND_DEV is not activated The patch add a choice in Kconfig to select the FLASH provider - CONFIG_FASTBOOT_FLASH_MMC - CONFIG_FASTBOOT_FLASH_NAND Signed-off-by: Patrick Delaunay Acked-by: Maxime Ripard --- I execute buildman execute on board with CONFIG_FASTBOOT on label v2018.01-rc1 => no new error board list = A13-OLinuXino A20-OLinuXino-Lime2 A20-OLinuXino-Lime2-eMMC am335x_boneblack am335x_boneblack_vboot am335x_evm am335x_evm_norboot am335x_evm_nor am335x_evm_spiboot am335x_evm_usbspl am57xx_evm am57xx_evm_nodt am57xx_hs_evm bcm23550_w1d bcm28155_ap birdland_bav335a birdland_bav335b cgtqmx6eval CHIP CHIP_pro chromebit_mickey chromebook_jerry chromebook_minnie Cubietruck dra7xx_evm dra7xx_hs_evm evb-rk3036 evb-rk3229 evb-rk3288 evb-rk3328 evb-rv1108 fennec-rk3288 firefly-rk3288 kc1 kylin-rk3036 miqi-rk3288 mx6qsabrelite Nintendo_NES_Classic_Edition nitrogen6dl2g nitrogen6dl nitrogen6q2g nitrogen6q nitrogen6s1g nitrogen6s omap3_beagle omap3_logic parrot_r16 phycore-rk3288 popmetal-rk3288 rock2 Sinlinx_SinA33 sniper stih410-b2260 stm32mp15_basic stm32mp15_fpga_basic stm32mp15_fpga_trusted stm32mp15_trusted tinker-rk3288 xilinx_zynqmp_ep xilinx_zynqmp_zc1751_xm015_dc1 xilinx_zynqmp_zc1751_xm016_dc2 xilinx_zynqmp_zcu102_revA xilinx_zynqmp_zcu102_revB the modified configuration seems OK : $> tools/buildman/buildman -sdeSK A13-OLinuXino A20-OLinuXino-Lime2 A20-OLinuXino-Lime2-eMMC Cubietruck Sinlinx_SinA33 am57xx_evm am57xx_hs_evm chromebit_mickey chromebook_jerry chromebook_minnie dra7xx_evm dra7xx_hs_evm evb-rk3036 evb-rk3229 evb-rk3288 fennec-rk3288 firefly-rk3288 kc1 kylin-rk3036 miqi-rk3288 parrot_r16 phycore-rk3288 popmetal-rk3288 rock2 sniper tinker-rk3288 xilinx_zynqmp_ep xilinx_zynqmp_zc1751_xm015_dc1 xilinx_zynqmp_zcu102_revA xilinx_zynqmp_zcu102_revB : + u-boot.cfg: CONFIG_FASTBOOT_FLASH_MMC=1 + u-boot-spl.cfg: CONFIG_FASTBOOT_FLASH_MMC=1 + all: CONFIG_FASTBOOT_FLASH_MMC=1 CHIP_pro xilinx_zynqmp_zc1751_xm016_dc2 : + u-boot.cfg: CONFIG_FASTBOOT_FLASH_NAND=1 + u-boot-spl.cfg: CONFIG_FASTBOOT_FLASH_NAND=1 + all: CONFIG_FASTBOOT_FLASH_NAND=1 bcm23550_w1d bcm28155_ap evb-rk3328 evb-rv1108 stih410-b2260 : + u-boot.cfg: CONFIG_FASTBOOT_FLASH_MMC=1 + all: CONFIG_FASTBOOT_FLASH_MMC=1 and I test on my custom board (with MMC + NAND + FASTBOOT) the .config is now OK, MMC is selected by default and NAND_DEV is not requested cmd/fastboot/Kconfig | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig index 4ce7a77..aaf3d78 100644 --- a/cmd/fastboot/Kconfig +++ b/cmd/fastboot/Kconfig @@ -71,9 +71,23 @@ config FASTBOOT_FLASH the downloaded image to a non-volatile storage device. Define this to enable the "fastboot flash" command. +choice + prompt "Flash provider for FASTBOOT" + depends on FASTBOOT_FLASH + +config FASTBOOT_FLASH_MMC + bool "FASTBOOT on MMC" + depends on MMC + +config FASTBOOT_FLASH_NAND + bool "FASTBOOT on NAND" + depends on NAND + +endchoice + config FASTBOOT_FLASH_MMC_DEV int "Define FASTBOOT MMC FLASH default device" - depends on FASTBOOT_FLASH && MMC + depends on FASTBOOT_FLASH_MMC default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 help @@ -83,7 +97,7 @@ config FASTBOOT_FLASH_MMC_DEV config FASTBOOT_FLASH_NAND_DEV int "Define FASTBOOT NAND FLASH default device" - depends on FASTBOOT_FLASH && NAND + depends on FASTBOOT_FLASH_NAND depends on CMD_MTDPARTS default 0 if ARCH_SUNXI && NAND_SUNXI help