Commit 8166c100 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski
Browse files

ARM: s3c64xx: switch to generic watchdog driver reset



Similarly to commit f6361c6b ("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: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
parent 7dd3cae9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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

+0 −16
Original line number Diff line number Diff line
@@ -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);
}
+0 −2
Original line number Diff line number Diff line
@@ -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);
+0 −1
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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
Loading