Skip to content

Commit

Permalink
ARM: 7266/1: restart: S3C64XX: use new restart hook
Browse files Browse the repository at this point in the history
Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Cc: Ben Dooks <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
kgene authored and Russell King committed Jan 5, 2012
1 parent b27b072 commit ff84ded
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 7 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-s3c64xx/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <plat/irq-vic-timer.h>
#include <plat/regs-irqtype.h>
#include <plat/regs-serial.h>
#include <plat/watchdog-reset.h>

#include "common.h"

Expand Down Expand Up @@ -373,3 +374,12 @@ static int __init s3c64xx_init_irq_eint(void)
return 0;
}
arch_initcall(s3c64xx_init_irq_eint);

void s3c64xx_restart(char mode, const char *cmd)
{
if (mode != 's')
arch_wdt_reset();

/* if all else fails, or mode was for soft, jump to 0 */
soft_restart(0);
}
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c64xx/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);
void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit);
void s3c64xx_setup_clocks(void);

void s3c64xx_restart(char mode, const char *cmd);

extern struct syscore_ops s3c64xx_irq_syscore_ops;
extern struct sysdev_class s3c64xx_sysclass;

Expand Down
7 changes: 0 additions & 7 deletions arch/arm/mach-s3c64xx/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,13 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__

#include <plat/watchdog-reset.h>

static void arch_idle(void)
{
/* nothing here yet */
}

static void arch_reset(char mode, const char *cmd)
{
if (mode != 's')
arch_wdt_reset();

/* if all else fails, or mode was for soft, jump to 0 */
soft_restart(0);
}

#endif /* __ASM_ARCH_IRQ_H */
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-anw6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,5 @@ MACHINE_START(ANW6410, "A&W6410")
.map_io = anw6410_map_io,
.init_machine = anw6410_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-crag6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,4 +715,5 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
.map_io = crag6410_map_io,
.init_machine = crag6410_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-hmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,5 @@ MACHINE_START(HMT, "Airgoo-HMT")
.map_io = hmt_map_io,
.init_machine = hmt_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-mini6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,5 @@ MACHINE_START(MINI6410, "MINI6410")
.map_io = mini6410_map_io,
.init_machine = mini6410_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-ncp.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@ MACHINE_START(NCP, "NCP")
.map_io = ncp_map_io,
.init_machine = ncp_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-real6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,5 @@ MACHINE_START(REAL6410, "REAL6410")
.map_io = real6410_map_io,
.init_machine = real6410_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-smartq5.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,5 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
.map_io = smartq_map_io,
.init_machine = smartq5_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-smartq7.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ MACHINE_START(SMARTQ7, "SmartQ 7")
.map_io = smartq_map_io,
.init_machine = smartq7_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-smdk6400.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ MACHINE_START(SMDK6400, "SMDK6400")
.map_io = smdk6400_map_io,
.init_machine = smdk6400_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/mach-s3c64xx/mach-smdk6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,5 @@ MACHINE_START(SMDK6410, "SMDK6410")
.map_io = smdk6410_map_io,
.init_machine = smdk6410_machine_init,
.timer = &s3c24xx_timer,
.restart = s3c64xx_restart,
MACHINE_END
1 change: 1 addition & 0 deletions arch/arm/plat-samsung/include/plat/watchdog-reset.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/delay.h>

static inline void arch_wdt_reset(void)
{
Expand Down

0 comments on commit ff84ded

Please sign in to comment.