*** Commonize board code for K3 based SoMs ***
cover *** Commonize board code for K3 based SoMs ***
Factor out code that we can reuse across all our K3 based SoMs. 2nd patch of this series require patch [1] to be applied first.
[1] https://lists.denx.de/pipermail/u-boot/2024-April/552021.html
Wadim Egorov (2):
board: phytec: Commonize board code for K3 based SoMs phycore_am64x_a53_defconfig: Enable CONFIG_BOARD_LATE_INIT
board/phytec/common/Makefile | 2 + board/phytec/common/k3/Makefile | 2 + board/phytec/common/k3/board.c | 73 ++++++++++++++++++++++ board/phytec/phycore_am62x/phycore-am62x.c | 67 -------------------- configs/phycore_am64x_a53_defconfig | 1 + 5 files changed, 78 insertions(+), 67 deletions(-) create mode 100644 board/phytec/common/k3/Makefile create mode 100644 board/phytec/common/k3/board.c
Signature · 1 line
2.34.1
PATCH 1/2 board: phytec: Commonize board code for K3 based SoMs
Environment handling code can be reused across all our K3 based SoMs. Instead of adding the same code for every new SoM, move it to a common board.c file.
--- board/phytec/common/Makefile | 2 + board/phytec/common/k3/Makefile | 2 + board/phytec/common/k3/board.c | 73 ++++++++++++++++++++++ board/phytec/phycore_am62x/phycore-am62x.c | 67 -------------------- 4 files changed, 77 insertions(+), 67 deletions(-) create mode 100644 board/phytec/common/k3/Makefile create mode 100644 board/phytec/common/k3/board.c
board/phytec/common/Makefile +2 -0
@@ -5,6 +5,8 @@ ifdef CONFIG_SPL_BUILD # necessary to create built-in.o obj- := __dummy__.o +else +obj-$(CONFIG_ARCH_K3) += k3/ endif obj-y += phytec_som_detection.o
board/phytec/common/k3/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0+ +obj-y += board.o
board/phytec/common/k3/board.c new file +73 -0
73 lines not on this page · raw message
board/phytec/phycore_am62x/phycore-am62x.c +0 -67
78 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 2/2 phycore_am64x_a53_defconfig: Enable CONFIG_BOARD_LATE_INIT
In reply to Wadim EgorovEnable CONFIG_BOARD_LATE_INIT to use PHYTECs common board_late_init() to set handy environment variables for u-boot.
Also, resync after savedefconfig.
--- configs/phycore_am64x_a53_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/phycore_am64x_a53_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_BOOTSTD_FULL=y CONFIG_BOOTCOMMAND="run mmcboot; bootflow scan -lb" CONFIG_DEFAULT_FDT_FILE="oftree" +CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x180000 CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y
Signature · 1 line
2.34.1
Quoted 10 lines · Wadim Egorov
Factor out code that we can reuse across all our K3 based SoMs. 2nd patch of this series require patch [1] to be applied first.
[1] https://lists.denx.de/pipermail/u-boot/2024-April/552021.html
Wadim Egorov (2):
board: phytec: Commonize board code for K3 based SoMsphycore_am64x_a53_defconfig: EnableCONFIG_BOARD_LATE_INIT[...]
Applied to u-boot/next, thanks!
Signature · 1 line
Tom