From d7cb08134102b7a2410c48d2a1802193f9031e00 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 29 May 2022 16:23:41 +0300 Subject: continue documentation efforts --- arch/riscv64/kernel/power.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'arch/riscv64/kernel/power.c') 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 #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 -- cgit v1.3