diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-08-04 21:26:48 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2020-08-19 20:57:38 +0200 |
commit | 8166c10001b2642cd7b68be93d0dc66b90b06629 (patch) | |
tree | a7c3125199e7de33451c27c29e476b585d4039b9 /arch/arm/mach-s3c64xx | |
parent | 7dd3cae90d856e97e93bc1c32904e5aed7210f7b (diff) | |
download | linux-8166c10001b2642cd7b68be93d0dc66b90b06629.tar.bz2 |
ARM: s3c64xx: switch to generic watchdog driver reset
Similarly to commit f6361c6b3880 ("ARM: S3C24XX: remove separate restart
code"), the platform watchdog reset code can be removed in favor of
a generic watchdog driver which already handles reset.
This allows removal of a bunch of machine code and fixes also W=1
compile warnings:
arch/arm/plat-samsung/watchdog-reset.c:29:6: warning: no previous prototype for 'samsung_wdt_reset' [-Wmissing-prototypes]
arch/arm/plat-samsung/watchdog-reset.c:69:13: warning: no previous prototype for 'samsung_wdt_reset_of_init' [-Wmissing-prototypes]
arch/arm/plat-samsung/watchdog-reset.c:89:13: warning: no previous prototype for 'samsung_wdt_reset_init' [-Wmissing-prototypes]
The generic watchdog-based system reset is not exactly the same as
before. The previous method had a fallback to soft_restart() which now
is gone.
The commit also removes a FIXME note about calling s3c64xx_clk_init()
inside s3c64xx_init_irq(). No one fixed this since long time and the
note is not meaningful anymore because watchdog part is removed.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/common.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-anw6410.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-crag6410.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-hmt.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-mini6410.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-ncp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-real6410.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smartq5.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smartq7.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/watchdog-reset.h | 16 |
15 files changed, 2 insertions, 62 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index e208c2b48853..f3fcb570edf5 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig @@ -18,9 +18,10 @@ menuconfig ARCH_S3C64XX select PM_GENERIC_DOMAINS if PM select S3C_DEV_NAND if ATAGS select S3C_GPIO_TRACK if ATAGS + select S3C2410_WATCHDOG select SAMSUNG_ATAGS if ATAGS select SAMSUNG_WAKEMASK if PM - select SAMSUNG_WDT_RESET + select WATCHDOG help Samsung S3C64XX series based systems diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index a655bf0c7802..c9c20256488b 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -50,7 +50,6 @@ #include "common.h" #include "irq-uart.h" -#include "watchdog-reset.h" /* External clock frequency */ static unsigned long xtal_f __ro_after_init = 12000000; @@ -229,13 +228,7 @@ core_initcall(s3c64xx_dev_init); void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) { - /* - * FIXME: there is no better place to put this at the moment - * (s3c64xx_clk_init needs ioremap and must happen before init_time - * samsung_wdt_reset_init needs clocks) - */ s3c64xx_clk_init(NULL, xtal_f, xusbxti_f, soc_is_s3c6400(), S3C_VA_SYS); - samsung_wdt_reset_init(S3C_VA_WATCHDOG); printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); @@ -429,12 +422,3 @@ static int __init s3c64xx_init_irq_eint(void) return 0; } arch_initcall(s3c64xx_init_irq_eint); - -void s3c64xx_restart(enum reboot_mode mode, const char *cmd) -{ - if (mode != REBOOT_SOFT) - samsung_wdt_reset(); - - /* if all else fails, or mode was for soft, jump to 0 */ - soft_restart(0); -} diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h index 6fcfb0e0ffa5..567bf3017171 100644 --- a/arch/arm/mach-s3c64xx/common.h +++ b/arch/arm/mach-s3c64xx/common.h @@ -19,8 +19,6 @@ void s3c64xx_init_irq(u32 vic0, u32 vic1); void s3c64xx_init_io(struct map_desc *mach_desc, int size); -void s3c64xx_restart(enum reboot_mode mode, const char *cmd); - struct device_node; void s3c64xx_set_xtal_freq(unsigned long freq); void s3c64xx_set_xusbxti_freq(unsigned long freq); diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 495549573d36..e783f5b3593a 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c @@ -228,5 +228,4 @@ MACHINE_START(ANW6410, "A&W6410") .map_io = anw6410_map_io, .init_machine = anw6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 3cb43a33e3f8..223a3d51d8b6 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -877,5 +877,4 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") .map_io = crag6410_map_io, .init_machine = crag6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index cadb63103517..ad15260c12b4 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c @@ -280,5 +280,4 @@ MACHINE_START(HMT, "Airgoo-HMT") .map_io = hmt_map_io, .init_machine = hmt_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 77bad2891020..636d312add81 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c @@ -362,5 +362,4 @@ MACHINE_START(MINI6410, "MINI6410") .map_io = mini6410_map_io, .init_machine = mini6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index a7c328d32824..0a67ff173575 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c @@ -98,5 +98,4 @@ MACHINE_START(NCP, "NCP") .map_io = ncp_map_io, .init_machine = ncp_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 993ce7bdd740..56fc21f02c7b 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c @@ -330,5 +330,4 @@ MACHINE_START(REAL6410, "REAL6410") .map_io = real6410_map_io, .init_machine = real6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c index 1724f5ea5c46..09c4e8742629 100644 --- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c @@ -12,7 +12,6 @@ #include <mach/map.h> #include "common.h" -#include "watchdog-reset.h" /* * IO mapping for shared system controller IP. @@ -39,20 +38,6 @@ static void __init s3c64xx_dt_map_io(void) panic("SoC is not S3C64xx!"); } -static void __init s3c64xx_dt_init_machine(void) -{ - samsung_wdt_reset_of_init(); -} - -static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd) -{ - if (mode != REBOOT_SOFT) - samsung_wdt_reset(); - - /* if all else fails, or mode was for soft, jump to 0 */ - soft_restart(0); -} - static const char *const s3c64xx_dt_compat[] __initconst = { "samsung,s3c6400", "samsung,s3c6410", @@ -63,6 +48,4 @@ DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)") /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */ .dt_compat = s3c64xx_dt_compat, .map_io = s3c64xx_dt_map_io, - .init_machine = s3c64xx_dt_init_machine, - .restart = s3c64xx_dt_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index c1d173a97f2a..789876a20534 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c @@ -151,5 +151,4 @@ MACHINE_START(SMARTQ5, "SmartQ 5") .map_io = smartq_map_io, .init_machine = smartq5_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index 493fd8cd83eb..d004e34b63bb 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c @@ -167,5 +167,4 @@ MACHINE_START(SMARTQ7, "SmartQ 7") .map_io = smartq_map_io, .init_machine = smartq7_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index 76b676b6acbb..d24899dd3883 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c @@ -88,5 +88,4 @@ MACHINE_START(SMDK6400, "SMDK6400") .map_io = smdk6400_map_io, .init_machine = smdk6400_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 3bd13701d01c..104548fb192a 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -704,5 +704,4 @@ MACHINE_START(SMDK6410, "SMDK6410") .map_io = smdk6410_map_io, .init_machine = smdk6410_machine_init, .init_time = samsung_timer_init, - .restart = s3c64xx_restart, MACHINE_END diff --git a/arch/arm/mach-s3c64xx/watchdog-reset.h b/arch/arm/mach-s3c64xx/watchdog-reset.h deleted file mode 100644 index 1042d6c463dc..000000000000 --- a/arch/arm/mach-s3c64xx/watchdog-reset.h +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (c) 2008 Simtec Electronics - * Ben Dooks <ben@simtec.co.uk> - * - * S3C2410 - System define for arch_reset() function - */ - -#ifndef __PLAT_SAMSUNG_WATCHDOG_RESET_H -#define __PLAT_SAMSUNG_WATCHDOG_RESET_H - -extern void samsung_wdt_reset(void); -extern void samsung_wdt_reset_of_init(void); -extern void samsung_wdt_reset_init(void __iomem *base); - -#endif /* __PLAT_SAMSUNG_WATCHDOG_RESET_H */ |