MIPS: Loongson64: reset: Prioritise firmware service
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 14 Jun 2024 15:40:16 +0000 (16:40 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 21 Jun 2024 08:22:10 +0000 (10:22 +0200)
commit4e7ca0b57f3bc09ba3e4ab86bf6b7c35134bfd04
treeac9facdb755e9ba53815b62e63fbeba77e92626e
parentf4d430db17b4ef4e9c3c352a04b2fe3c93011978
MIPS: Loongson64: reset: Prioritise firmware service

We should always use firmware's poweroff & reboot service
if it's available as firmware may need to perform more task
than platform's syscon etc.

However _machine_restart & poweroff hooks are registered at
low priority, which means platform reboot driver can override
them.

Register firmware based reboot/poweroff implementation with
register_sys_off_handler with appropriate priority so that
they will be prioritised. Remove _machine_halt hook as it's
deemed to be unnecessary.

Cc: stable@vger.kernel.org
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/loongson64/reset.c