aboutsummaryrefslogtreecommitdiff
path: root/include/sbi/sbi_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sbi/sbi_system.h')
-rw-r--r--include/sbi/sbi_system.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sbi/sbi_system.h b/include/sbi/sbi_system.h
index 34ba766..a9fa546 100644
--- a/include/sbi/sbi_system.h
+++ b/include/sbi/sbi_system.h
@@ -12,6 +12,22 @@
#include <sbi/sbi_types.h>
+/** System reset hardware device */
+struct sbi_system_reset_device {
+ /** Name of the system reset device */
+ char name[32];
+
+ /* Check whether reset type and reason supported by the device */
+ int (*system_reset_check)(u32 reset_type, u32 reset_reason);
+
+ /** Reset the system */
+ void (*system_reset)(u32 reset_type, u32 reset_reason);
+};
+
+const struct sbi_system_reset_device *sbi_system_reset_get_device(void);
+
+void sbi_system_reset_set_device(const struct sbi_system_reset_device *dev);
+
bool sbi_system_reset_supported(u32 reset_type, u32 reset_reason);
void __noreturn sbi_system_reset(u32 reset_type, u32 reset_reason);