From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 23 Nov 2013 18:11:35 +0100 Subject: [U-Boot] imx233 In-Reply-To: References: Message-ID: <201311231811.35710.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Bojan Bui?, > Hello, > > I found Your email address in UBoot code(checkout from git). > > I would like enable watchdog on imx233 procesor in uboot. > > I try like this : > > struct mxs_rtc_regs *rtc_regs = > (struct mxs_rtc_regs *)MXS_RTC_BASE; > writel(RTC_CTRL_WATCHDOGEN, &rtc_regs->hw_rtc_ctrl_set); > while (readl(&rtc_regs->hw_rtc_ctrl) & RTC_CTRL_WATCHDOGEN); > > but not work. Can You help me ? CCing the list. What problem do you observe exactly? "but not work" is not exactly a description of the symptoms. Anyway ... You need to implement proper driver for the WDT, see drivers/watchdog/imx_watchdog.c . There is a README, see doc/README.watchdog . You need to implement hw_watchdog_init() and hw_watchdog_reset() , in the former, you'd start the WDT by programming the HW_RTC_CTRL and HW_RTC_WATCHDOG registers, in the latter you'd need to update the HW_RTC_WATCHDOG register so your board won't keep restarting when the counter runs out. If you implement the WDT, please submit a patch to the U-Boot ML, thanks. Best regards, Marek Vasut