diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/AndesTech/ax25-ae350/ax25-ae350.c | 4 | ||||
-rw-r--r-- | board/Marvell/octeontx/board-fdt.c | 3 | ||||
-rw-r--r-- | board/Marvell/octeontx2/board-fdt.c | 3 | ||||
-rw-r--r-- | board/Marvell/octeontx2/board.c | 3 | ||||
-rw-r--r-- | board/armltd/vexpress64/vexpress64.c | 7 | ||||
-rw-r--r-- | board/broadcom/bcmstb/bcmstb.c | 3 | ||||
-rw-r--r-- | board/emulation/qemu-arm/qemu-arm.c | 3 | ||||
-rw-r--r-- | board/emulation/qemu-ppce500/qemu-ppce500.c | 3 | ||||
-rw-r--r-- | board/emulation/qemu-riscv/qemu-riscv.c | 3 | ||||
-rw-r--r-- | board/highbank/highbank.c | 3 | ||||
-rw-r--r-- | board/raspberrypi/rpi/rpi.c | 8 | ||||
-rw-r--r-- | board/sifive/unleashed/unleashed.c | 3 | ||||
-rw-r--r-- | board/sifive/unmatched/unmatched.c | 3 | ||||
-rw-r--r-- | board/socrates/socrates.c | 4 | ||||
-rw-r--r-- | board/xen/xenguest_arm64/xenguest_arm64.c | 7 | ||||
-rw-r--r-- | board/xilinx/common/board.c | 3 |
16 files changed, 44 insertions, 19 deletions
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c index b28894ed46..5fb32fd0fd 100644 --- a/board/AndesTech/ax25-ae350/ax25-ae350.c +++ b/board/AndesTech/ax25-ae350/ax25-ae350.c @@ -54,13 +54,15 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) return 0; } -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; #if CONFIG_IS_ENABLED(OF_BOARD) return (void *)(ulong)gd->arch.firmware_fdt_addr; #elif CONFIG_IS_ENABLED(OF_SEPARATE) return (void *)CONFIG_SYS_FDT_BASE; #else + *err = -EINVAL; return NULL; #endif } diff --git a/board/Marvell/octeontx/board-fdt.c b/board/Marvell/octeontx/board-fdt.c index 1db2a4a267..e989c374f2 100644 --- a/board/Marvell/octeontx/board-fdt.c +++ b/board/Marvell/octeontx/board-fdt.c @@ -301,7 +301,8 @@ int ft_board_setup(void *blob, struct bd_info *bd) * * @return FDT base address received from ATF in x1 register */ -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; return (void *)fdt_base_addr; } diff --git a/board/Marvell/octeontx2/board-fdt.c b/board/Marvell/octeontx2/board-fdt.c index a4771af4c1..e2cfe017e8 100644 --- a/board/Marvell/octeontx2/board-fdt.c +++ b/board/Marvell/octeontx2/board-fdt.c @@ -215,7 +215,8 @@ int ft_board_setup(void *blob, struct bd_info *bd) * * @return FDT base address received from ATF in x1 register */ -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; return (void *)fdt_base_addr; } diff --git a/board/Marvell/octeontx2/board.c b/board/Marvell/octeontx2/board.c index 4e8cb839f5..63aa2d6134 100644 --- a/board/Marvell/octeontx2/board.c +++ b/board/Marvell/octeontx2/board.c @@ -226,12 +226,13 @@ static int do_go_uboot(struct cmd_tbl *cmdtp, int flag, int argc, uboot_entry_t entry; ulong addr; void *fdt; + int err; if (argc < 2) return CMD_RET_USAGE; addr = hextoul(argv[1], NULL); - fdt = board_fdt_blob_setup(); + fdt = board_fdt_blob_setup(&err); entry = (uboot_entry_t)addr; flush_cache((ulong)addr, 1 << 20); /* 1MiB should be enough */ dcache_disable(); diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index 2e4260286b..d2f307cca5 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/board/armltd/vexpress64/vexpress64.c @@ -131,12 +131,15 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname) return ~0; } -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { phys_addr_t fdt_rom_addr = find_dtb_in_nor_flash(CONFIG_JUNO_DTB_PART); - if (fdt_rom_addr == ~0UL) + *err = 0; + if (fdt_rom_addr == ~0UL) { + *err = -ENXIO; return NULL; + } return (void *)fdt_rom_addr; } diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c index 723ebda3bd..07aeb0981c 100644 --- a/board/broadcom/bcmstb/bcmstb.c +++ b/board/broadcom/bcmstb/bcmstb.c @@ -131,8 +131,9 @@ int board_late_init(void) return 0; } -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; /* Stored the DTB address there during our init */ return (void *)prior_stage_fdt_address; } diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index aa68bef469..16d5a97167 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -94,8 +94,9 @@ int dram_init_banksize(void) return 0; } -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; /* QEMU loads a generated DTB for us at the start of RAM. */ return (void *)CONFIG_SYS_SDRAM_BASE; } diff --git a/board/emulation/qemu-ppce500/qemu-ppce500.c b/board/emulation/qemu-ppce500/qemu-ppce500.c index 924cc02c4b..7d8ba34b25 100644 --- a/board/emulation/qemu-ppce500/qemu-ppce500.c +++ b/board/emulation/qemu-ppce500/qemu-ppce500.c @@ -333,8 +333,9 @@ u32 cpu_mask(void) * * @return virtual address of FDT received from QEMU in r3 register */ -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; return get_fdt_virt(); } diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c index 2a26e265ff..b0d9dd59b1 100644 --- a/board/emulation/qemu-riscv/qemu-riscv.c +++ b/board/emulation/qemu-riscv/qemu-riscv.c @@ -72,8 +72,9 @@ int board_fit_config_name_match(const char *name) } #endif -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; /* Stored the DTB address there during our init */ return (void *)(ulong)gd->arch.firmware_fdt_addr; } diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index ffb6fd922d..b5fa5101e8 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -111,8 +111,9 @@ int ft_board_setup(void *fdt, struct bd_info *bd) } #endif -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; /* * The ECME management processor loads the DTB from NOR flash * into DRAM (at 4KB), where it gets patched to contain the diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 0c7d58d18d..55afaa54d9 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -488,10 +488,14 @@ 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; } diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c index e7d2332d8c..3c3e0e1d0d 100644 --- a/board/sifive/unleashed/unleashed.c +++ b/board/sifive/unleashed/unleashed.c @@ -114,8 +114,9 @@ int misc_init_r(void) #endif -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c index 93c452c57f..4895909f8d 100644 --- a/board/sifive/unmatched/unmatched.c +++ b/board/sifive/unmatched/unmatched.c @@ -11,8 +11,9 @@ #include <dm.h> #include <asm/sections.h> -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { + *err = 0; if (IS_ENABLED(CONFIG_OF_SEPARATE)) { if (gd->arch.firmware_fdt_addr) return (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr; diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 3ba2fbbd56..a81cb7b2ba 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -220,13 +220,15 @@ int ft_board_setup(void *blob, struct bd_info *bd) #endif /* CONFIG_OF_BOARD_SETUP */ #if defined(CONFIG_OF_SEPARATE) -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { void *fw_dtb; + *err = 0; fw_dtb = (void *)(CONFIG_SYS_TEXT_BASE - CONFIG_ENV_SECT_SIZE); if (fdt_magic(fw_dtb) != FDT_MAGIC) { printf("DTB is not passed via %x\n", (u32)fw_dtb); + *err = -ENXIO; return NULL; } diff --git a/board/xen/xenguest_arm64/xenguest_arm64.c b/board/xen/xenguest_arm64/xenguest_arm64.c index da0ddeefff..6e10bba76b 100644 --- a/board/xen/xenguest_arm64/xenguest_arm64.c +++ b/board/xen/xenguest_arm64/xenguest_arm64.c @@ -39,10 +39,13 @@ int board_init(void) * x0 is the physical address of the device tree blob (dtb) in system RAM. * This is stored in rom_pointer during low level init. */ -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { - if (fdt_magic(rom_pointer[0]) != FDT_MAGIC) + *err = 0; + if (fdt_magic(rom_pointer[0]) != FDT_MAGIC) { + *err = -ENXIO; return NULL; + } return (void *)rom_pointer[0]; } diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 9006bd3b4d..78a5d0efa8 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -320,10 +320,11 @@ __maybe_unused int xilinx_read_eeprom(void) } #if defined(CONFIG_OF_BOARD) || defined(CONFIG_OF_SEPARATE) -void *board_fdt_blob_setup(void) +void *board_fdt_blob_setup(int *err) { void *fdt_blob; + *err = 0; if (!IS_ENABLED(CONFIG_SPL_BUILD) && !IS_ENABLED(CONFIG_VERSAL_NO_DDR) && !IS_ENABLED(CONFIG_ZYNQMP_NO_DDR)) { |