From: Patrick DELAUNAY Date: Wed, 18 Dec 2019 13:20:05 +0000 Subject: [PATCH] ARM: stm32: Permit multiple board targets In-Reply-To: <20191218065915.12295-1-marex@denx.de> References: <20191218065915.12295-1-marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Marek, > From: Marek Vasut > Sent: mercredi 18 d=C3=A9cembre 2019 07:59 >=20 > Setting TARGET_STM32MP1 in Kconfig always forces SYS_BOARD, > SYS_VENDOR and SYS_CONFIG_NAME to values set by the ST reference > platforms. Allow changing that by pulling out the TARGET_STM32MP157C_DK2 > and making the ST reference platform settings conditional on > TARGET_STM32MP157C_DK2 . > Other platforms can now define a different TARGET_ and thus override the = SYS_ > settings in their Kconfig. >=20 > Signed-off-by: Marek Vasut > Cc: Patrick Delaunay > Cc: Patrice Chotard > --- > board/st/stm32mp1/Kconfig | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/board/st/stm32mp1/Kconfig b/board/st/stm32mp1/Kconfig index > 4fa2360b4f..c84aa41f06 100644 > --- a/board/st/stm32mp1/Kconfig > +++ b/board/st/stm32mp1/Kconfig > @@ -1,4 +1,8 @@ > -if TARGET_STM32MP1 > +config TARGET_STM32MP157C_DK2 > + bool "support of STMicroelectronics STM32MP157C-DK2 Discovery > Board" > + default y > + > +if TARGET_STM32MP157C_DK2 >=20 > config SYS_BOARD > default "stm32mp1" > @@ -22,8 +26,4 @@ config CMD_STBOARD > This compile the stboard command to > read and write the board in the OTP. >=20 > -config TARGET_STM32MP157C_DK2 > - bool "support of STMicroelectronics STM32MP157C-DK2 Discovery > Board" > - default y I try to understood the issue but checked DK2 is not enought (I will soon introduce a new config for EV1 support) What it the use case ? Add a new board (not a board provided by ST) which are managed by a new di= rectory board// I think, if it is the case, we should test CONFIG_SYS_VENDOR =3D "stm32mp1" in board/st/stm32mp1/Kconfig And move CONFIG_SYS_VENDOR to arch NB: default value can be overidde in your board defconfig... Normally: - stm32mp1_trusted_defconfig - stm32mp1_basic_defconfig=20 - stm32mp1_optee_defconfig only support the directory ST board with board/st/stm32mp1 > endif > -- > 2.24.1 Patrick