diff options
author | Ivan T. Ivanov <iivanov@suse.de> | 2021-08-10 16:31:14 +0200 |
---|---|---|
committer | Matthias Brugger <mbrugger@suse.com> | 2021-09-15 13:34:06 +0200 |
commit | acc6987e59137485dbac0ee4a07cc349210954f3 (patch) | |
tree | 94e171cc8b5e1e6ccf78defe3fab966c71620901 | |
parent | d28e127171768c618fb4d03ec4d3249527d7dccd (diff) | |
download | u-boot-acc6987e59137485dbac0ee4a07cc349210954f3.tar.gz |
rpi: Conditionally add simple-framebuffer node
It appears that RPi firmware has already added framebuffer
node under /chosen, at least on RPi 2 versions. So check
for this and don't add duplicate node.
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
-rw-r--r-- | board/raspberrypi/rpi/rpi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index df52a4689f..372b26b6f2 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -497,12 +497,11 @@ void *board_fdt_blob_setup(void) int ft_board_setup(void *blob, struct bd_info *bd) { - /* - * For now, we simply always add the simplefb DT node. Later, we - * should be more intelligent, and e.g. only do this if no enabled DT - * node exists for the "real" graphics driver. - */ - lcd_dt_simplefb_add_node(blob); + int node; + + node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer"); + if (node < 0) + lcd_dt_simplefb_add_node(blob); #ifdef CONFIG_EFI_LOADER /* Reserve the spin table */ |