
Hi Bojan,
On 21/11/2013 09:09, Bojan Buić wrote:
I'm trying in board iMX233-OLinuXino-MICRO (https://www.olimex.com/Products/OLinuXino/iMX233/iMX233-OLinuXino-MICRO/open...) setup hardware watchdogin the uboot.
I checkout uboot code and recompile it(I found steps here : http://www.jann.cc/2013/02/07/u_boot_for_the_imx233_olinuxino.html).
I tried to call a function hw_watchdog_init from class: imx_watchdog.c (http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/watchdog/imx_watchdog.c;h=...) in the code .
In this method, I uncomment line # define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000 and I expected that the system will be restarted after, 128 seconds, but did not. I am sure that this method(hw_watchdog_init) is called because before and after i write debug messages to console
Wait...
Checking the Makefile in the drivers/watchdog directory:
ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 vf610)) obj-y += imx_watchdog.o endif
That is: watchdog is supported for other i.MX families. It is not surprising if it is not working, I am surprised that hw_watchdog_init is called, because imx_watchdog should not be compiled.
I have not checked inside MX23 manual, but if it is as in MX28 you have to enable the watchdog inside the RTC. It works in a different way as in other imx, and the current driver is not suitable for MX23. You have to add support for it.
Best regards, Stefano Babic