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.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/sbi/sbi_system.h b/include/sbi/sbi_system.h
index a9fa546..84c2813 100644
--- a/include/sbi/sbi_system.h
+++ b/include/sbi/sbi_system.h
@@ -11,6 +11,7 @@
#define __SBI_SYSTEM_H__
#include <sbi/sbi_types.h>
+#include <sbi/sbi_list.h>
/** System reset hardware device */
struct sbi_system_reset_device {
@@ -22,11 +23,21 @@ struct sbi_system_reset_device {
/** Reset the system */
void (*system_reset)(u32 reset_type, u32 reset_reason);
+
+ /** List */
+ struct sbi_dlist node;
};
-const struct sbi_system_reset_device *sbi_system_reset_get_device(void);
+static inline struct sbi_system_reset_device *to_system_reset_device(
+ struct sbi_dlist *node)
+{
+ return container_of(node, struct sbi_system_reset_device, node);
+}
+
+const struct sbi_system_reset_device *sbi_system_reset_get_device(
+ u32 reset_type, u32 reset_reason);
-void sbi_system_reset_set_device(const struct sbi_system_reset_device *dev);
+void sbi_system_reset_add_device(struct sbi_system_reset_device *dev);
bool sbi_system_reset_supported(u32 reset_type, u32 reset_reason);