public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] imx233
       [not found] <CAP8r_=BZWOOadLvY4yLp9UJaWTJhKR-x+z9A4yj-LxQde-18NA@mail.gmail.com>
@ 2013-11-23 17:11 ` Marek Vasut
  0 siblings, 0 replies; only message in thread
From: Marek Vasut @ 2013-11-23 17:11 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-23 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAP8r_=BZWOOadLvY4yLp9UJaWTJhKR-x+z9A4yj-LxQde-18NA@mail.gmail.com>
2013-11-23 17:11 ` [U-Boot] imx233 Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox