]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[ar71xx] fix watchdog to work on subsequent SoCs
authorAdrian Chadd <adrian@FreeBSD.org>
Wed, 15 Jul 2020 19:34:19 +0000 (19:34 +0000)
committerAdrian Chadd <adrian@FreeBSD.org>
Wed, 15 Jul 2020 19:34:19 +0000 (19:34 +0000)
commit0155d8f69dbebb4a5fe38bd965e677fab657d24f
treef717f95072048dc09c870e7677105a47b64a26e4
parentea64ebd08c80e4c0a7b8ed207caba45e9374908e
[ar71xx] fix watchdog to work on subsequent SoCs

The AR9341 AHB runs at 225MHz, much faster than the 33MHz of the
AR71xx AHB.  So not only is the math going to do weird things, it
will also wrap rather than being clamped.

So:

* clamp! don't wrap!
* tidy up some debugging
* add an option to throw an NMI rather than reset!

Tested:

* AR9341 SoC (TP-Link TL-WDR4300), patting/not patting the watchdog!
sys/mips/atheros/ar71xx_wdog.c