summaryrefslogtreecommitdiff
path: root/board/openpiton/riscv64/openpiton-riscv64.c
diff options
context:
space:
mode:
authorTianrui Wei <tianrui-wei@outlook.com>2021-07-01 07:54:19 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-07-06 08:50:56 +0300
commit8a44fe69439438797b93b2e7dd70e1a8fad31519 (patch)
tree327e92caeef61a85ca5c9fc1824673764736d59a /board/openpiton/riscv64/openpiton-riscv64.c
parentfe01f41d57b79d9ca94604503a25e55175744d42 (diff)
downloadu-boot-8a44fe69439438797b93b2e7dd70e1a8fad31519.tar.xz
board: riscv: add openpiton-riscv64 SoC support
This patch adds openpiton-riscv64 SOC support. In particular, this board supports a standard bootflow through zsbl->u-boot SPL-> opensbi->u-boot proper->Linux. There are separate defconfigs for building u-boot SPL and u-boot proper Signed-off-by: Tianrui Wei <tianrui-wei@outlook.com> Signed-off-by: Jonathan Balkind <jbalkind@ucsb.edu> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'board/openpiton/riscv64/openpiton-riscv64.c')
-rw-r--r--board/openpiton/riscv64/openpiton-riscv64.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/board/openpiton/riscv64/openpiton-riscv64.c b/board/openpiton/riscv64/openpiton-riscv64.c
new file mode 100644
index 0000000000..f2282d1548
--- /dev/null
+++ b/board/openpiton/riscv64/openpiton-riscv64.c
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2019 SiFive, Inc
+ * Copyright (c) 2021 Tianrui Wei
+ *
+ *
+ * Authors:
+ * Pragnesh Patel <pragnesh.patel@sifive.com>
+ * Tianrui Wei <tianrui-wei@outlook.com>
+ */
+#include <common.h>
+#include <init.h>
+#include <configs/openpiton-riscv64.h>
+#include <dm.h>
+#include <spl.h>
+
+#ifdef CONFIG_SPL
+void board_boot_order(u32 *spl_boot_list)
+{
+ u8 i;
+ u32 boot_devices[] = {
+ BOOT_DEVICE_MMC1,
+ };
+
+ for (i = 0; i < ARRAY_SIZE(boot_devices); i++)
+ spl_boot_list[i] = boot_devices[i];
+}
+#endif
+
+int board_init(void)
+{
+ return 0;
+}