Hi All,
I added watchdog timer in u boot like below .
in include/configs/imx6dl-sabresd.h
#define CONFIG_IMX_CONFIG
in /board/freescale/imx6dl-sabresd/imx6dl-sabresd.c
int board_late_init(void)
{
int ret = 0;
#ifdef CONFIG_CMD_BMODE
add_board_boot_modes(board_boot_modes);
#endif
#ifdef CONFIG_SYS_I2C_MXC
setup_i2c(1, CONFIG_SYS_I2C_SPEED,
0x7f, &i2c_pad_info1);
ret = setup_pmic_voltages();
if (ret)
return -1;
#endif
#ifdef CONFIG_ENV_IS_IN_MMC
board_late_mmc_env_init();
#endif
#ifdef CONFIG_IMX_WATCHDOG
hw_watchdog_init();
#endif
return 0;
}
like this.
If i stop in u-boot after my time out it is rebooting . if any crash occur in kernel in that time also it is rebooting.
But if file system is not mounted then it is not rebooting how can i achieve that.
and after enabling watchdog in u boot. my wdt_driver_test.out in unit-tests is not working.
unit-tests$ ./wdt_driver_test.out 10 5 0
Here after i given ctrl+c also it is not rebooting.
unit-tests$ ./wdt_driver_test.out 1 2 0
In this case also after 1 sec it should reboot but it is not.How can i solve this issue please if any one knows kindly suggest me.
Thanks & Regards,
Lavany
Hi Lavany
seems you are using some customized uboot version,
could you try with nxp uboot-imx
uboot-imx.git - Freescale i.MX u-boot Tree
unit-tests are working properly with nxp linux&uboot.
Best regards
igor
Hi igorpadykov ,
Sorry , actually uboot version is 2014 not 2013 that i got from yocto setup.
Thanks
Lavanya
Hi igorpadykov ,
In my kernel dts file i have like this
&gpc {
/* use ldo-bypass, u-boot will check it and configure */
fsl,ldo-bypass = <0>;
fsl,wdog-reset = <1>;
};
&wdog1 {
status = "okay";
};
so now if i am running
./wdt_driver_test.out 10 5 0
Starting wdt_driver (timeout: 10, sleep: 5, test: ioctl)
Trying to set timeout value=10 seconds
The actual timeout was set to 10 seconds
Now reading back -- The timeout is 10 seconds
^C
Now exactly after 10 seconds it is rebooting.
In U-boot also i am trying to enable wdog.For that i did like below.
In board file i added like this in board_late_init function
#ifdef CONFIG_IMX_WATCHDOG
hw_watchdog_init();
#endif
and in includes/configs/custom_board.h file #define CONFIG_IMX_WATCHDOG 1
and i reduced time in drivers/watchdog/imx_watchdog.c
//#define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000
#define CONFIG_WATCHDOG_TIMEOUT_MSECS 12000
after enabling wdt in u boot my kernel watchdog is not working what ever time i given , it is taking more than 5 mins to reboot.
and in log i observed like below after enabling watchdog in u boot
Starting udev
udevd[130]: starting version 182
bootlogd: cannot allocate pseudo tty: No such file or directory
random: dd urandom read with 95 bits of entropy available
ALSA: Restoring mixer settings...
/usr/sbin/alsactl: load_state:1729: No soundcards found...
Mon May 30 11:44:05 UTC 2016
random: nonblocking pool is initialized
INIT: Entering runlevel: 5
Configuring network interfaces... fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
libphy: PHY fixed-0:00 not found
fec 2188000.ethernet eth0: could not attach to PHY
ifconfig: SIOCSIFFLAGS: No such device
Starting Xserver
Starting system message bus: dbus.
Starting rpcbind daemon...done.
Starting advanced power management daemon: No APM support in kernel
(failed.)
Starting syslogd/klogd: done
* Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
...done.
Starting Telephony daemon
Starting Linux NFC daemon
Starting OProfileUI server
PU: Power-on latency exceeded, new value 4670334 ns {if watchdog is not enabled in u boot it is not coming}
How to solve this issue if any one knows kindly help me .
Thanks & Regards,
Lavanya
Hi Lavanya
wdog should not be enabled twice as some bits could
be written once. In general nxp has service helping with customization
NXP Professional Services:
http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE
Pro-Support contact www.nxp.com/prosupport
Best regards
igor
Hi igorpadykov ,
i observed that i got random: nonblocking pool is initialized In this case watchdog is taking more than 5mins to reboot and some times not rebooting if it is not coming then wdt is working properly .
how to solve this error .
Thanks & Regards,
Lavanya
But in 3.0.35 kernel watchdog is working properly i enabled both u boot and kernel .
but in yocto setup u boot with 2014 and kernel with 3.14.28 is giving problem
Hi Lavanya
in nxp uboot there is no ../imx6dl-sabresd/imx6dl-sabresd.c
could you try with nxp uboot-imx
Best regards
igor
Hi ,
mx6sabresd.h this is original file that is for my custom board .
mx6sabresd/mx6sabresd.c are correct names , i want why that u-boot watchdog is not releasing when i reach kernel.
Thanks & Regards,
Lavanya