]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Wed, 24 Aug 2022 13:59:14 +0000 (15:59 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 20 Oct 2022 15:35:51 +0000 (17:35 +0200)
This sets an env variable 'som_type' from the board code. It can
later be used by environment scripts, e. g. to select the proper
devicetree for the board.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
board/kontron/sl-mx8mm/sl-mx8mm.c
configs/kontron-sl-mx8mm_defconfig

index 416c4cbb407ce91a45ac8e431b968d5f5cf05171..6e73edeb2322a52a18a8f53470e24678e4f95d77 100644 (file)
@@ -121,6 +121,12 @@ int board_init(void)
        return 0;
 }
 
+int board_late_init(void)
+{
+       env_set("som_type", "sl");
+       return 0;
+}
+
 enum env_location env_get_location(enum env_operation op, int prio)
 {
        enum boot_device boot_dev = get_boot_device();
index fe29866f5c35a6f300886ddc57e55bfd0a536264..f273f228303e3469309bad9c63af31f19703db4d 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOARD_TYPES=y
+CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
 CONFIG_SPL_BSS_START_ADDR=0x910000
 CONFIG_SPL_BSS_MAX_SIZE=0x2000