From fa0cb57014c174fca4e9f88e935203e1a1b22ca5 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 15 Feb 2007 22:52:15 +0100 Subject: [PATCH] --- yaml --- r: 48955 b: refs/heads/master c: d4156d52c7464e8f25a286e1c2975e91bdbc35d6 h: refs/heads/master i: 48953: c3ae067273dafb148d0a3032e8caa559daaabc64 48951: ce3b82854999d823519160e5b1b87c188c645fbe v: v3 --- [refs] | 2 +- trunk/include/asm-arm/arch-s3c2410/reset.h | 22 +++++++++++++++++++++ trunk/include/asm-arm/arch-s3c2410/system.h | 6 +++++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 trunk/include/asm-arm/arch-s3c2410/reset.h diff --git a/[refs] b/[refs] index 19d135ce46e7..f9b8764449c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d9c0ebbda522b64607cd2b0064b9bb040c53bcaf +refs/heads/master: d4156d52c7464e8f25a286e1c2975e91bdbc35d6 diff --git a/trunk/include/asm-arm/arch-s3c2410/reset.h b/trunk/include/asm-arm/arch-s3c2410/reset.h new file mode 100644 index 000000000000..4f866cdecab0 --- /dev/null +++ b/trunk/include/asm-arm/arch-s3c2410/reset.h @@ -0,0 +1,22 @@ +/* linux/include/asm-arm/arch-s3c2410/reset.h + * + * Copyright (c) 2007 Simtec Electronics + * Ben Dooks + * http://armlinux.simtec.co.uk/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * S3C2410 CPU reset controls +*/ + +#ifndef __ASM_ARCH_RESET_H +#define __ASM_ARCH_RESET_H __FILE__ + +/* This allows the over-ride of the default reset code +*/ + +extern void (*s3c24xx_reset_hook)(void); + +#endif /* __ASM_ARCH_RESET_H */ diff --git a/trunk/include/asm-arm/arch-s3c2410/system.h b/trunk/include/asm-arm/arch-s3c2410/system.h index 41aeb731c5a0..1c74ef17da33 100644 --- a/trunk/include/asm-arm/arch-s3c2410/system.h +++ b/trunk/include/asm-arm/arch-s3c2410/system.h @@ -15,11 +15,13 @@ #include #include +#include #include #include void (*s3c24xx_idle)(void); +void (*s3c24xx_reset_hook)(void); void s3c24xx_default_idle(void) { @@ -54,7 +56,6 @@ static void arch_idle(void) s3c24xx_default_idle(); } - static void arch_reset(char mode) { @@ -62,6 +63,9 @@ arch_reset(char mode) cpu_reset(0); } + if (s3c24xx_reset_hook) + s3c24xx_reset_hook(); + printk("arch_reset: attempting watchdog reset\n"); __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */