]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: phytec: common: k3: Copy fixed partitions to OS device tree
authorWadim Egorov <w.egorov@phytec.de>
Mon, 10 Jun 2024 13:33:42 +0000 (15:33 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jun 2024 16:28:59 +0000 (10:28 -0600)
Copy fixed-partitions nodes from U-Boot device tree to OS device tree.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Daniel Schultz <d.schultz@phytec.de>
board/phytec/common/k3/board.c
configs/phycore_am62x_a53_defconfig

index f21e154d4fe038b3e899ef09849895a0a1d0a1d3..3d7e090ccaab507b54653c9715b5f88a3344a361 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <env_internal.h>
+#include <fdt_support.h>
 #include <spl.h>
 #include <asm/arch/hardware.h>
 
@@ -94,3 +95,12 @@ int board_late_init(void)
        return 0;
 }
 #endif
+
+#if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+       fdt_copy_fixed_partitions(blob);
+
+       return 0;
+}
+#endif
index 7545bf2ea73e0587f230610edbe31b0c1d7f3d74..44f6e77b6265e7f43574a56e63da3bd075f976d0 100644 (file)
@@ -36,6 +36,7 @@ CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
 CONFIG_BOOTSTD_FULL=y
 CONFIG_SYS_BOOTM_LEN=0x800000
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="run mmcboot; bootflow scan -lb"
 CONFIG_DEFAULT_FDT_FILE="oftree"
 CONFIG_BOARD_LATE_INIT=y