mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-16 16:23:14 +00:00
737fd142de
On RISC-V the sandbox must provide the /chosen/boot-hartid in the devicetree. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
25 lines
466 B
C
25 lines
466 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#define LOG_CATEGORY LOGC_ARCH
|
|
|
|
#include <common.h>
|
|
#include <fdt_support.h>
|
|
#include <log.h>
|
|
|
|
#if defined(__riscv)
|
|
int arch_fixup_fdt(void *blob)
|
|
{
|
|
int ret;
|
|
|
|
ret = fdt_find_or_add_subnode(blob, 0, "chosen");;
|
|
if (ret < 0)
|
|
goto err;
|
|
ret = fdt_setprop_u32(blob, ret, "boot-hartid", 1);
|
|
if (ret < 0)
|
|
goto err;
|
|
return 0;
|
|
err:
|
|
log_err("Setting /chosen/boot-hartid failed: %s\n", fdt_strerror(ret));
|
|
return ret;
|
|
}
|
|
#endif
|