Allow boards to initialize the DT at runtime.
[oweals/u-boot.git] / board / raspberrypi / rpi / rpi.c
index 82da9e5a5a8e1c81cff20863369226bcca5f88af..d3c6ba580f5cadf7e1b387a2d580424c5dcde138 100644 (file)
@@ -470,6 +470,16 @@ int board_init(void)
        return bcm2835_power_on_module(BCM2835_MBOX_POWER_DEVID_USB_HCD);
 }
 
+/*
+ * If the firmware passed a device tree use it for U-Boot.
+ */
+void *board_fdt_blob_setup(void)
+{
+       if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
+               return NULL;
+       return (void *)fw_dtb_pointer;
+}
+
 int ft_board_setup(void *blob, bd_t *bd)
 {
        /*