summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/platforms/iss/setup.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2023-06-07 17:59:38 +0200
committerMax Filippov <jcmvbkbc@gmail.com>2023-06-13 04:48:56 +0200
commit7561dfbf3b3451957c5d3fc52f53c78e78ed3034 (patch)
tree9888ce0b5feae5969c04ebc2aaba66dda600bc82 /arch/xtensa/platforms/iss/setup.c
parentxtensa: drop platform_restart (diff)
downloadlinux-7561dfbf3b3451957c5d3fc52f53c78e78ed3034.tar.xz
linux-7561dfbf3b3451957c5d3fc52f53c78e78ed3034.zip
xtensa: drop platform_halt and platform_power_off
Instead of using xtensa-specific platform_halt and platform_power_off callbacks use do_kernel_power_off in the machine_halt and machine_power_off and reimplement existing platform_halt and platform_power_off users with register_sys_off_handler. Drop platform_halt and platform_power_off declarations and default implementations. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/platforms/iss/setup.c')
-rw-r--r--arch/xtensa/platforms/iss/setup.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/xtensa/platforms/iss/setup.c b/arch/xtensa/platforms/iss/setup.c
index a7009f223ef2..0f1fe132691e 100644
--- a/arch/xtensa/platforms/iss/setup.c
+++ b/arch/xtensa/platforms/iss/setup.c
@@ -25,16 +25,11 @@
#include <platform/simcall.h>
-void platform_halt(void)
-{
- pr_info(" ** Called platform_halt() **\n");
- simc_exit(0);
-}
-
-void platform_power_off(void)
+static int iss_power_off(struct sys_off_data *unused)
{
pr_info(" ** Called platform_power_off() **\n");
simc_exit(0);
+ return NOTIFY_DONE;
}
static int iss_restart(struct notifier_block *this,
@@ -90,4 +85,7 @@ void __init platform_setup(char **p_cmdline)
atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block);
register_restart_handler(&iss_restart_block);
+ register_sys_off_handler(SYS_OFF_MODE_POWER_OFF,
+ SYS_OFF_PRIO_PLATFORM,
+ iss_power_off, NULL);
}