28c69e36fa31557c32f5d101c33e83c158efa6d0
[openwrt/staging/chunkeey.git] / target / linux / generic / backport-5.10 / 860-v5.17-MIPS-ath79-drop-_machine_restart-again.patch
1 From d3115128bdafb62628ab41861a4f06f6d02ac320 Mon Sep 17 00:00:00 2001
2 From: Lech Perczak <lech.perczak@gmail.com>
3 Date: Mon, 10 Jan 2022 23:48:44 +0100
4 Subject: MIPS: ath79: drop _machine_restart again
5
6 Commit 81424d0ad0d4 ("MIPS: ath79: Use the reset controller to restart
7 OF machines") removed setup of _machine_restart on OF machines to use
8 reset handler in reset controller driver.
9 While removing remnants of non-OF machines in commit 3a77e0d75eed
10 ("MIPS: ath79: drop machfiles"), this was introduced again, making it
11 impossible to use additional restart handlers registered through device
12 tree. Drop setting _machine_restart altogether, and ath79_restart
13 function, which is no longer used after this.
14
15 Fixes: 3a77e0d75eed ("MIPS: ath79: drop machfiles")
16 Cc: John Crispin <john@phrozen.org>
17 Cc: Florian Fainelli <f.fainelli@gmail.com>
18 Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
19 Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
20 ---
21 arch/mips/ath79/setup.c | 10 ----------
22 1 file changed, 10 deletions(-)
23
24 diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
25 index 891f495c4c3c01..0ac435fe2dc9aa 100644
26 --- a/arch/mips/ath79/setup.c
27 +++ b/arch/mips/ath79/setup.c
28 @@ -34,15 +34,6 @@
29
30 static char ath79_sys_type[ATH79_SYS_TYPE_LEN];
31
32 -static void ath79_restart(char *command)
33 -{
34 - local_irq_disable();
35 - ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
36 - for (;;)
37 - if (cpu_wait)
38 - cpu_wait();
39 -}
40 -
41 static void ath79_halt(void)
42 {
43 while (1)
44 @@ -234,7 +225,6 @@ void __init plat_mem_setup(void)
45
46 detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
47
48 - _machine_restart = ath79_restart;
49 _machine_halt = ath79_halt;
50 pm_power_off = ath79_halt;
51 }
52 --
53 cgit
54