]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rpi: Only add frame buffer node if CONFIG_FDT_SIMPLEFB is set
authorMartin Stolpe <martinstolpe@gmail.com>
Wed, 23 Oct 2024 13:09:20 +0000 (15:09 +0200)
committerPeter Robinson <pbrobinson@gmail.com>
Thu, 13 Mar 2025 11:06:16 +0000 (11:06 +0000)
The functions fdt_simplefb_add_node and fdt_simplefb_enable_and_mem_rsv
are only available if CONFIG_FDT_SIMPLEFB is enabled.

Signed-off-by: Martin Stolpe <martin.stolpe@gmail.com>
Acked-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
board/raspberrypi/rpi/rpi.c

index 4d546892842ac746b2ff0c09cc8c9f31710fe627..fe6153b388bbbb700ff3025edc27c626ff304506 100644 (file)
@@ -604,11 +604,13 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 
        update_fdt_from_fw(blob, (void *)fw_dtb_pointer);
 
-       node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
-       if (node < 0)
-               fdt_simplefb_add_node(blob);
-       else
-               fdt_simplefb_enable_and_mem_rsv(blob);
+       if (CONFIG_IS_ENABLED(FDT_SIMPLEFB)) {
+               node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
+               if (node < 0)
+                       fdt_simplefb_add_node(blob);
+               else
+                       fdt_simplefb_enable_and_mem_rsv(blob);
+       }
 
 #ifdef CONFIG_EFI_LOADER
        /* Reserve the spin table */