summaryrefslogtreecommitdiff
path: root/arch/sandbox/lib/fdt_fixup.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-21 21:41:47 -0400
committerTom Rini <trini@konsulko.com>2021-10-21 21:41:47 -0400
commit06685f9de2c1ae37cd015848d245f8a59cbc93dc (patch)
tree5ca4315422f6725caa7b6f77cbc97145e1c6f086 /arch/sandbox/lib/fdt_fixup.c
parentf200a4bcecf1be6d8b546f0eb6af6403c93d80dd (diff)
parentf231566475c545de476a3bf5f596c246c52511aa (diff)
Merge tag 'dm-pull-21oct21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Refactoring of env_get_char() etc. Update buildman to use gcc-11.1.0 Use in-container toolchain for nokia_rx51 CI test # gpg: Signature made Thu 21 Oct 2021 09:34:07 PM EDT # gpg: using RSA key B25C0022AF86A7CC1655B6277F173A3E9008ADE6 # gpg: issuer "sjg@chromium.org" # gpg: Good signature from "Simon Glass <sjg@chromium.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B25C 0022 AF86 A7CC 1655 B627 7F17 3A3E 9008 ADE6
Diffstat (limited to 'arch/sandbox/lib/fdt_fixup.c')
-rw-r--r--arch/sandbox/lib/fdt_fixup.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/sandbox/lib/fdt_fixup.c b/arch/sandbox/lib/fdt_fixup.c
new file mode 100644
index 00000000000..a646f2059c2
--- /dev/null
+++ b/arch/sandbox/lib/fdt_fixup.c
@@ -0,0 +1,25 @@
+// 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