mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 20:24:26 +08:00
imx_watchdog: always set minimal timeout in reset_cpu
The problem is that timeout bits in WCR register were leaved unchanged. So previously set timeout value was applied and therefore 'reset' command takes any value up to two minutes, depending on previous watchdog settings, instead of minimal 0.5 seconds. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
This commit is contained in:
parent
88f91d1375
commit
587c3f8ebe
@ -43,7 +43,7 @@ void reset_cpu(ulong addr)
|
||||
{
|
||||
struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
|
||||
|
||||
clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
|
||||
clrsetbits_le16(&wdog->wcr, WCR_WT_MSK, WCR_WDE);
|
||||
|
||||
writew(0x5555, &wdog->wsr);
|
||||
writew(0xaaaa, &wdog->wsr); /* load minimum 1/2 second timeout */
|
||||
|
@ -16,3 +16,4 @@ struct watchdog_regs {
|
||||
#define WCR_WDT 0x08
|
||||
#define WCR_SRS 0x10
|
||||
#define SET_WCR_WT(x) (x << 8)
|
||||
#define WCR_WT_MSK SET_WCR_WT(0xFF)
|
||||
|
Loading…
Reference in New Issue
Block a user