aboutsummaryrefslogtreecommitdiff
path: root/src/include/reset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/reset.h')
-rw-r--r--src/include/reset.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/include/reset.h b/src/include/reset.h
index f7501b53da..934ed9b1fc 100644
--- a/src/include/reset.h
+++ b/src/include/reset.h
@@ -1,15 +1,30 @@
#ifndef RESET_H
#define RESET_H
-#if CONFIG_HAVE_HARD_RESET
-void hard_reset(void);
-#else
-#define hard_reset() do {} while (0)
-#endif
-void soft_reset(void);
-void cpu_reset(void);
-/* Some Intel SoCs use a special reset that is specific to SoC */
-void global_reset(void);
-/* Some Intel SoCs may need to prepare/wait before reset */
-void reset_prepare(void);
+/* Generic reset functions. Call from code that wants to trigger a reset. */
+
+/* Super-hard reset specific to some Intel SoCs. */
+__attribute__((noreturn)) void global_reset(void);
+/* Full board reset. Resets SoC and most/all board components (e.g. DRAM). */
+__attribute__((noreturn)) void hard_reset(void);
+/* Board reset. Resets SoC some board components (e.g. TPM but not DRAM). */
+__attribute__((noreturn)) void soft_reset(void);
+
+/* Reset implementations. Implement these in SoC or mainboard code. Implement
+ at least hard_reset() if possible, others fall back to it if necessary. */
+void do_global_reset(void);
+void do_hard_reset(void);
+void do_soft_reset(void);
+
+enum reset_type { /* listed in order of softness */
+ GLOBAL_RESET,
+ HARD_RESET,
+ SOFT_RESET,
+};
+
+/* Callback that an SoC may override to perform special actions before reset.
+ Take into account that softer resets may fall back to harder resets if not
+ implemented... this will *not* trigger another callback! */
+void soc_reset_prepare(enum reset_type reset_type);
+
#endif