diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2023-06-06 18:54:10 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2023-06-12 19:48:56 -0700 |
commit | 11976fe2a47aa952b8fec54bc2bd54d57642f650 (patch) | |
tree | 4cd122a0864ab08b5591dc17fbc4a0f113d771a8 /arch/xtensa/platforms/xt2000 | |
parent | 71a5fd7d89fb6e6071f041ba1b55837837ccddb8 (diff) |
xtensa: drop platform_restart
Instead of using xtensa-specific platform_restart callback use
do_kernel_restart in the machine_restart implementation and reimplement
existing platform_restart users with register_restart_handler.
Drop platform_restart declaration and default implementation.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/platforms/xt2000')
-rw-r--r-- | arch/xtensa/platforms/xt2000/setup.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c index dc187684203b..71b57ab50599 100644 --- a/arch/xtensa/platforms/xt2000/setup.c +++ b/arch/xtensa/platforms/xt2000/setup.c @@ -56,14 +56,20 @@ void platform_power_off(void) while (1); } -void platform_restart(void) +static int xt2000_restart(struct notifier_block *this, + unsigned long event, void *ptr) { /* Flush and reset the mmu, simulate a processor reset, and * jump to the reset vector. */ cpu_reset(); - /* control never gets here */ + + return NOTIFY_DONE; } +static struct notifier_block xt2000_restart_block = { + .notifier_call = xt2000_restart, +}; + void __init platform_setup(char** cmdline) { led_print (0, "LINUX "); @@ -140,6 +146,7 @@ static int __init xt2000_setup_devinit(void) platform_device_register(&xt2000_serial8250_device); platform_device_register(&xt2000_sonic_device); mod_timer(&heartbeat_timer, jiffies + HZ / 2); + register_restart_handler(&xt2000_restart_block); return 0; } |