mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
3320648ecc
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>
18 lines
269 B
C
18 lines
269 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/pm.h>
|
|
#include <asm/sbi.h>
|
|
|
|
static void sbi_power_off(void)
|
|
{
|
|
sbi_shutdown();
|
|
}
|
|
|
|
static int __init sbi_init(void)
|
|
{
|
|
pm_power_off = sbi_power_off;
|
|
return 0;
|
|
}
|
|
early_initcall(sbi_init);
|