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>
This commit is contained in:
parent
5b3a05ca91
commit
c78a5bc2e7
13 changed files with 25 additions and 7 deletions
|
@ -11,7 +11,7 @@
|
|||
#ifndef __ASM_ARCH_SYSTEM_H
|
||||
#define __ASM_ARCH_SYSTEM_H
|
||||
|
||||
extern void davinci_watchdog_reset(void);
|
||||
#include <mach/common.h>
|
||||
|
||||
static inline void arch_idle(void)
|
||||
{
|
||||
|
@ -20,7 +20,8 @@ static inline void arch_idle(void)
|
|||
|
||||
static inline void arch_reset(char mode, const char *cmd)
|
||||
{
|
||||
davinci_watchdog_reset();
|
||||
if (davinci_soc_info.reset)
|
||||
davinci_soc_info.reset(davinci_soc_info.reset_device);
|
||||
}
|
||||
|
||||
#endif /* __ASM_ARCH_SYSTEM_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue