mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00

Remove and replace common.h and config.h in sandbox when it's not needed and add some explicit includes where needed. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
24 lines
446 B
C
24 lines
446 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#define LOG_CATEGORY LOGC_ARCH
|
|
|
|
#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
|