summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-08-19 08:23:01 -0400
committerTom Rini <trini@konsulko.com>2021-08-19 08:23:01 -0400
commit79d389a54891a67269bfa366f044a2079409e499 (patch)
tree2e75d6990d245098854f7fd7fd67f957ac59af99
parent78e786decb6c8783568044c98891e64289cbf59c (diff)
parent47d73ba4f4a40f17622d93f96b48e285b73c3061 (diff)
downloadu-boot-WIP/19Aug2021.tar.gz
Merge https://source.denx.de/u-boot/custodians/u-boot-riscvWIP/19Aug2021
-rw-r--r--arch/riscv/cpu/fu740/spl.c2
-rw-r--r--board/sifive/unleashed/Makefile4
-rw-r--r--board/sifive/unleashed/unleashed.c11
-rw-r--r--board/sifive/unmatched/Makefile3
-rw-r--r--board/sifive/unmatched/unmatched.c11
-rw-r--r--configs/qemu-riscv64_smode_defconfig2
6 files changed, 29 insertions, 4 deletions
diff --git a/arch/riscv/cpu/fu740/spl.c b/arch/riscv/cpu/fu740/spl.c
index 55e30346ff..c6816e9ed4 100644
--- a/arch/riscv/cpu/fu740/spl.c
+++ b/arch/riscv/cpu/fu740/spl.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright (C) 2020-201 SiFive, Inc
+ * Copyright (C) 2020-2021 SiFive, Inc
* Pragnesh Patel <pragnesh.patel@sifive.com>
*/
diff --git a/board/sifive/unleashed/Makefile b/board/sifive/unleashed/Makefile
index 5821679dd9..98e9111cbc 100644
--- a/board/sifive/unleashed/Makefile
+++ b/board/sifive/unleashed/Makefile
@@ -2,8 +2,8 @@
#
# Copyright (c) 2019 Western Digital Corporation or its affiliates.
-obj-y += unleashed.o
-
ifdef CONFIG_SPL_BUILD
obj-y += spl.o
+else
+obj-y += unleashed.o
endif
diff --git a/board/sifive/unleashed/unleashed.c b/board/sifive/unleashed/unleashed.c
index a4e78220cb..fa65fcade0 100644
--- a/board/sifive/unleashed/unleashed.c
+++ b/board/sifive/unleashed/unleashed.c
@@ -16,6 +16,7 @@
#include <misc.h>
#include <spl.h>
#include <asm/arch/cache.h>
+#include <asm/sections.h>
/*
* This define is a value used for error/unknown serial.
@@ -113,6 +114,16 @@ int misc_init_r(void)
#endif
+void *board_fdt_blob_setup(void)
+{
+ if (IS_ENABLED(CONFIG_OF_SEPARATE)) {
+ if (gd->arch.firmware_fdt_addr)
+ return (ulong *)gd->arch.firmware_fdt_addr;
+ else
+ return (ulong *)&_end;
+ }
+}
+
int board_init(void)
{
int ret;
diff --git a/board/sifive/unmatched/Makefile b/board/sifive/unmatched/Makefile
index e00b330e8c..1345330089 100644
--- a/board/sifive/unmatched/Makefile
+++ b/board/sifive/unmatched/Makefile
@@ -2,9 +2,10 @@
#
# Copyright (c) 2020-2021 SiFive, Inc
-obj-y += unmatched.o
obj-$(CONFIG_ID_EEPROM) += hifive-platform-i2c-eeprom.o
ifdef CONFIG_SPL_BUILD
obj-y += spl.o
+else
+obj-y += unmatched.o
endif
diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c
index 6d60559588..da23a6ce24 100644
--- a/board/sifive/unmatched/unmatched.c
+++ b/board/sifive/unmatched/unmatched.c
@@ -9,6 +9,17 @@
#include <common.h>
#include <dm.h>
#include <asm/arch/cache.h>
+#include <asm/sections.h>
+
+void *board_fdt_blob_setup(void)
+{
+ if (IS_ENABLED(CONFIG_OF_SEPARATE)) {
+ if (gd->arch.firmware_fdt_addr)
+ return (ulong *)gd->arch.firmware_fdt_addr;
+ else
+ return (ulong *)&_end;
+ }
+}
int board_init(void)
{
diff --git a/configs/qemu-riscv64_smode_defconfig b/configs/qemu-riscv64_smode_defconfig
index 0000564e41..4a6416e254 100644
--- a/configs/qemu-riscv64_smode_defconfig
+++ b/configs/qemu-riscv64_smode_defconfig
@@ -6,6 +6,8 @@ CONFIG_ARCH_RV64I=y
CONFIG_RISCV_SMODE=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="setenv fdt_addr ${fdtcontroladdr}; fdt addr ${fdtcontroladdr};"
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_CMD_BOOTEFI_SELFTEST=y