diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-29 16:23:41 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-29 16:23:41 +0300 |
| commit | d7cb08134102b7a2410c48d2a1802193f9031e00 (patch) | |
| tree | 711498836d6679ca2fc3b4ba9369b7fe53d7a3fa /arch/riscv64/kernel/power.c | |
| parent | e148f38dc937c34b222ba8df8612b3fa2b6bc349 (diff) | |
| download | kmi-d7cb08134102b7a2410c48d2a1802193f9031e00.tar.gz kmi-d7cb08134102b7a2410c48d2a1802193f9031e00.zip | |
continue documentation efforts
Diffstat (limited to 'arch/riscv64/kernel/power.c')
| -rw-r--r-- | arch/riscv64/kernel/power.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/riscv64/kernel/power.c b/arch/riscv64/kernel/power.c index b3a48fd..73500bb 100644 --- a/arch/riscv64/kernel/power.c +++ b/arch/riscv64/kernel/power.c @@ -6,14 +6,26 @@ #include <apos/power.h> #include "sbi.h" -/* shutdown reason */ -#define SBI_NO_REASON 0 +/** + * Shutdown without any particular reason. Only reason kernel is likely to + * need. + */ +#define SBI_NO_REASON 0 + +/** @name Shutdown types. */ +/** @{ */ -/* shutdown type */ -#define SBI_SHUTDOWN 0 +/** Regular shutdown. */ +#define SBI_SHUTDOWN 0 + +/** Cold reboot. */ #define SBI_COLD_REBOOT 1 + +/** Warm reboot. */ #define SBI_WARM_REBOOT 2 +/** @} */ + stat_t poweroff(enum poweroff_type type) { /* TODO: this only shuts down the cpu itself, but may leave the SOC |
