Hi,
How can I enable watchdog timer in U-boot for i.MX28 evk board.
There is no support of watchdog timer in U-boot for i.MX28 evk board.
Is there any patch or solution available so that I can add watchdog in u-boot ?
I am using Yocto build environment for i.MX28 evk board.
-
Thanks
Dhvanil Patel
There is watchdog support in U-boot.
Take a look at arch/arm/cpu/arm926ejs/mxs/mxs.c:
void reset_cpu(ulong ignored)
{
struct mxs_rtc_regs *rtc_regs =
(struct mxs_rtc_regs *)MXS_RTC_BASE;
struct mxs_lcdif_regs *lcdif_regs =
(struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
/*
* Shut down the LCD controller as it interferes with BootROM boot mode
* pads sampling.
*/
writel(LCDIF_CTRL_RUN, &lcdif_regs->hw_lcdif_ctrl_clr);
/* Wait 1 uS before doing the actual watchdog reset */
writel(1, &rtc_regs->hw_rtc_watchdog);
writel(RTC_CTRL_WATCHDOGEN, &rtc_regs->hw_rtc_ctrl_set);
/* Endless loop, reset will exit from here */
for (;;)
;
}
Regards,
Fabio Estevam
Hi
Thanks to point out the code.
I want to enable watchdog timer using watchdog_init() function of u-boot from board_late_init().
Is this possible?
I want a dual boot mechanism from u-boot using watchdog timer.
Dhvanil
Dhvanil,
I am not sure I understood the issue with the current approach.
Also don't know what you mean by "dual boot mechanism".
Can you start a thread at U-boot mailing list?
Regards,
Fabio Estevam
Hi Dhvanil
I am not aware of such patches, however one can create it using
below link
how to enable watchdog under uboot
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------