]> Git Repo - u-boot.git/blob - arch/sandbox/lib/fdt_fixup.c
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
[u-boot.git] / arch / sandbox / lib / fdt_fixup.c
1 // SPDX-License-Identifier: GPL-2.0+
2
3 #define LOG_CATEGORY LOGC_ARCH
4
5 #include <fdt_support.h>
6 #include <log.h>
7
8 #if defined(__riscv)
9 int arch_fixup_fdt(void *blob)
10 {
11         int ret;
12
13         ret = fdt_find_or_add_subnode(blob, 0, "chosen");;
14         if (ret < 0)
15                 goto err;
16         ret = fdt_setprop_u32(blob, ret, "boot-hartid", 1);
17         if (ret < 0)
18                 goto err;
19         return 0;
20 err:
21         log_err("Setting /chosen/boot-hartid failed: %s\n", fdt_strerror(ret));
22         return ret;
23 }
24 #endif
This page took 0.02942 seconds and 4 git commands to generate.