Files
system76-coreboot/src/include/reset.h
Nico Huber d44221f9c8 Move compiler.h to commonlib
Its spreading copies got out of sync. And as it is not a standard header
but used in commonlib code, it belongs into commonlib. While we are at
it, always include it via GCC's `-include` switch.

Some Windows and BSD quirk handling went into the util copies. We always
guard from redefinitions now to prevent further issues.

Change-Id: I850414e6db1d799dce71ff2dc044e6a000ad2552
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/28927
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-10-08 16:57:27 +00:00

31 lines
1.0 KiB
C

#ifndef RESET_H
#define RESET_H
/* Generic reset functions. Call from code that wants to trigger a reset. */
/* Super-hard reset specific to some Intel SoCs. */
__noreturn void global_reset(void);
/* Full board reset. Resets SoC and most/all board components (e.g. DRAM). */
__noreturn void hard_reset(void);
/* Board reset. Resets SoC some board components (e.g. TPM but not DRAM). */
__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