[PATCH 10/12] config: xea: Enable late board initialization to set revision variable
Lukasz Majewski
lukma at denx.de
Fri Mar 22 12:43:13 CET 2024
The 'board_som_rev' environment variable will be used to point correct
configuration from the Linux FIT file.
Signed-off-by: Lukasz Majewski <lukma at denx.de>
---
board/liebherr/xea/xea.c | 12 ++++++++++++
configs/imx28_xea_defconfig | 1 +
configs/imx28_xea_sb_defconfig | 1 +
3 files changed, 14 insertions(+)
diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c
index 615d266b8f..5bac614153 100644
--- a/board/liebherr/xea/xea.c
+++ b/board/liebherr/xea/xea.c
@@ -282,6 +282,18 @@ int board_init(void)
return 0;
}
+#if defined(CONFIG_BOARD_LATE_INIT)
+int board_late_init(void)
+{
+ int ret = env_set_ulong("board_som_rev", get_som_rev());
+
+ if (ret)
+ printf("Cannot set XEA's SoM revision env variable!\n");
+
+ return 0;
+}
+#endif
+
int dram_init(void)
{
return mxs_dram_init();
diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig
index bc8c167b1f..c416635b24 100644
--- a/configs/imx28_xea_defconfig
+++ b/configs/imx28_xea_defconfig
@@ -39,6 +39,7 @@ CONFIG_BOOTCOMMAND="run ${bootpri} ; run ${bootsec}"
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="run prebootcmd"
CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_NO_BSS_LIMIT=y
CONFIG_SPL_BOARD_INIT=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
diff --git a/configs/imx28_xea_sb_defconfig b/configs/imx28_xea_sb_defconfig
index 691edc2834..78e59b4cb2 100644
--- a/configs/imx28_xea_sb_defconfig
+++ b/configs/imx28_xea_sb_defconfig
@@ -23,6 +23,7 @@ CONFIG_BOOTARGS="console=ttyAMA0,115200n8"
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="run prebootcmd"
CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_BOARD_LATE_INIT=y
# CONFIG_SPL_FRAMEWORK is not set
CONFIG_SPL_NO_BSS_LIMIT=y
CONFIG_SPL_BOARD_INIT=y
--
2.39.2
More information about the U-Boot
mailing list