mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-16 12:16:59 +02:00
It's common for S-Mode proper U-Boot to retrieve a FDT blob along with taking control from SBI firmware. Add a weak version of board_fdt_blob_setup to make use of it by default, avoiding copy-pasting similar functions among boards. Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
20 lines
349 B
C
20 lines
349 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* RISC-V-specific handling of firmware FDT
|
|
*/
|
|
|
|
#include <asm/global_data.h>
|
|
#include <linux/errno.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
__weak int board_fdt_blob_setup(void **fdtp)
|
|
{
|
|
if (!gd->arch.firmware_fdt_addr)
|
|
return -EEXIST;
|
|
|
|
*fdtp = (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr;
|
|
|
|
return 0;
|
|
}
|