Watchdog
From OMAPpedia
Welcome to the Watchdog Timer Driver wiki.
[edit] Introduction
This webpage describes the Watchdog Timer driver software development effort, mainly its current status and features planned in the road map.
A Watchdog Timer (WDT) is a hardware circuit that can reset the computer system in case of a software fault.
[edit] List of Features Supported
- On all OMAP boards
- Keepalive feature to notify the watchdog timer that the user space application is alive
- Set timeout
- Get timeout
- Get support feature to get more information about the system of what the device can do
- Get status
- Get bootstatus
[edit] Design
- Watchdog initialization
- The Watchdog initialization routine basically registers the watchdog timer device and driver on platform bus. This initializes the watchdog timer's functional and interface clocks.
- Watchdog Open
- The watchdog gets activated as soon as /dev/watchdog is opened and will reboot unless the watchdog is pinged within a certain time, this time is called the timeout or margin. The simplest way to ping the watchdog is to write some data to the device.
- Watchdog Write
- The Watchdog write API triggers loading of new timeout value by doing a ping.
- Watchdog Input/Output Control
- The Watchdog driver provides ioctl API to provide the features mentioned above.
- Watchdog Release
- Shuts off the timer unless NOWAYOUT is defined. If NOWAYOUT watchdog timer device cannot be closed.
[edit] Feature Status Summary
Here is the summary of completed, ongoing and planned features in the Watchdog Timer driver.
Watchdog Timer Driver
| ID | Title | Target Week | Upstream Status | Link to Patches | Priority | Owner | Dev Status | Comments & Link to Details |
| WATCHDOG.0000 | Watchdog timer driver shall support configuration, enable/disable and petting(resetting) of the watchdog timer | NA | Already supported | Patch1 | NA | Open Source Community | Released in L24.1 | See details |
| WATCHDOG.0001 | Watchdog driver shall support HWMOD FW | NA | Under Progress | NA | NA | Charulatha V | May,2010 | See details |
[edit] Defect Status Summary
Here is the summary of completed, ongoing and planned defect fixes in the Watchdog Timer driver.
Watchdog Timer Driver
| ID | Title | Target Week | Upstream Status | Link to Patches | Features Impacted | Priority | Owner | Dev Status | Comments & Link to Details |
| Nothing to Report | NA | NA | NA | NA | NA | NA | NA | NA | NA |
[edit] FAQ
1. Why we want/need watchdog timers?
[Ans] We want watchdog timers to make sure that our systems can reboot when the systems becomes unstable and "crashes".
2. In the probe function, the watchdog is disabled regardless of whether the registration fails or not. What if the bootloader have already enabled the watchdog and then user space booting fails for some reason before any process is able to open and re-enable the watchdog? It could end up with a hung system that does not have the watchdog enabled. Maybe we should disable the watchdog only in case the registration actually fails?
[Ans] The decision to reboot a system actually is driven by userspace. If userspace pings the watchdog then the system is stable enough, if not reboot. And that's why we have a grey zone: userspace control is only there after the system has booted. And the system is only booted and available for userspace after the filesystem checks are done. That's why in the past the people who wrote the first watchdog driver, disabled all watchdogs before userspace was able to control the watchdog.
Normally you don't want your system to be rebooted during a filesystem check, because after the reboot, the filesystem will have to be checked again which could result in an endless loop. And this is the default behavior.
On the other hand: systems are faster, we have other types of filesystems, we use flash-drives, etc., So, for some embedded systems, you might want to do secure booting in a different way than what we do on traditional systems. Add a module_parameter that allows to have the watchdog active on start and don't stop it. Here, the default behaviour would be to stop the watchdog, but it gives you the possibility to override the default. add the module-parameter to keep the watchdog running at start. [Source: LO discussion mailing list]
[edit] Feature Status Details
[edit] WATCHDOG.0000: Watchdog timer driver shall support configuration, enable/disable and petting(resetting) of the watchdog timer
Already available
[edit] WATCHDOG.0001: HWMOD Support for Watchdog Timer driver
The hwmod support for Watchdog driver is under development.
[edit] Defect Status Details
None reported so far
[edit] Future Development Plan
None at present
[edit] Information on Testing Procedures
To be added.
[edit] Submit Your Ideas Here
Please list them as separate subsections (use ===title===). Please include your name, email ID and date for easy processing.
[edit] Owner
Aneesh V <aneesh[at]ti[dot]com>
[edit] Contributors
Aneesh V <aneesh[at]ti[dot]com>
Charulatha V <charu[at]ti[dot]com>
[edit] Recent Patches Merged in kernel.org
None
[edit] Recent Submissions to Open Source
None
[edit] Current Status of Patches in Omapzoom Tree
None
