Port-RISCV archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: JH7110 watchdog driver



On 8/25/26 00:12, Nick Hudson wrote:
How about the attached? Main things are - don’t always expect 2 resets. The binding spec says 1 or 2, but this version will just enable however many there are - lock the registers after jh7110_wdt_start The rest is mostly stylistic and consistency with other drivers.

Looks great- your changes are a definitely improvement; thanks for your review.  Your locking fix at the end of jh7110_wdt_start() revealed that I wasn't unlocking/locking during the tickle, so with this final change:


--- jh7110_wdt.c.skrll    2026-08-25 15:32:01.119529163 +0000
+++ jh7110_wdt.c    2026-08-25 16:02:29.453213350 +0000
@@ -164,7 +164,11 @@
 {
     struct jh7110_wdt_softc * const sc = smw->smw_cookie;

+    jh7110_wdt_write(sc, JH7110_WDT_LOCK, JH7110_WDT_UNLOCK_KEY);
+
     jh7110_wdt_write(sc, JH7110_WDT_INTCLR, 1);
+
+    jh7110_wdt_write(sc, JH7110_WDT_LOCK, 1);
     return 0;
 }


...things actually work :)





Home | Main Index | Thread Index | Old Index