]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: samsung: exynos-mobile: enable OF_BOARD support
authorKaustabh Chakraborty <kauschluss@disroot.org>
Tue, 3 Feb 2026 13:08:42 +0000 (18:38 +0530)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 23 Feb 2026 06:35:33 +0000 (15:35 +0900)
OF_BOARD allows to choose the internal device tree in runtime. Use it to
pass the external FDT as an internal one if it is not present. This
approach is also used by qcom-phone, and it reduces boot image size. It
is expected that an external FDT is present as U-Boot is packaged as an
Android boot image.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/exynos-mobile/exynos-mobile.c
configs/exynos-mobile_defconfig

index 412dfa7555c7947b0fc9026efa2cf9090b1a7d96..1f61f28de5f11a4d72117042646d9066c74d0d39 100644 (file)
@@ -231,6 +231,15 @@ static int exynos_fastboot_setup(void)
        return 0;
 }
 
+int board_fdt_blob_setup(void **fdtp)
+{
+       /* If internal FDT is not available, use the external FDT instead. */
+       if (fdt_check_header(*fdtp))
+               *fdtp = (void *)get_prev_bl_fdt_addr();
+
+       return 0;
+}
+
 int timer_init(void)
 {
        ofnode timer_node;
index ead4ea4493e4e131add1c5f847b129381b8637c7..846f9e24bd34e5817c298b2b56f9000d16563c5b 100644 (file)
@@ -25,6 +25,7 @@ CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_EFI_PARTITION=y
 CONFIG_OF_UPSTREAM=y
+CONFIG_OF_BOARD=y
 CONFIG_BUTTON=y
 CONFIG_BUTTON_REMAP_PHONE_KEYS=y
 CONFIG_CLK_EXYNOS7870=y