how to enable watchdog under uboot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to enable watchdog under uboot

跳至解决方案
6,136 次查看
jonnyju
Contributor I


Dear all

     i'm working on an imx28 rev D board.

     i want to enable watchdog under uboot,

     so i use mw command to modify reg's value to enable watchodg

     command is:

     > mw.l 0x80056004 0x00000018

     > mw.l 0x80056050 0x00001400

     after 5 seconds, the board does reset, by it cannot restart.

     and only print: H0x80501003 and 0x80502008.

     what else should be done?

     and another question is the code in kernel @wdt_enable func:

     static void wdt_enable(u32 value)

     {

          ......

          __raw_writel(BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATER,

                         wdt_base + HW_RTC_PERSISTENT1_SET);

          ......

     }

     why should we wirte BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATER into HW_RTC_PERSISTENT1_SET?

     because these is no description about this.

     thks all

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
2,199 次查看
GraceH
Senior Contributor II

1. You need set HW_RTC_PERSISTENT0  bit AUTO_RESTART to 1.

mw.l 0x80056064 0x00020000

mw.l 0x80056004 0x00000018

mw.l 0x80056050 0x00001400

2. For the RTC_PERSISTENT1, except those described in reference manual, the other fields are for customer use.

bit BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATE is used for watchdog driver to get boot status mxs_wdt_ioctl.

在原帖中查看解决方案

0 项奖励
回复
1 回复
2,200 次查看
GraceH
Senior Contributor II

1. You need set HW_RTC_PERSISTENT0  bit AUTO_RESTART to 1.

mw.l 0x80056064 0x00020000

mw.l 0x80056004 0x00000018

mw.l 0x80056050 0x00001400

2. For the RTC_PERSISTENT1, except those described in reference manual, the other fields are for customer use.

bit BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATE is used for watchdog driver to get boot status mxs_wdt_ioctl.

0 项奖励
回复