On Thu, Feb 14, 2013 at 10:34:58AM -0800, Steve deRosier wrote: [...] > 3. Implement some kernel process that takes over automatic periodic > kicking until the real WDT driver is opened the first time by > userspace. Then that process gets disabled.
Unfortunately, I do not remember where I stole this idea, but here is how I did (maybe it was with a Coldfire 5373L): - enable and initialize WDT in Bootloader (U-Boot) - move Linux WDT init very early in the boot process I modified the watchdog driver by adding a timer-interrupt based kick at the init stage; This timer was active for a compile-time configurable time (number of kicks, actually) - I used 120 seconds. During this time, the in-kernel timer kicked the WDT to avoid timeout during init. As soon as the WDT device was opened from user space, this timer was permanently disabled to let the user space take control. Like this, I had the following "features": - early start of WDT - no problem during fsck or other boot-time delay (mounting/initializing a flash filesystem or initializing some USB device did take ridiculous amounts of time, occasionally) - quite robust because the timer-based kicking during boot proved quite resilient against arbitrary delays in other drivers' init code, while still having a good chance to catch real errors because of this in-kernel timer being stopped after a longer timeout. I guess there may be more sophisticated methods, but for our project, we did not have any failure or problem with this one. Best regards, Wolfgang _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev