mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
mpc85xx: watchdog initialisation added
Function to inititialize the cpu watchdog added. Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com> [York Sun: Add prototype in watchdog.h] Reviewed-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
60b295672d
commit
0f8062b25b
@ -310,6 +310,14 @@ __weak unsigned long get_tbclk (void)
|
|||||||
|
|
||||||
|
|
||||||
#if defined(CONFIG_WATCHDOG)
|
#if defined(CONFIG_WATCHDOG)
|
||||||
|
#define WATCHDOG_MASK (TCR_WP(63) | TCR_WRC(3) | TCR_WIE)
|
||||||
|
void
|
||||||
|
init_85xx_watchdog(void)
|
||||||
|
{
|
||||||
|
mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WATCHDOG_MASK) |
|
||||||
|
TCR_WP(CONFIG_WATCHDOG_PRESC) | TCR_WRC(CONFIG_WATCHDOG_RC));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
reset_85xx_watchdog(void)
|
reset_85xx_watchdog(void)
|
||||||
{
|
{
|
||||||
|
@ -95,4 +95,8 @@ int init_func_watchdog_reset(void);
|
|||||||
#if defined(CONFIG_HW_WATCHDOG) && !defined(__ASSEMBLY__)
|
#if defined(CONFIG_HW_WATCHDOG) && !defined(__ASSEMBLY__)
|
||||||
void hw_watchdog_init(void);
|
void hw_watchdog_init(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_MPC85xx) && !defined(__ASSEMBLY__)
|
||||||
|
void init_85xx_watchdog(void);
|
||||||
|
#endif
|
||||||
#endif /* _WATCHDOG_H_ */
|
#endif /* _WATCHDOG_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user