[U-Boot] imx233

Marek Vasut marex at denx.de
Sat Nov 23 18:11:35 CET 2013


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


More information about the U-Boot mailing list