summaryrefslogtreecommitdiffstats
path: root/src/soc/ucb/riscv
diff options
context:
space:
mode:
authorXiang Wang <wxjstz@126.com>2018-08-28 16:34:29 +0800
committerPatrick Georgi <pgeorgi@google.com>2018-09-10 15:03:08 +0000
commit2e38dbe5f1a9db76cdf529679faee63fcb6a9c34 (patch)
tree3656f083f5aad2fc009d1038c313b8cfd695895f /src/soc/ucb/riscv
parent0370bcf40ce3a07e6e2d33b8bcebf28a0ac98807 (diff)
downloadcoreboot-2e38dbe5f1a9db76cdf529679faee63fcb6a9c34.tar.gz
coreboot-2e38dbe5f1a9db76cdf529679faee63fcb6a9c34.tar.bz2
coreboot-2e38dbe5f1a9db76cdf529679faee63fcb6a9c34.zip
riscv: update mtime initialization
Add a interface, which is implemented by SoC. Change-Id: I5524732f6eb3841e43afd176644119b03b5e5e27 Signed-off-by: Xiang Wang <wxjstz@126.com> Reviewed-on: https://review.coreboot.org/28372 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Diffstat (limited to 'src/soc/ucb/riscv')
-rw-r--r--src/soc/ucb/riscv/Makefile.inc1
-rw-r--r--src/soc/ucb/riscv/mtime.c22
2 files changed, 23 insertions, 0 deletions
diff --git a/src/soc/ucb/riscv/Makefile.inc b/src/soc/ucb/riscv/Makefile.inc
index 1072a2b32ec9..16225c0968c1 100644
--- a/src/soc/ucb/riscv/Makefile.inc
+++ b/src/soc/ucb/riscv/Makefile.inc
@@ -1,5 +1,6 @@
ifeq ($(CONFIG_SOC_UCB_RISCV),y)
+bootblock-y += mtime.c
romstage-y += cbmem.c
ramstage-y += cbmem.c
diff --git a/src/soc/ucb/riscv/mtime.c b/src/soc/ucb/riscv/mtime.c
new file mode 100644
index 000000000000..f8c27175637d
--- /dev/null
+++ b/src/soc/ucb/riscv/mtime.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 HardenedLinux
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <mcall.h>
+
+/* FIXME: This is an empty implementation, please improve */
+/* This function is used to initialize HLS()->time/HLS()->timecmp */
+void mtime_init(void)
+{
+}