X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Fraspberrypi%2Frpi%2Frpi.c;h=17b8108cc88f84b5b841b8109ca78ab5b12c94c5;hb=4afab30caea3211032710c4298a8839d3254e7f7;hp=74697ba2f1654168afd202e0279afdf469d5acc2;hpb=07298e4828b7d0904fbfd77d386f01b4a37a5609;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 74697ba..17b8108 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -72,7 +72,7 @@ struct msg_get_clock_rate { #endif /* - * https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md + * https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes */ struct rpi_model { const char *name; @@ -157,6 +157,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { DTB_DIR "bcm2711-rpi-4-b.dtb", true, }, + [0x12] = { + "Zero 2 W", + DTB_DIR "bcm2837-rpi-zero-2.dtb", + false, + }, [0x13] = { "400", DTB_DIR "bcm2711-rpi-400.dtb", @@ -488,21 +493,24 @@ int board_init(void) /* * If the firmware passed a device tree use it for U-Boot. */ -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { - if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) + *err = 0; + if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) { + *err = -ENXIO; return NULL; + } + return (void *)fw_dtb_pointer; } 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) + fdt_simplefb_add_node(blob); #ifdef CONFIG_EFI_LOADER /* Reserve the spin table */