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>
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 */