Skip to content

watchdog: dw_wdt: fix reset line management

Artem Shimko linux-watchdog lkml 3 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 6 repliesApplied
  2. v32 patches 1 replySuperseded
  3. v23 patches 5 repliesSuperseded

Changes in v4 from the cover letter

* Dropped dev_err_probe() in probe to keep the driver consistent.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2watchdog: dw_wdt: use devm_reset_control_get_optional_shared_deasserteddrivers/watchdog/dw_wdt.c+3 -101 reply
2/2watchdog: dw_wdt: manage reset line during system suspend/resumedrivers/watchdog/dw_wdt.c+20 -55 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchIgor VelkovTzung-Bi Shih
1/2T-b R-b
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] watchdog: dw_wdt: fix reset line management

Hello,

This is v4 of the series fixing reset line management in the dw_wdt driver.

Testing:

$ ls /dev/watchdog*
/dev/watchdog   /dev/watchdog1  /dev/watchdog3
/dev/watchdog0  /dev/watchdog2
$ ls /sys/class/watchdog/
watchdog0  watchdog1  watchdog2  watchdog3
$ chmod +x watchdog-test
$ ./watchdog-test -f /dev/watchdog0 -i -s
watchdog_info:
 identity:              Synopsys DesignWare Watchdog
 firmware_version:      0
Support/Status: Set timeout (in seconds)
Support/Status: Supports magic close char
Support/Status: Pretimeout (in seconds), get/set
Support/Status: Keep alive ping reply
Support/Status: Keep alive ping reply
$ echo mem > /sys/power/state
...
...
[ 1560.147058] PM: suspend exit
[ 1560.371470] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 1561.031825] cdc_ncm 1-1:2.0: MAC-Address: a4:2a:95:e8:fc:e4
[ 1561.037736] cdc_ncm 1-1:2.0: setting rx_max = 16384
[ 1561.054408] cdc_ncm 1-1:2.0: setting tx_max = 16384
[ 1561.084713] cdc_ncm 1-1:2.0 eth0: register 'cdc_ncm' at usb-xhci-hcd.2.auto-1, CDC NCM (NO ZLP), a4:2a:95:e8:fc:e4
$ ./watchdog-test -f /dev/watchdog0 -i -s
watchdog_info:
 identity:              Synopsys DesignWare Watchdog
 firmware_version:      0
Support/Status: Set timeout (in seconds)
Support/Status: Supports magic close char
Support/Status: Pretimeout (in seconds), get/set
Support/Status: Keep alive ping reply
Support/Status: Keep alive ping reply
$ ls /dev/watchdog*
/dev/watchdog   /dev/watchdog1  /dev/watchdog3
/dev/watchdog0  /dev/watchdog2
$ echo 1 > /dev/watchdog0
$ cat /sys/kernel/debug/1e012000.wdt/registers | grep ccvr
ccvr = 0x09a7baab
$ cat /sys/kernel/debug/1e012000.wdt/registers | grep ccvr
ccvr = 0x0599dce0
$ cat /sys/kernel/debug/1e012000.wdt/registers | grep ccvr
ccvr = 0x01926467
$ [  110.392536] watchdog0: pretimeout event

Thank you.

--
Best regards,
Artem

ChangeLog:
v1:
* https://lore.kernel.org/all/[email protected]/T/#t
v2:
* Reduced from 5 patches to 3: manual reset handling is replaced by the devm _deasserted variant from the start, so the intermediate states that could leak the deasserted reset line are gone and every commit is self-contained.
* https://lore.kernel.org/all/[email protected]/T/#t
v3:
* Squashed the last two commits.
* Add error check for reset_control_assert() in dw_wdt_suspend().
* https://lore.kernel.org/all/[email protected]/T/#t
v4:
* Dropped dev_err_probe() in probe to keep the driver consistent.

Artem Shimko (2):
watchdog: dw_wdt: use
devm_reset_control_get_optional_shared_deasserted
watchdog: dw_wdt: manage reset line during system suspend/resume

 drivers/watchdog/dw_wdt.c | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0