]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: engicam: stm32mp1: convert to livetree
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 19 May 2022 07:07:30 +0000 (09:07 +0200)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 17 Jun 2022 12:12:27 +0000 (14:12 +0200)
Replace gd->fdt_blob access with fdt_getprop() function to the
function ofnode_get_property() to support a live tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
board/engicam/stm32mp1/stm32mp1.c

index 20d8603c78cad2ae671d2953b8e9743cb8d37e0f..0a3e580f5b44759e517fd1cdd940bcd5b7516b3e 100644 (file)
@@ -14,8 +14,6 @@
 #include <asm/arch/sys_proto.h>
 #include <power/regulator.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 int checkboard(void)
 {
        char *mode;
@@ -28,8 +26,8 @@ int checkboard(void)
                mode = "basic";
 
        printf("Board: stm32mp1 in %s mode", mode);
-       fdt_compat = fdt_getprop(gd->fdt_blob, 0, "compatible",
-                                &fdt_compat_len);
+       fdt_compat = ofnode_get_property(ofnode_root(), "compatible",
+                                        &fdt_compat_len);
        if (fdt_compat && fdt_compat_len)
                printf(" (%s)", fdt_compat);
        puts("\n");