[ARM] S3C64XX: Use common watchdog reset for system reset.

Use the newly moved <plat/watchdog-reset.h> to perform the
arch_reset() call which has been unimplemented for a while.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
Ben Dooks 2009-05-17 23:40:30 +01:00
parent 3cba5ef862
commit 543899f610
4 changed files with 14 additions and 1 deletions

View File

@ -40,6 +40,7 @@
#define S3C64XX_PA_FB (0x77100000) #define S3C64XX_PA_FB (0x77100000)
#define S3C64XX_PA_USB_HSOTG (0x7C000000) #define S3C64XX_PA_USB_HSOTG (0x7C000000)
#define S3C64XX_PA_WATCHDOG (0x7E004000)
#define S3C64XX_PA_SYSCON (0x7E00F000) #define S3C64XX_PA_SYSCON (0x7E00F000)
#define S3C64XX_PA_TIMER (0x7F006000) #define S3C64XX_PA_TIMER (0x7F006000)
#define S3C64XX_PA_IIC0 (0x7F004000) #define S3C64XX_PA_IIC0 (0x7F004000)

View File

@ -11,6 +11,8 @@
#ifndef __ASM_ARCH_SYSTEM_H #ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H __FILE__ #define __ASM_ARCH_SYSTEM_H __FILE__
#include <plat/watchdog-reset.h>
static void arch_idle(void) static void arch_idle(void)
{ {
/* nothing here yet */ /* nothing here yet */
@ -18,7 +20,11 @@ static void arch_idle(void)
static void arch_reset(char mode, const char *cmd) static void arch_reset(char mode, const char *cmd)
{ {
/* nothing here yet */ if (mode != 's')
arch_wdt_reset();
/* if all else fails, or mode was for soft, jump to 0 */
cpu_reset(0);
} }
#endif /* __ASM_ARCH_IRQ_H */ #endif /* __ASM_ARCH_IRQ_H */

View File

@ -11,6 +11,7 @@
*/ */
#include <plat/regs-watchdog.h> #include <plat/regs-watchdog.h>
#include <mach/map.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/err.h> #include <linux/err.h>

View File

@ -102,6 +102,11 @@ static struct map_desc s3c_iodesc[] __initdata = {
.pfn = __phys_to_pfn(S3C64XX_PA_MODEM), .pfn = __phys_to_pfn(S3C64XX_PA_MODEM),
.length = SZ_4K, .length = SZ_4K,
.type = MT_DEVICE, .type = MT_DEVICE,
}, {
.virtual = (unsigned long)S3C_VA_WATCHDOG,
.pfn = __phys_to_pfn(S3C64XX_PA_WATCHDOG),
.length = SZ_4K,
.type = MT_DEVICE,
}, },
}; };