realtek: use kernel defined halt
authorSander Vanheule <sander@svanheule.net>
Sat, 12 Dec 2020 16:02:00 +0000 (17:02 +0100)
committerPetr Štetiar <ynezz@true.cz>
Tue, 22 Dec 2020 18:11:50 +0000 (19:11 +0100)
If _machine_hang is not defined on MIPS, the kernel will check if the
CPU can enter a more power efficient sleep mode. Since the realtek
platform supports mips32_r2, this should issue a WAIT instruction
instead of a trivial infinite loop.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/realtek/files-5.4/arch/mips/rtl838x/setup.c

index dbabb0354b1b690a90ea21ecd122f9ad61592cc9..24c70b82744505fbbe74bfd92e3b8346b6fb3c5b 100644 (file)
@@ -59,19 +59,12 @@ static void rtl838x_restart(char *command)
        sw_w32(1, RTL838X_RST_GLB_CTRL_1);
 }
 
-static void rtl838x_halt(void)
-{
-       pr_info("System halted.\n");
-       while(1);
-}
-
 void __init plat_mem_setup(void)
 {
        void *dtb;
 
        set_io_port_base(KSEG1);
        _machine_restart = rtl838x_restart;
-       _machine_halt = rtl838x_halt;
 
        if (fw_passed_dtb) /* UHI interface */
                dtb = (void *)fw_passed_dtb;