riscv: cleanup the default power off implementation
Move the sbi poweroff to a separate function and file that is only compiled if CONFIG_SBI is set. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Atish Patra <atish.patra@wdc.com> [paul.walmsley@sifive.com: split the WFI fix into a separate patch] Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
This commit is contained in:

committed by
Paul Walmsley

parent
3b03ac6bbd
commit
3320648ecc
@@ -5,11 +5,9 @@
|
||||
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/pm.h>
|
||||
#include <asm/sbi.h>
|
||||
|
||||
static void default_power_off(void)
|
||||
{
|
||||
sbi_shutdown();
|
||||
while (1)
|
||||
wait_for_interrupt();
|
||||
}
|
||||
|
Reference in New Issue
Block a user