summaryrefslogtreecommitdiff
path: root/include/sbi_utils/sys/clint.h
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2019-06-19 00:54:03 +0300
committerAnup Patel <anup.patel@wdc.com>2019-06-19 07:18:56 +0300
commit793e5e1184f04012804914bd922e68536f3b68dd (patch)
treecb2ec2a81ed5e832de5c9c8a79dca17fce599af8 /include/sbi_utils/sys/clint.h
parent98aaf8317b74414afa78078bc056670f46c45f41 (diff)
downloadopensbi-793e5e1184f04012804914bd922e68536f3b68dd.tar.xz
platform: Move platform common to lib/utils.
Currently, platform/common contains platform/non-platform specific common minimal drivers and libraries. This is helpful is all platforms are built within opensbi framework. Move them to lib/utils so that any external platform code also can reuse the minimalistic drivers or other common libraries. This patch doesn't introduce any functional changes. Signed-off-by: Atish Patra <atish.patra@wdc.com> Acked-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi_utils/sys/clint.h')
-rw-r--r--include/sbi_utils/sys/clint.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/sbi_utils/sys/clint.h b/include/sbi_utils/sys/clint.h
new file mode 100644
index 0000000..78e1209
--- /dev/null
+++ b/include/sbi_utils/sys/clint.h
@@ -0,0 +1,35 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2019 Western Digital Corporation or its affiliates.
+ *
+ * Authors:
+ * Anup Patel <anup.patel@wdc.com>
+ */
+
+#ifndef __SYS_CLINT_H__
+#define __SYS_CLINT_H__
+
+#include <sbi/sbi_types.h>
+
+void clint_ipi_send(u32 target_hart);
+
+void clint_ipi_sync(u32 target_hart);
+
+void clint_ipi_clear(u32 target_hart);
+
+int clint_warm_ipi_init(void);
+
+int clint_cold_ipi_init(unsigned long base, u32 hart_count);
+
+u64 clint_timer_value(void);
+
+void clint_timer_event_stop(void);
+
+void clint_timer_event_start(u64 next_event);
+
+int clint_warm_timer_init(void);
+
+int clint_cold_timer_init(unsigned long base, u32 hart_count);
+
+#endif