diff options
Diffstat (limited to 'board/raspberrypi/rpi/rpi.c')
-rw-r--r-- | board/raspberrypi/rpi/rpi.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 9122f33d88d..aa39afa338a 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -68,6 +68,19 @@ struct msg_get_clock_rate { u32 end_tag; }; +struct efi_fw_image fw_images[] = { + { + .fw_name = u"RPI_UBOOT", + .image_index = 1, + }, +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "mmc 0=u-boot.bin fat 0 1", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + #ifdef CONFIG_ARM64 #define DTB_DIR "broadcom/" #else @@ -508,15 +521,14 @@ int board_init(void) /* * If the firmware passed a device tree use it for U-Boot. */ -void *board_fdt_blob_setup(int *err) +int board_fdt_blob_setup(void **fdtp) { - *err = 0; - if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) { - *err = -ENXIO; - return NULL; - } + if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) + return -ENXIO; + + *fdtp = (void *)fw_dtb_pointer; - return (void *)fw_dtb_pointer; + return 0; } int copy_property(void *dst, void *src, char *path, char *property) @@ -545,12 +557,15 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) if (fdt == fw_fdt) return; - /* The firmware provides a more precie model; so copy that */ + /* The firmware provides a more precise model; so copy that */ copy_property(fdt, fw_fdt, "/", "model"); /* memory reserve as suggested by the firmware */ copy_property(fdt, fw_fdt, "/", "memreserve"); + /* copy the CMA memory setting from the firmware DT to linux */ + copy_property(fdt, fw_fdt, "/reserved-memory/linux,cma", "size"); + /* Adjust dma-ranges for the SD card and PCI bus as they can depend on * the SoC revision */ |