openwrtv3/target/linux/cns3xxx
Koen Vandeputte 84acff2865 cns3xxx: fix mpcore watchdog
The original implementation loaded the count register with (wrong) semi-
random values due to its implemenation nature.

If the wrongly calulated value was below the kickrate,
the WD was triggered and rebooted the system.

Rework this, partly based on upstream patches, to dynamically fetch the
current clockrate and calculate the proper offset for the WD countdown
register.

Before:

[  143.800000] count val: 27219720
[  148.820000] count val: 50623201
[  153.830000] count val: 96425250
[  158.830000] count val: 89735401
[  163.840000] count val: 4756110

After:

[    0.700000] MPCore WD init. clockrate: 299984500 prescaler: 256
countrate: 1171814 timeout: 60s
[  358.530000] count val: 35154751
[  363.540000] count val: 35154750
[  368.540000] count val: 35154751
[  373.550000] count val: 35154750

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-12 12:13:15 +02:00
..
base-files cns3xxx: eliminate hardcoded kernel/rootfs partition split 2016-09-19 14:27:26 +02:00
files cns3xxx: clean up patches 2017-02-11 21:18:42 +01:00
image cns3xxx: eliminate hardcoded kernel/rootfs partition split 2016-09-19 14:27:26 +02:00
patches-4.9 cns3xxx: fix mpcore watchdog 2017-04-12 12:13:15 +02:00
config-4.9 cns3xxx: refresh kernel config 2017-04-12 12:13:15 +02:00
Makefile cns3xxx: switch to linux 4.9 2017-02-10 11:05:57 +01:00