diff options
author | Cyril Chemparathy <cyril@ti.com> | 2010-05-01 18:38:28 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-05-06 18:02:09 -0400 |
commit | c78a5bc2e77e8fc5be29cda5b28c9b9afd0f4b6d (patch) | |
tree | fc54260054d1b46d9f4e6f47c56952a82ee6b1e4 /arch/arm/mach-davinci/include/mach/system.h | |
parent | 5b3a05ca911688c53680f2b020a1512b9da29c89 (diff) |
Davinci: watchdog reset separation across socs
The earlier watchdog reset mechanism had a couple of limitations. First, it
embedded a reference to "davinci_wdt_device" inside common code. This
forced all derived platforms (da8xx and tnetv107x) to define such a device.
This also would have caused problems in including multiple socs in a single
build due to symbol redefinition.
With this patch, davinci_watchdog_reset() now takes the platform device as an
argument. The davinci_soc_info struct has been extended to include a reset
function and a watchdog platform_device. arch_reset() then uses these
elements to reset the system in a SoC specific fashion.
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Tested-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/include/mach/system.h')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/system.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h index 5a7d7581b8ce..e65629c20769 100644 --- a/arch/arm/mach-davinci/include/mach/system.h +++ b/arch/arm/mach-davinci/include/mach/system.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __ASM_ARCH_SYSTEM_H | 11 | #ifndef __ASM_ARCH_SYSTEM_H |
12 | #define __ASM_ARCH_SYSTEM_H | 12 | #define __ASM_ARCH_SYSTEM_H |
13 | 13 | ||
14 | extern void davinci_watchdog_reset(void); | 14 | #include <mach/common.h> |
15 | 15 | ||
16 | static inline void arch_idle(void) | 16 | static inline void arch_idle(void) |
17 | { | 17 | { |
@@ -20,7 +20,8 @@ static inline void arch_idle(void) | |||
20 | 20 | ||
21 | static inline void arch_reset(char mode, const char *cmd) | 21 | static inline void arch_reset(char mode, const char *cmd) |
22 | { | 22 | { |
23 | davinci_watchdog_reset(); | 23 | if (davinci_soc_info.reset) |
24 | davinci_soc_info.reset(davinci_soc_info.reset_device); | ||
24 | } | 25 | } |
25 | 26 | ||
26 | #endif /* __ASM_ARCH_SYSTEM_H */ | 27 | #endif /* __ASM_ARCH_SYSTEM_H */ |