[Patch] ALi M7101 watchdog

Steve Hill (steve@navaho.co.uk)
Fri, 1 Mar 2002 14:43:07 +0000 (GMT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--665600-1915745409-1014993787=:9334
Content-Type: TEXT/PLAIN; charset=US-ASCII

Attached is a patch against the 2.4.17 tree to provide a /dev/watchdog
interface to the watchdog in the ALi M7101 PMU (as used in Cobalt's x86
kit - Raq3/4, Qube3, etc).

It takes notice of the CONFIG_WDT_NOWAYOUT option and will kick the
watchdog timer when the system goes down for a reboot so it pulls the
reset (as far as I can tell this is the only way to reboot Cobalt
machines?)

I have done preliminary testing on a Cobalt Raq 4 and it seems good -
please CC any comments / questions to me.

-- 

- Steve Hill System Administrator Email: steve@navaho.co.uk Navaho Technologies Ltd. Tel: +44-870-7034015

... Alcohol and calculus don't mix - Don't drink and derive! ...

--665600-1915745409-1014993787=:9334 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.4.17-alim7101wdt.patch" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.LNX.4.33.0203011443070.9334@sorbus.navaho> Content-Description: Content-Disposition: attachment; filename="linux-2.4.17-alim7101wdt.patch"

ZGlmZiAtdXJOIGxpbnV4LnZhbmlsbGEvRG9jdW1lbnRhdGlvbi9Db25maWd1 cmUuaGVscCBsaW51eC5jaG9jb2xhdGVjb29raWVkb3VnaC9Eb2N1bWVudGF0 aW9uL0NvbmZpZ3VyZS5oZWxwDQotLS0gbGludXgudmFuaWxsYS9Eb2N1bWVu dGF0aW9uL0NvbmZpZ3VyZS5oZWxwCUZyaSBEZWMgMjEgMTc6NDE6NTMgMjAw MQ0KKysrIGxpbnV4LmNob2NvbGF0ZWNvb2tpZWRvdWdoL0RvY3VtZW50YXRp b24vQ29uZmlndXJlLmhlbHAJRnJpIE1hciAgMSAwOTo1Mjo1OCAyMDAyDQpA QCAtMTczOTgsNiArMTczOTgsMTcgQEANCiAg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oKHRtcCAmIDB4MWUpICE9 IDB4MTIpIHsNCisJCXByaW50ayhLRVJOX0lORk8gT1VSX05BTUUgIjogQUxp IDE1NDMgU291dGgtQnJpZGdlIGRvZXMgbm90IGhhdmUgdGhlIGNvcnJlY3Qg cmV2aXNpb24gbnVtYmVyICg/Pz8xMDAxPykgLSBXRFQgbm90IHNldFxuIik7 DQorCQlyZXR1cm4gLUVCVVNZOw0KKwl9Ow0KKw0KKwlpbml0X3RpbWVyKCZ0 aW1lcik7DQorCXRpbWVyLmZ1bmN0aW9uID0gd2R0X3RpbWVyX3Bpbmc7DQor CXRpbWVyLmRhdGEgPSAxOw0KKwkJDQorCXJjID0gbWlzY19yZWdpc3Rlcigm d2R0X21pc2NkZXYpOw0KKwlpZiAocmMpIHJldHVybiByYzsNCisNCisJcmMg PSByZWdpc3Rlcl9yZWJvb3Rfbm90aWZpZXIoJndkdF9ub3RpZmllcik7DQor CWlmIChyYykgew0KKwkJbWlzY19kZXJlZ2lzdGVyKCZ3ZHRfbWlzY2Rldik7 DQorCQlyZXR1cm4gcmM7DQorCX07DQorCQ0KKwlwcmludGsoS0VSTl9JTkZP IE9VUl9OQU1FICI6IFdEVCBkcml2ZXIgZm9yIEFMaSBNNzEwMSBpbml0aWFs aXNlZC5cbiIpOw0KKwkNCisJcmV0dXJuIDA7DQorDQorfQ0KKw0KK21vZHVs ZV9pbml0KGFsaW03MTAxX3dkdF9pbml0KTsNCittb2R1bGVfZXhpdChhbGlt NzEwMV93ZHRfdW5sb2FkKTsNCisNCitNT0RVTEVfTElDRU5TRSgiR1BMIik7 DQo= --665600-1915745409-1014993787=:9334--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/