summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2021-05-20 10:30:46 +0300
committerAnup Patel <anup@brainfault.org>2021-06-24 07:09:44 +0300
commit5a049fe1d6a5d1c381113853fce3afad6573bb56 (patch)
tree174665abdf6afd99d080fc156dae1a77f3255799 /include
parent4519e29c51315205119ce03ff0e5152def647ed5 (diff)
downloadopensbi-5a049fe1d6a5d1c381113853fce3afad6573bb56.tar.xz
lib: utils/ipi: Add ACLINT MSWI library
We add common ACLINT MSWI library similar to the CLINT library so that OpenSBI platforms can use it. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Xiang W <wxjstz@126.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/ipi/aclint_mswi.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/sbi_utils/ipi/aclint_mswi.h b/include/sbi_utils/ipi/aclint_mswi.h
new file mode 100644
index 0000000..e373a8c
--- /dev/null
+++ b/include/sbi_utils/ipi/aclint_mswi.h
@@ -0,0 +1,33 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2021 Western Digital Corporation or its affiliates.
+ *
+ * Authors:
+ * Anup Patel <anup.patel@wdc.com>
+ */
+
+#ifndef __IPI_ACLINT_MSWI_H__
+#define __IPI_ACLINT_MSWI_H__
+
+#include <sbi/sbi_types.h>
+
+#define ACLINT_MSWI_ALIGN 0x1000
+#define ACLINT_MSWI_SIZE 0x4000
+#define ACLINT_MSWI_MAX_HARTS 4095
+
+#define CLINT_MSWI_OFFSET 0x0000
+
+struct aclint_mswi_data {
+ /* Public details */
+ unsigned long addr;
+ unsigned long size;
+ u32 first_hartid;
+ u32 hart_count;
+};
+
+int aclint_mswi_warm_init(void);
+
+int aclint_mswi_cold_init(struct aclint_mswi_data *mswi);
+
+#endif