summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Jones <ajones@ventanamicro.com>2023-02-27 13:31:01 +0300
committerAnup Patel <anup@brainfault.org>2023-02-27 17:10:21 +0300
commit8a40306371b7e5dbe20da946edd0ddd9693bfa85 (patch)
treed53beb3a096c376ea2d30261ccd7627325a90bc7 /lib
parent07673fc0633db82db939c0cf896c19ef0a7c548e (diff)
downloadopensbi-8a40306371b7e5dbe20da946edd0ddd9693bfa85.tar.xz
lib: sbi_hsm: Export some functions
A coming patch can make use of a few internal hsm functions if we export them. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/sbi/sbi_hsm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/sbi/sbi_hsm.c b/lib/sbi/sbi_hsm.c
index 294156a..3eeeb58 100644
--- a/lib/sbi/sbi_hsm.c
+++ b/lib/sbi/sbi_hsm.c
@@ -46,7 +46,15 @@ struct sbi_hsm_data {
unsigned long saved_mip;
};
-static inline int __sbi_hsm_hart_get_state(u32 hartid)
+bool sbi_hsm_hart_change_state(struct sbi_scratch *scratch, long oldstate,
+ long newstate)
+{
+ struct sbi_hsm_data *hdata = sbi_scratch_offset_ptr(scratch,
+ hart_data_offset);
+ return __sbi_hsm_hart_change_state(hdata, oldstate, newstate);
+}
+
+int __sbi_hsm_hart_get_state(u32 hartid)
{
struct sbi_hsm_data *hdata;
struct sbi_scratch *scratch;
@@ -328,7 +336,7 @@ static int __sbi_hsm_suspend_default(struct sbi_scratch *scratch)
return 0;
}
-static void __sbi_hsm_suspend_non_ret_save(struct sbi_scratch *scratch)
+void __sbi_hsm_suspend_non_ret_save(struct sbi_scratch *scratch)
{
struct sbi_hsm_data *hdata = sbi_scratch_offset_ptr(scratch,
hart_data_offset);