summaryrefslogtreecommitdiff
path: root/arch/riscv/cpu/qemu/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/cpu/qemu/cpu.c')
-rw-r--r--arch/riscv/cpu/qemu/cpu.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/riscv/cpu/qemu/cpu.c b/arch/riscv/cpu/qemu/cpu.c
new file mode 100644
index 0000000000..a064639373
--- /dev/null
+++ b/arch/riscv/cpu/qemu/cpu.c
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#include <common.h>
+#include <command.h>
+
+/*
+ * cleanup_before_linux() is called just before we call linux
+ * it prepares the processor for linux
+ *
+ * we disable interrupt and caches.
+ */
+int cleanup_before_linux(void)
+{
+ disable_interrupts();
+
+ /* turn off I/D-cache */
+
+ return 0;
+}
+
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ printf("reset unsupported yet\n");
+
+ return 0;
+}