summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_platform.h13
-rw-r--r--include/sbi/sbi_timer.h4
2 files changed, 15 insertions, 2 deletions
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
index 72bb7e29..02007af5 100644
--- a/include/sbi/sbi_platform.h
+++ b/include/sbi/sbi_platform.h
@@ -125,6 +125,8 @@ struct sbi_platform_operations {
void (*timer_event_stop)(void);
/** Initialize platform timer for current HART */
int (*timer_init)(bool cold_boot);
+ /** Exit platform timer for current HART */
+ void (*timer_exit)(void);
/** Reboot the platform */
int (*system_reboot)(u32 type);
@@ -553,6 +555,17 @@ static inline int sbi_platform_timer_init(const struct sbi_platform *plat,
}
/**
+ * Exit the platform timer for current HART
+ *
+ * @param plat pointer to struct sbi_platform
+ */
+static inline void sbi_platform_timer_exit(const struct sbi_platform *plat)
+{
+ if (plat && sbi_platform_ops(plat)->timer_exit)
+ sbi_platform_ops(plat)->timer_exit();
+}
+
+/**
* Reboot the platform
*
* @param plat pointer to struct sbi_platform
diff --git a/include/sbi/sbi_timer.h b/include/sbi/sbi_timer.h
index c14c8d0d..401be683 100644
--- a/include/sbi/sbi_timer.h
+++ b/include/sbi/sbi_timer.h
@@ -24,12 +24,12 @@ void sbi_timer_set_delta(struct sbi_scratch *scratch, ulong delta);
void sbi_timer_set_delta_upper(struct sbi_scratch *scratch, ulong delta_upper);
-void sbi_timer_event_stop(struct sbi_scratch *scratch);
-
void sbi_timer_event_start(struct sbi_scratch *scratch, u64 next_event);
void sbi_timer_process(struct sbi_scratch *scratch);
int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot);
+void sbi_timer_exit(struct sbi_scratch *scratch);
+
#endif