From patchwork Mon Jan 13 14:17:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 239573 List-Id: U-Boot discussion From: patrick.delaunay at st.com (Patrick Delaunay) Date: Mon, 13 Jan 2020 15:17:40 +0100 Subject: [PATCH 1/3] stm32mp1: move stboard command in board/st/common directory In-Reply-To: <20200113141742.28182-1-patrick.delaunay@st.com> References: <20200113141742.28182-1-patrick.delaunay@st.com> Message-ID: <20200113141742.28182-2-patrick.delaunay@st.com> Move the ST command in board/st/common, as this command is only used by ST board. Prepare the support in U-Boot of boards with STM32MP15x SOC but not STMicroelectronics. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- board/st/common/Kconfig | 6 ++++++ board/st/common/MAINTAINERS | 6 ++++++ board/st/common/Makefile | 6 ++++++ board/st/{stm32mp1 => common}/cmd_stboard.c | 3 +++ board/st/stm32mp1/Kconfig | 9 ++------- board/st/stm32mp1/Makefile | 1 - 6 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 board/st/common/Kconfig create mode 100644 board/st/common/MAINTAINERS create mode 100644 board/st/common/Makefile rename board/st/{stm32mp1 => common}/cmd_stboard.c (98%) diff --git a/board/st/common/Kconfig b/board/st/common/Kconfig new file mode 100644 index 0000000000..1824087afc --- /dev/null +++ b/board/st/common/Kconfig @@ -0,0 +1,6 @@ +config CMD_STBOARD + bool "stboard - command for OTP board information" + default y + help + This compile the stboard command to + read and write the board in the OTP. diff --git a/board/st/common/MAINTAINERS b/board/st/common/MAINTAINERS new file mode 100644 index 0000000000..3b02f4ab98 --- /dev/null +++ b/board/st/common/MAINTAINERS @@ -0,0 +1,6 @@ +ST BOARDS +M: Patrick Delaunay +L: uboot-stm32 at st-md-mailman.stormreply.com (moderated for non-subscribers) +T: git https://gitlab.denx.de/u-boot/custodians/u-boot-stm.git +S: Maintained +F: board/st/common/ diff --git a/board/st/common/Makefile b/board/st/common/Makefile new file mode 100644 index 0000000000..8553606b90 --- /dev/null +++ b/board/st/common/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +# +# Copyright (C) 2020, STMicroelectronics - All Rights Reserved +# + +obj-$(CONFIG_CMD_STBOARD) += cmd_stboard.o diff --git a/board/st/stm32mp1/cmd_stboard.c b/board/st/common/cmd_stboard.c similarity index 98% rename from board/st/stm32mp1/cmd_stboard.c rename to board/st/common/cmd_stboard.c index 04352ae8ed..e994a88e71 100644 --- a/board/st/stm32mp1/cmd_stboard.c +++ b/board/st/common/cmd_stboard.c @@ -3,6 +3,7 @@ * Copyright (C) 2019, STMicroelectronics - All Rights Reserved */ +#ifndef CONFIG_SPL_BUILD #include #include #include @@ -143,3 +144,5 @@ U_BOOT_CMD(stboard, 6, 0, do_stboard, " - Variant: 1 ... 15\n" " - Revision: A...O\n" " - BOM: 1...15\n"); + +#endif diff --git a/board/st/stm32mp1/Kconfig b/board/st/stm32mp1/Kconfig index 4fa2360b4f..9f985e5775 100644 --- a/board/st/stm32mp1/Kconfig +++ b/board/st/stm32mp1/Kconfig @@ -15,15 +15,10 @@ config ENV_SECT_SIZE config ENV_OFFSET default 0x280000 if ENV_IS_IN_SPI_FLASH -config CMD_STBOARD - bool "stboard - command for OTP board information" - default y - help - This compile the stboard command to - read and write the board in the OTP. - config TARGET_STM32MP157C_DK2 bool "support of STMicroelectronics STM32MP157C-DK2 Discovery Board" default y +source "board/st/common/Kconfig" + endif diff --git a/board/st/stm32mp1/Makefile b/board/st/stm32mp1/Makefile index 3c6c035b11..8188075b1a 100644 --- a/board/st/stm32mp1/Makefile +++ b/board/st/stm32mp1/Makefile @@ -7,7 +7,6 @@ ifdef CONFIG_SPL_BUILD obj-y += spl.o else obj-y += stm32mp1.o -obj-$(CONFIG_CMD_STBOARD) += cmd_stboard.o endif obj-y += board.o