Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67773C433EF for ; Tue, 30 Nov 2021 13:18:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6EF868305E; Tue, 30 Nov 2021 14:18:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="kfEridU9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 098B58128B; Tue, 30 Nov 2021 14:18:44 +0100 (CET) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 8D0F98306A for ; Tue, 30 Nov 2021 14:18:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=6968f9ae4c=patrice.chotard@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AU8q7LH026770; Tue, 30 Nov 2021 14:18:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : from : to : references : cc : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=CzjstIQHXr8MWUwY57eF0uTfr/1YVE5wtf2Ok2lLxtM=; b=kfEridU9CTphvouKqBVZIOXXIHwqfz/ZAiF9w436tue07pFBVO929MEulEn74aDqz3ux PXht9qNq1aLsDinrLJOVVtxjqJ4Tmm87dGU5o28Mgd/N+4ODe5pKhdVJaVBhZZJPH4OF r2SmI8zEw6367rbBDlNFXgQ5L4ooKdQtLYSPTjp+NLOccR1nnOSDDD4G/zvF6vDkKsVp yJ8RsSFpf32RETK2ZaxkOe+2iE9Kn0/eH7VYdLzfQ3Hv8d6Hnwq28Xq2F9eLDx9VAORR rGc+SODdZGDVA2j1KQ3lZIio3lioSwABn7+VShVe/ALY3yr6vHBqXHKUcYpRXBJ4mXwl XA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3cna1yuawe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Nov 2021 14:18:38 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 616C7100034; Tue, 30 Nov 2021 14:18:37 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 444962A4D9E; Tue, 30 Nov 2021 14:18:37 +0100 (CET) Received: from lmecxl0573.lme.st.com (10.75.127.44) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 30 Nov 2021 14:18:36 +0100 Subject: Re: [PATCH] ARM: stm32: Increase USB power-good delay on DHSOM From: Patrice CHOTARD To: Marek Vasut References: <20211113022444.231801-1-marex@denx.de> <6188970d-e4cd-4158-3bf7-db0124b400b9@foss.st.com> <450e1b7d-e9d8-f369-03ee-95593a4556d8@denx.de> <75dc3d7d-3891-a6e3-ddd6-b3a80b91b5a5@foss.st.com> CC: Patrick Delaunay , "u-boot@lists.denx.de" Message-ID: <80b80d38-8185-a4c6-e30d-04599d947faa@foss.st.com> Date: Tue, 30 Nov 2021 14:18:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <75dc3d7d-3891-a6e3-ddd6-b3a80b91b5a5@foss.st.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-30_08,2021-11-28_01,2020-04-07_01 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Marek While preparing and testing the next u-boot-stm32 pull request, i found an issue with this patch during compilation. I got the following error: In file included from include/config.h:4, from include/common.h:16, from env/common.c:10: include/configs/stm32mp15_common.h:173:2: error: expected '}' before 'STM32MP_BOARD_EXTRA_ENV' 173 | STM32MP_BOARD_EXTRA_ENV | ^~~~~~~~~~~~~~~~~~~~~~~ include/env_default.h:125:2: note: in expansion of macro 'CONFIG_EXTRA_ENV_SETTINGS' 125 | CONFIG_EXTRA_ENV_SETTINGS | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from env/common.c:32: include/env_default.h:29:36: note: to match this '{' 29 | const char default_environment[] = { | ^ If you have time to send a fix quickly i can wait for it before sending the pull-request Or i exclude these 2 patches as there are dependent : https://patchwork.ozlabs.org/project/uboot/patch/20211113022444.231801-1-marex@denx.de/ https://patchwork.ozlabs.org/project/uboot/patch/20211113022513.231840-1-marex@denx.de/ Thanks Patrice On 11/30/21 11:27 AM, Patrice CHOTARD wrote: > Hi Marek > > On 11/15/21 1:59 PM, Marek Vasut wrote: >> On 11/15/21 12:18 PM, Patrick DELAUNAY wrote: >> >> Hi, >> >> [...] >> >>>> diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h >>>> index 4e2cabff2e7..be22d3ea7f1 100644 >>>> --- a/include/configs/stm32mp15_common.h >>>> +++ b/include/configs/stm32mp15_common.h >>>> @@ -169,7 +169,8 @@ >>>>       STM32MP_BOOTCMD \ >>>>       STM32MP_PARTS_DEFAULT \ >>>>       BOOTENV \ >>>> -    STM32MP_EXTRA >>>> +    STM32MP_EXTRA \ >>>> +    STM32MP_BOARD_EXTRA_ENV >>> >>> I think you that patch failed for the board which include "stm32mp15_common.h" only >>> >>> STM32MP_BOARD_EXTRA_ENV is not define >>> >>> => board/engicam/stm32mp1/Kconfig:10:    default "stm32mp15_common" >>> >>> at minimal, you need to add: >>> >>> #ifndef STM32MP_BOARD_EXTRA_ENV >>> >>> #defineSTM32MP_BOARD_EXTRA_ENV >>> #endif >>> >>> >>> But for my point of view CONFIG_EXTRA_ENV_SETTINGS is already a "default" value >>> >>> => it can be override in board (after #undef) >>> >>> or the overidde should be also managed by  STM32MP_EXTRA, if we add in the common file: >>> >>> >>> #ifndef STM32MP_EXTRA >>> >>> #defineSTM32MP_EXTRA \ >>> "altbootcmd=run bootcmd\0"\ >>> "env_check=if env info -p -d -q; then env save; fi\0"\ >>> "boot_net_usb_start=true\0" >>> >>> #endif >> >> Except in either case, you end up with a lot of duplication. >> >>>>   #endif /* ifndef CONFIG_SPL_BUILD */ >>>>   #endif /* ifdef CONFIG_DISTRO_DEFAULTS*/ >>>> diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h >>>> index c559cd72da7..bac9e8388a7 100644 >>>> --- a/include/configs/stm32mp15_dh_dhsom.h >>>> +++ b/include/configs/stm32mp15_dh_dhsom.h >>>> @@ -8,6 +8,9 @@ >>>>   #ifndef __CONFIG_STM32MP15_DH_DHSOM_H__ >>>>   #define __CONFIG_STM32MP15_DH_DHSOM_H__ >>>> +#define STM32MP_BOARD_EXTRA_ENV \ >>>> +    "usb_pgood_delay=1000\0" >>>> + >>>>   #include >>> >>> proposal 1: overiddeCONFIG_EXTRA_ENV_SETTINGS as it is done in stm32mp15_st_common.h >>> >>> #include >>> >>> #define STM32MP_DH_EXTRA_ENV \ >>>      "usb_pgood_delay=1000\0" >>> >>> #undefCONFIG_EXTRA_ENV_SETTINGS >>> #defineCONFIG_EXTRA_ENV_SETTINGS \ >>> STM32MP_MEM_LAYOUT \ >>> ST_STM32MP1_BOOTCMD \ >>> STM32MP_PARTS_DEFAULT \ >>> BOOTENV \ >>> STM32MP_EXTRA \ >>> >>>          STM32MP_DH_EXTRA_ENV >>> >>> or >>> >>> #include >>> >>> #undefCONFIG_EXTRA_ENV_SETTINGS >>> >>> #defineCONFIG_EXTRA_ENV_SETTINGS \ >>> STM32MP_MEM_LAYOUT \ >>> ST_STM32MP1_BOOTCMD \ >>> STM32MP_PARTS_DEFAULT \ >>> BOOTENV \ >>> STM32MP_EXTRA \ >>> "usb_pgood_delay=1000\0" >>> >>> >>> proposal 2: you can overrideSTM32MP_EXTRA >>> #defineSTM32MP_EXTRA \ >>> >>> "altbootcmd=run bootcmd\0"\ >>> "env_check=if env info -p -d -q; then env save; fi\0"\ >>> "boot_net_usb_start=true\0" \ >>> >>>      "usb_pgood_delay=1000\0" >>> >>> #include >>> open point : do you really need "altbootcmd" ? "boot_net_usb_start" ?"env_check" ? >> >> altbootcmd is for when bootcounter reaches bootlimit, so yes. >> boot_net_usb_start, depends on board. >> >> [...] > Applied to u-boot-stm32/next > > Thanks > Patrice >