Skip to contentSkip to conversation

[2.4] Watchdog wdt977 (Winbond W83977EF) driver

PATCH Tal Kelrich 1 participant 1 message Apr 1, 2007 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

Hello,

This is my first submitted kernel patch, please be gentle.

Tested and working on AAEON GENE-6310B Subcompact Board (also configured for same by default, should work elsewhere) patch is against kernel 2.4.34.2

Changes/Features:

Added ioctl support
Disables watchdog on driver load
Supports timeout in seconds
Timeout defaults to 2 minutes
No longer under NetWinder arch
Configurable output GP (defaults to GP16)
Configurable base IO address
Non standard read only proc interface for status (/proc/watchdog)

Caveats:

No idea if this breaks netwinder, although it really shouldn't Only tested with GP16
Utterly ignores inability to get its IO port, mostly because it's already taken. I didn't know a way around that. release_region is called regardless of having acquired the region, this might be trouble.

Signature · 6 lines
Tal Kelrich
PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F  CAE6 FEC1 9AAC 12B9 AA69
Key Available at: http://www.hasturkun.com/pub.txt
----
To err is human, to forgive is against company policy.
----
drivers/char/Config.in +1 -3
diff -udr linux-2.4.34.2/drivers/char/Config.in linux-2.4.34.2-wdt977/drivers/char/Config.in
@@ -247,10 +247,8 @@
    tristate '  Berkshire Products PC Watchdog' CONFIG_PCWATCHDOG
    if [ "$CONFIG_FOOTBRIDGE" = "y" ]; then
       tristate '  DC21285 watchdog' CONFIG_21285_WATCHDOG
-      if [ "$CONFIG_ARCH_NETWINDER" = "y" ]; then
-         tristate '  NetWinder WB83C977 watchdog' CONFIG_977_WATCHDOG
-      fi
    fi
+   tristate '  Winbond W83977EF Watchdog Timer' CONFIG_977_WATCHDOG
    tristate '  Eurotech CPU-1220/1410 Watchdog Timer' CONFIG_EUROTECH_WDT
    tristate '  IB700 SBC Watchdog Timer' CONFIG_IB700_WDT
    tristate '  ICP ELectronics Wafer 5823 Watchdog' CONFIG_WAFER_WDT
drivers/char/wdt977.c +215 -97

406 lines not on this page · raw message