[GIT PULL REQUEST] watchdog - v5.12 Merge window

2021-02-15 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.12 release cycle.

This series contains:
* Add watchdog driver for Intel Keembay Soc
* Add sun4i: Add H616 compatible string
* Add mt8192 wdt support
* add more Rockchip compatibles to snps,dw-wdt.yaml
* Add binding for Qcom SDX55
* add r8a779a0 (V3U) support
* removal of sirf prima watchdog driver
* removal of sirf atlas watchdog driver
* removal of zte zx watchdog driver
* removal of tango watchdog driver
* removal of coh901 watchdog driver
* several fixes and clean-ups

The output from git request-pull:

The following changes since commit 7c53f6b671f4aba70ff15e1b05148b10d58c2837:

  Linux 5.11-rc3 (2021-01-10 14:34:50 -0800)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.12-rc1

for you to fetch changes up to a4f3407c41605d14f09e490045d0609990cd5d94:

  watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ (2021-02-07 
14:41:28 +0100)


linux-watchdog 5.12-rc1 tag


Alexan der Usyskin (1):
  watchdog: mei_wdt: request stop on unregister

Andre Przywara (1):
  dt-bindings: watchdog: sun4i: Add H616 compatible string

Arnd Bergmann (5):
  watchdog: remove sirf prima driver
  watchdog: remove sirf atlas driver
  watchdog: remove zte zx driver
  watchdog: remove tango driver
  watchdog: remove coh901 driver

Crystal Guo (4):
  dt-binding: mediatek: watchdog: fix the description of compatible
  dt-binding: mediatek: mt8192: update mtk-wdt document
  dt-binding: mt8192: add toprgu reset-controller head file
  watchdog: mt8192: add wdt support

Jiapeng Zhong (1):
  watchdog: hpwdt: Assign boolean values to a bool variable

Johan Jonker (1):
  dt-binding: watchdog: add more Rockchip compatibles to snps,dw-wdt.yaml

Manivannan Sadhasivam (1):
  dt-bindings: watchdog: Add binding for Qcom SDX55

Sai Prakash Ranjan (1):
  watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ

Tian Tao (1):
  watchdog: ziirave_wdt: remove unused including 

Tom Rix (1):
  watchdog: it8712f_wdt: remove definition of DEBUG

Vijayakannan Ayyathurai (2):
  dt-bindings: watchdog: Add bindings for Intel Keem Bay SoC
  watchdog: Add watchdog driver for Intel Keembay Soc

Wolfram Sang (3):
  watchdog: renesas_wdt: don't sleep in atomic context
  dt-bindings: watchdog: renesas,wdt: add r8a779a0 (V3U) support
  watchdog: renesas_wdt: add grace period before rebooting

Zhao Qiang (1):
  watchdog: stop wdd when watchdog hw running in reboot_notifier

freddy.hsin (1):
  watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system 
freeze and it doesn't reboot by watchdog problem

 .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml |  12 +-
 .../bindings/watchdog/intel,keembay-wdt.yaml   |  57 +++
 .../devicetree/bindings/watchdog/mtk-wdt.txt   |   5 +-
 .../devicetree/bindings/watchdog/qcom-wdt.yaml |   1 +
 .../devicetree/bindings/watchdog/renesas,wdt.yaml  |   1 +
 .../bindings/watchdog/sigma,smp8642-wdt.txt|  18 -
 .../devicetree/bindings/watchdog/sirfsoc_wdt.txt   |  18 -
 .../devicetree/bindings/watchdog/snps,dw-wdt.yaml  |   6 +
 .../bindings/watchdog/stericsson-coh901327.txt |  19 -
 .../bindings/watchdog/zte,zx2967-wdt.txt   |  32 --
 drivers/watchdog/Kconfig   |  65 +---
 drivers/watchdog/Makefile  |   6 +-
 drivers/watchdog/atlas7_wdt.c  | 221 ---
 drivers/watchdog/coh901327_wdt.c   | 408 -
 drivers/watchdog/hpwdt.c   |   6 +-
 drivers/watchdog/it8712f_wdt.c |   1 -
 drivers/watchdog/keembay_wdt.c | 286 +++
 drivers/watchdog/mei_wdt.c |   1 +
 drivers/watchdog/mtk_wdt.c |  23 +-
 drivers/watchdog/qcom-wdt.c|  13 +-
 drivers/watchdog/renesas_wdt.c |  33 +-
 drivers/watchdog/sirfsoc_wdt.c | 216 ---
 drivers/watchdog/tangox_wdt.c  | 209 ---
 drivers/watchdog/watchdog_core.c   |   2 +-
 drivers/watchdog/ziirave_wdt.c |   1 -
 drivers/watchdog/zx2967_wdt.c  | 279 --
 .../dt-bindings/reset-controller/mt8192-resets.h   |  30 ++
 27 files changed, 457 insertions(+), 1512 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml
 delete mode 100644 
Documentation/devicetree/bindings/watchdog/sigma,smp8642-wdt.txt
 delete mode 100644 Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
 delete mode 100644 
Documentation/devicetree/bindings

Re: [GIT PULL REQUEST] watchdog - v5.11 Merge window

2020-12-23 Thread Wim Van Sebroeck
Hi Linus,

> >
> >   git://www.linux-watchdog.org/linux-watchdog.git linux-watchdog-5.11-rc1
> 
> There's no such tag there. Forgot to push out?
> 
> I can see the the top-of-tree has the SHA1 that you mention:
> 
> > for you to fetch changes up to 0b9491b621196a5d7f163dde81d98e0687bdba97:
> 
> but the tag itself is missing. And outside of kernel.org, I do require
> signed tags (and even on kernel.org I very strongly prefer them), so I
> won't just pull that HEAD branch.

I know you require the tag and I did create it. So I checked what went wrong 
and stupid me: i created it in the wrong repository :-( .
So it was indeed not there...

Anyway, I created it in the correct repostitory now. You should be able to 
fetch it correctly now.

Forgive my stupidity...

Kind regards and Happy Christmas,
Wim.



[GIT PULL REQUEST] watchdog - v5.11 Merge window

2020-12-22 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.11 release cycle.

This series contains:
* Removal of the pnx83xx driver
* Add a binding for A100's watchdog controller.
* Add Rockchip compatibles to snps,dw-wdt.yaml
* hpwdt: Disable NMI in Crash Kernel
* Fix potential dereferencing of null pointer in watchdog_core
* Several other small fixes and improvements

The output from git request-pull:

The following changes since commit 6bff9bb8a292668e7da3e740394b061e5201f683:

  Merge tag 'scsi-fixes' of 
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi (2020-12-12 12:57:12 
-0800)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git linux-watchdog-5.11-rc1

for you to fetch changes up to 0b9491b621196a5d7f163dde81d98e0687bdba97:

  watchdog: convert comma to semicolon (2020-12-17 21:58:46 +0100)


linux-watchdog 5.11-rc1 tag


Arnd Bergmann (1):
  watchdog: coh901327: add COMMON_CLK dependency

Chunyan Zhang (1):
  watchdog: sprd: change to use usleep_range() instead of busy loop

Enrico Weigelt, metux IT consult (2):
  watchdog: iTCO_wdt: use module_platform_device() macro
  watchdog: iTCO_wdt: use dev_*() instead of pr_*() for logging

Etienne Carriere (1):
  watchdog: stm32_iwdg: don't print an error on probe deferral

Guenter Roeck (2):
  watchdog: armada_37xx: Add missing dependency on HAS_IOMEM
  watchdog: sirfsoc: Add missing dependency on HAS_IOMEM

Jerry Hoemann (2):
  watchdog/hpwdt: Disable NMI in Crash Kernel
  watchdog/hpwdt: Reflect changes

Johan Jonker (1):
  dt-binding: watchdog: add Rockchip compatibles to snps,dw-wdt.yaml

Lingling Xu (2):
  watchdog: sprd: remove watchdog disable from resume fail path
  watchdog: sprd: check busy bit before new loading rather than after that

Manivannan Sadhasivam (1):
  watchdog: qcom: Avoid context switch in restart handler

Rasmus Villemoes (1):
  watchdog: sbc_fitpc2_wdt: add __user annotations

Robert Marko (1):
  watchdog: qcom_wdt: set WDOG_HW_RUNNING bit when appropriate

Thomas Bogendoerfer (1):
  watchdog: remove pnx83xx driver

Tom Rix (1):
  watchdog: geodewdt: remove unneeded break

Wang Wensheng (1):
  watchdog: Fix potential dereferencing of null pointer

Wong Vee Khee (1):
  watchdog: wdat_wdt: Fix missing kerneldoc reported by W=1

Yangtao Li (1):
  dt-bindings: watchdog: sun4i: Add A100 compatible

Zhang Qilong (1):
  watchdog: rti-wdt: fix reference leak in rti_wdt_probe

Zhao Qiang (1):
  wdt: sp805: add watchdog_stop on reboot

Zheng Yongjun (1):
  watchdog: convert comma to semicolon

 .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml |   3 +
 .../devicetree/bindings/watchdog/snps,dw-wdt.yaml  |  10 +-
 drivers/watchdog/Kconfig   |  14 +-
 drivers/watchdog/Makefile  |   1 -
 drivers/watchdog/geodewdt.c|   2 -
 drivers/watchdog/hpwdt.c   |   8 +-
 drivers/watchdog/iTCO_wdt.c|  34 +--
 drivers/watchdog/mpc8xxx_wdt.c |   4 +-
 drivers/watchdog/pnx833x_wdt.c | 277 -
 drivers/watchdog/qcom-wdt.c|  20 +-
 drivers/watchdog/rti_wdt.c |   4 +-
 drivers/watchdog/sbc_fitpc2_wdt.c  |  12 +-
 drivers/watchdog/sp805_wdt.c   |   1 +
 drivers/watchdog/sprd_wdt.c|  43 ++--
 drivers/watchdog/stm32_iwdg.c  |  13 +-
 drivers/watchdog/watchdog_core.c   |  22 +-
 drivers/watchdog/wdat_wdt.c|   6 +-
 17 files changed, 104 insertions(+), 370 deletions(-)
 delete mode 100644 drivers/watchdog/pnx833x_wdt.c


Kind regards,
Wim.



Re: linux-next: build failure after merge of the watchdog tree

2020-12-16 Thread Wim Van Sebroeck
Hi Stephen,

Some operational work-related issues broke my planning yesterday.
I just made the changes to the watchdog tree.

My apologies,
Wim.

> Hi Stephen,
> 
> It's on my todo list for today.
> 
> Kind ergards,
> Wim.
> 
> > Hi all,
> > 
> > On Sun, 13 Dec 2020 22:09:55 -0800 Guenter Roeck  wrote:
> > >
> > > On 12/13/20 9:23 PM, Stephen Rothwell wrote:
> > > > Hi all,
> > > > 
> > > > After merging the watchdog tree, today's linux-next build (x86_64
> > > > allmodconfig) failed like this:
> > > > 
> > > > In file included from include/linux/device.h:15,
> > > >  from include/linux/acpi.h:15,
> > > >  from drivers/watchdog/iTCO_wdt.c:48:
> > > > drivers/watchdog/iTCO_wdt.c: In function 'iTCO_wdt_start':
> > > > drivers/watchdog/iTCO_wdt.c:280:17: error: 'struct watchdog_device' has 
> > > > no member named 'dev'
> > > >   280 |   dev_err(wd_dev->dev, "failed to reset NO_REBOOT flag, reboot 
> > > > disabled by hardware/BIOS\n");
> > > >   | ^~  
> > > 
> > > Yes, that should have been wd_dev->parent. Sorry I didn't notice that 
> > > earlier.
> > > 
> > > Guenter
> > > 
> > > > include/linux/dev_printk.h:112:11: note: in definition of macro 
> > > > 'dev_err'
> > > >   112 |  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > > >   |   ^~~
> > > > 
> > > > Caused by commit
> > > > 
> > > >   9c612b338fdf ("watchdog: iTCO_wdt: use dev_*() instead of pr_*() for 
> > > > logging")
> > > 
> > > > I have used the wtchdog tree from next-20201211 for today.
> > 
> > I am still getting this build failure.
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell
> 
> 


Re: linux-next: build failure after merge of the watchdog tree

2020-12-16 Thread Wim Van Sebroeck
Hi Stephen,

It's on my todo list for today.

Kind ergards,
Wim.

> Hi all,
> 
> On Sun, 13 Dec 2020 22:09:55 -0800 Guenter Roeck  wrote:
> >
> > On 12/13/20 9:23 PM, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > After merging the watchdog tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > > 
> > > In file included from include/linux/device.h:15,
> > >  from include/linux/acpi.h:15,
> > >  from drivers/watchdog/iTCO_wdt.c:48:
> > > drivers/watchdog/iTCO_wdt.c: In function 'iTCO_wdt_start':
> > > drivers/watchdog/iTCO_wdt.c:280:17: error: 'struct watchdog_device' has 
> > > no member named 'dev'
> > >   280 |   dev_err(wd_dev->dev, "failed to reset NO_REBOOT flag, reboot 
> > > disabled by hardware/BIOS\n");
> > >   | ^~  
> > 
> > Yes, that should have been wd_dev->parent. Sorry I didn't notice that 
> > earlier.
> > 
> > Guenter
> > 
> > > include/linux/dev_printk.h:112:11: note: in definition of macro 'dev_err'
> > >   112 |  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
> > >   |   ^~~
> > > 
> > > Caused by commit
> > > 
> > >   9c612b338fdf ("watchdog: iTCO_wdt: use dev_*() instead of pr_*() for 
> > > logging")
> > 
> > > I have used the wtchdog tree from next-20201211 for today.
> 
> I am still getting this build failure.
> 
> -- 
> Cheers,
> Stephen Rothwell




[GIT PULL REQUEST] watchdog - v5.10 Merge window

2020-10-21 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.10 release cycle.

This series contains:
* Add Toshiba Visconti watchdog driver
* it87_wdt: add IT8772 + IT8784
* several fixes and improvements

The output from git request-pull:

The following changes since commit a1b8638ba1320e6684aa98233c15255eb803fac7:

  Linux 5.9-rc7 (2020-09-27 14:38:10 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.10-rc1

for you to fetch changes up to c5b8e4644607b0319fd86a36fb0caad54ee2021e:

  watchdog: Add Toshiba Visconti watchdog driver (2020-10-14 15:22:58 +0200)


linux-watchdog 5.10-rc1 tag


Anson Huang (2):
  watchdog: imx7ulp: Strictly follow the sequence for wdog operations
  watchdog: imx7ulp: Watchdog should continue running for wait/stop mode

Christophe JAILLET (1):
  watchdog: pcwd_usb: Avoid GFP_ATOMIC where it is not needed

Dinghao Liu (2):
  watchdog: Fix memleak in watchdog_cdev_register
  watchdog: Use put_device on error

Guenter Roeck (2):
  watchdog: sp5100: Fix definition of EFCH_PM_DECODEEN3
  watchdog: sp5100_tco: Enable watchdog on Family 17h devices if disabled

Hanspeter Portner (2):
  watchdog: it87_wdt: add IT8772 ID
  watchdog: it87_wdt: add IT8784 ID

Krzysztof Kozlowski (3):
  watchdog: cadence: Simplify with dev_err_probe()
  watchdog: davinci: Simplify with dev_err_probe()
  watchdog: rti: Simplify with dev_err_probe()

Madhuparna Bhowmik (1):
  drivers: watchdog: rdc321x_wdt: Fix race condition bugs

Nobuhiro Iwamatsu (2):
  watchdog: bindings: Add binding documentation for Toshiba Visconti 
watchdog device
  watchdog: Add Toshiba Visconti watchdog driver

Wolfram Sang (1):
  watchdog: renesas_wdt: support handover from bootloader

Zhen Lei (1):
  watchdog: remove unneeded inclusion of 

 .../bindings/watchdog/toshiba,visconti-wdt.yaml|  54 ++
 drivers/watchdog/Kconfig   |   8 +
 drivers/watchdog/Makefile  |   1 +
 drivers/watchdog/cadence_wdt.c |   9 +-
 drivers/watchdog/davinci_wdt.c |   9 +-
 drivers/watchdog/imx7ulp_wdt.c |  79 +++--
 drivers/watchdog/it87_wdt.c|   6 +-
 drivers/watchdog/pcwd_usb.c|   2 +-
 drivers/watchdog/rdc321x_wdt.c |   5 +-
 drivers/watchdog/renesas_wdt.c |  12 +-
 drivers/watchdog/rti_wdt.c |  14 +-
 drivers/watchdog/sp5100_tco.c  |  18 ++
 drivers/watchdog/sp5100_tco.h  |   2 +-
 drivers/watchdog/visconti_wdt.c| 195 +
 drivers/watchdog/watchdog_dev.c|   8 +-
 15 files changed, 374 insertions(+), 48 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/watchdog/toshiba,visconti-wdt.yaml
 create mode 100644 drivers/watchdog/visconti_wdt.c


Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v5.9 Merge window

2020-08-12 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.2 release cycle.

This series contains:
* f71808e_wdt imporvements
* dw_wdt improvements
* mlx-wdt: support new watchdog type with longer timeout period
* fallthrough pseudo-keyword replacements
* overall small fixes and improvements

The output from git request-pull:

The following changes since commit 92ed301919932f13b9172e525674157e983d:

  Linux 5.8-rc7 (2020-07-26 14:14:06 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.9-rc1

for you to fetch changes up to d5b29c2c5ba2bd5bbdb5b744659984185d17d079:

  watchdog: rti-wdt: balance pm runtime enable calls (2020-08-05 18:43:03 +0200)


linux-watchdog 5.9-rc1 tag


Ahmad Fatoum (5):
  docs: watchdog: codify ident.options as superset of possible status flags
  watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in 
watchdog_info.options
  watchdog: f71808e_wdt: remove use of wrong watchdog_info option
  watchdog: f71808e_wdt: clear watchdog timeout occurred flag
  watchdog: f71808e_wdt: do stricter parameter validation

Alexander A. Klimov (1):
  watchdog: Replace HTTP links with HTTPS ones

Bumsik Kim (1):
  watchdog: test_bit() => watchdog_active()

Gustavo A. R. Silva (2):
  watchdog: Use fallthrough pseudo-keyword
  watchdog: scx200_wdt: Use fallthrough pseudo-keyword

Krzysztof Sobota (1):
  watchdog: initialize device before misc_register

Lad Prabhakar (1):
  dt-bindings: watchdog: renesas,wdt: Document r8a774e1 support

Lukas Bulwahn (1):
  MAINTAINERS: rectify entry in ARM SMC WATCHDOG DRIVER

Martin Wu (1):
  watchdog: sunxi_wdt: fix improper error exit code

Michael Shych (4):
  platform_data/mlxreg: support new watchdog type with longer timeout period
  platform/x86: mlx-platform: support new watchdog type with longer timeout
  watchdog: mlx-wdt: support new watchdog type with longer timeout period
  docs: watchdog: mlx-wdt: Add description of new watchdog type 3

Sai Prakash Ranjan (2):
  dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML
  dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150

Serge Semin (7):
  dt-bindings: watchdog: Convert DW WDT binding to DT schema
  dt-bindings: watchdog: dw-wdt: Support devices with asynch clocks
  dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property
  watchdog: dw_wdt: Support devices with non-fixed TOP values
  watchdog: dw_wdt: Support devices with asynch clocks
  watchdog: dw_wdt: Add pre-timeouts support
  watchdog: dw_wdt: Add DebugFS files

Tero Kristo (4):
  watchdog: use __watchdog_ping in startup
  watchdog: add support for adjusting last known HW keepalive time
  watchdog: rti-wdt: attach to running watchdog during probe
  watchdog: rti-wdt: balance pm runtime enable calls

Tiezhu Yang (1):
  watchdog: bcm_kona_wdt: Use correct return value for bcm_kona_wdt_probe()

Timothy Myers (1):
  watchdog: booke_wdt: Add common nowayout parameter driver

Wang Qing (1):
  watchdog: Use kobj_to_dev() API

Woody Lin (1):
  watchdog: softdog: Add options 'soft_reboot_cmd' and 'soft_active_on_boot'

Xu Wang (1):
  watchdog: pcwd_usb: remove needless check before usb_free_coherent()

 .../devicetree/bindings/watchdog/davinci-wdt.txt   |   4 +-
 .../devicetree/bindings/watchdog/dw_wdt.txt|  24 --
 .../devicetree/bindings/watchdog/qcom-wdt.txt  |  28 --
 .../devicetree/bindings/watchdog/qcom-wdt.yaml |  48 +++
 .../devicetree/bindings/watchdog/renesas,wdt.yaml  |   1 +
 .../devicetree/bindings/watchdog/snps,dw-wdt.yaml  |  90 +
 Documentation/watchdog/mlx-wdt.rst |  10 +
 Documentation/watchdog/watchdog-api.rst|   2 +-
 Documentation/watchdog/watchdog-kernel-api.rst |  12 +
 MAINTAINERS|   2 +-
 drivers/platform/x86/mlx-platform.c| 106 +
 drivers/watchdog/Kconfig   |   2 +-
 drivers/watchdog/advantechwdt.c|   2 +-
 drivers/watchdog/alim1535_wdt.c|   2 +-
 drivers/watchdog/alim7101_wdt.c|   2 +-
 drivers/watchdog/ar7_wdt.c |   3 +-
 drivers/watchdog/ath79_wdt.c   |   2 +-
 drivers/watchdog/bcm_kona_wdt.c|   2 +-
 drivers/watchdog/booke_wdt.c   |   6 +-
 drivers/watchdog/dw_wdt.c  | 439 +++--
 drivers/watchdog/eurotechwdt.c |   2 +-
 drivers/watchdog/f71808e_wdt.c |  54 ++-
 drivers/watchdog/gef_wdt.c |   2 +-
 drivers/watchdog/geo

[GIT PULL REQUEST] watchdog - v5.8 Merge window

2020-06-03 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.8 release cycle.

This series contains:
* Add new arm_smc_wdt watchdog driver
* da9062 and da9063 improvements
* Clarify documentation about stop() that became optional
* Document r8a7742 support
* some overall fixes and improvements

Please also note that Stephen Rothwell reported a conflict between the device 
tree and the watchdog tree on Tue, 26 May 2020 15:20:15 +1000.
He fixed it with the following patch:
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml 
b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 27e8c4accd67..572f4c912fef 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -24,6 +24,7 @@ properties:

   - items:
   - enum:
+  - renesas,r8a7742-wdt  # RZ/G1H
   - renesas,r8a7743-wdt  # RZ/G1M
   - renesas,r8a7744-wdt  # RZ/G1N
   - renesas,r8a7745-wdt  # RZ/G1E
---

The output from git request-pull:

The following changes since commit 9cb1fd0efd195590b828b9b865421ad345a4a145:

  Linux 5.7-rc7 (2020-05-24 15:32:54 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.8-rc1

for you to fetch changes up to 072cb8b628d312f5785ffdf324286a0519aed910:

  watchdog: m54xx: Add missing include (2020-05-25 08:55:47 +0200)


linux-watchdog 5.8-rc1 tag


Arnd Bergmann (1):
  watchdog: iTCO: fix link error

Bumsik Kim (1):
  watchdog: clarify that stop() is optional

Dinghao Liu (1):
  watchdog: Fix runtime PM imbalance on error

Evan Benn (1):
  dt-bindings: watchdog: Add ARM smc wdt for mt8173 watchdog

Fabio Estevam (1):
  watchdog: imx_sc_wdt: Fix reboot on crash

Jason Yan (1):
  watchdog: riowd: remove unneeded semicolon

Julius Werner (1):
  watchdog: Add new arm_smc_wdt watchdog driver

Lad Prabhakar (1):
  dt-bindings: watchdog: renesas,wdt: Document r8a7742 support

Shyam Saini (1):
  watchdog: ts72xx_wdt: fix build error

Stefan Riedmueller (3):
  watchdog: da9062: Initialize timeout during probe
  watchdog: da9063: Make use of pre-configured timeout during probe
  watchdog: da9062: No need to ping manually before setting timeout

Thomas Gleixner (1):
  watchdog: m54xx: Add missing include

Wolfram Sang (1):
  watchdog: imx2_wdt: update contact email

 .../devicetree/bindings/watchdog/arm-smc-wdt.yaml  |  37 
 .../devicetree/bindings/watchdog/renesas,wdt.txt   |   1 +
 .../watchdog/convert_drivers_to_kernel_api.rst |   2 +-
 Documentation/watchdog/watchdog-kernel-api.rst |   2 +-
 MAINTAINERS|   7 +
 arch/arm64/configs/defconfig   |   1 +
 drivers/watchdog/Kconfig   |  15 ++
 drivers/watchdog/Makefile  |   1 +
 drivers/watchdog/arm_smc_wdt.c | 188 +
 drivers/watchdog/da9062_wdt.c  |  32 ++--
 drivers/watchdog/da9063_wdt.c  |  20 ++-
 drivers/watchdog/imx2_wdt.c|   2 +-
 drivers/watchdog/imx_sc_wdt.c  |   5 +
 drivers/watchdog/m54xx_wdt.c   |   1 +
 drivers/watchdog/omap_wdt.c|   1 +
 drivers/watchdog/riowd.c   |   2 +-
 include/linux/watchdog.h   |   4 +-
 17 files changed, 299 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/arm-smc-wdt.yaml
 create mode 100644 drivers/watchdog/arm_smc_wdt.c


Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v5.4 Merge window

2019-09-27 Thread Wim Van Sebroeck
Hi Linus,

My apologies for the delay.

Please pull the watchdog changes for the v5.4 release cycle.

This series contains:
* addition of AST2600, i.MX7ULP and F81803 watchdog support
* removal of the w90x900 and ks8695 drivers
* ziirave_wdt improvements
* small fixes and improvements

The output from git request-pull:

The following changes since commit ad5e427e0f6b702e52c11d1f7b2b7be3bac7de82:

  Merge branch 'parisc-5.3-3' of 
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux (2019-07-23 
15:34:59 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.4-rc1

for you to fetch changes up to ca2fc5efffde5a3827adfb0ab6a51b6f1c64d5ff:

  watchdog: f71808e_wdt: Add F81803 support (2019-09-17 08:59:14 +0200)


linux-watchdog 5.4-rc1 tag


Andrey Smirnov (22):
  watchdog: ziirave_wdt: Add missing newline
  watchdog: ziirave_wdt: Be verbose about errors in probe()
  watchdog: ziirave_wdt: Be more verbose during firmware update
  watchdog: ziirave_wdt: Don't bail out on unexpected timeout value
  watchdog: ziirave_wdt: Log bootloader/firmware info during probe
  watchdog: ziirave_wdt: Simplify ziirave_firm_write_pkt()
  watchdog: ziirave_wdt: Check packet length only once
  watchdog: ziirave_wdt: Skip zeros when calculating checksum
  watchdog: ziirave_wdt: Fix incorrect use of ARRAY_SIZE
  watchdog: ziirave_wdt: Zero out only what's necessary
  watchdog: ziirave_wdt: Make use of put_unaligned_le16
  watchdog: ziirave_wdt: Don't check if ihex record length is zero
  watchdog: ziirave_wdt: Don't read out more than 'len' firmware bytes
  watchdog: ziirave_wdt: Don't try to program readonly flash
  watchdog: ziirave_wdt: Fix misleading error message
  watchdog: ziirave_wdt: Fix JUMP_TO_BOOTLOADER payload
  watchdog: ziirave_wdt: Fix DOWNLOAD_END payload
  watchdog: ziirave_wdt: Fix RESET_PROCESSOR payload
  watchdog: ziirave_wdt: Drop status polling code
  watchdog: ziirave_wdt: Fix DOWNLOAD_START payload
  watchdog: ziirave_wdt: Drop ziirave_firm_write_block_data()
  watchdog: ziirave_wdt: Update checked I2C functionality mask

Anson Huang (3):
  watchdog: imx_sc: Remove unnecessary error log
  dt-bindings: watchdog: Add i.MX7ULP bindings
  watchdog: Add i.MX7ULP watchdog support

Arnd Bergmann (4):
  watchdog: pnx4008_wdt: allow compile-testing
  watchdog: remove ks8695 driver
  watchdog: remove w90x900 driver
  watchdog: cpwd: use generic compat_ptr_ioctl

Chris Packham (1):
  watchdog: orion_wdt: use timer1 as a pretimeout

Christophe JAILLET (1):
  watchdog: ath79_wdt: fix a typo in the name of a function

Guenter Roeck (1):
  watchdog: diag288_wdt: Remove leftover includes from conversion to 
watchdog API

Gustavo A. R. Silva (5):
  watchdog: Mark expected switch fall-throughs
  watchdog: scx200_wdt: Mark expected switch fall-through
  watchdog: wdt977: Mark expected switch fall-through
  watchdog: riowd: Mark expected switch fall-through
  watchdog: jz4740: Fix unused variable warning in jz4740_wdt_probe

Ivan Mikhaylov (2):
  watchdog: aspeed: add support for dual boot
  watchdog: apseed: Add access_cs0 option for alt-boot

Jaret Cantu (1):
  watchdog: f71808e_wdt: Add F81803 support

Joel Stanley (1):
  dt-bindings: watchdog: Add ast2600 compatible

Jorge Ramirez-Ortiz (2):
  watchdog: qcom: support pre-timeout when the bark irq is available
  watchdog: qcom: remove unnecessary variable from private storage

Maxime Ripard (4):
  dt-bindings: watchdog: Add YAML schemas for the generic watchdog bindings
  dt-bindings: watchdog: Convert Allwinner watchdog to a schema
  dt-bindings: watchdog: sun4i: Add the watchdog interrupts
  dt-bindings: watchdog: sun4i: Add the watchdog clock

Oliver Graute (1):
  watchdog: imx_sc: this patch just fixes whitespaces

Rasmus Villemoes (1):
  watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout

Ryan Chen (1):
  watchdog: aspeed: Add support for AST2600

Stephen Boyd (1):
  watchdog: Remove dev_err() usage after platform_get_irq()

 Documentation/ABI/testing/sysfs-class-watchdog |  34 ++
 .../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml |  58 
 .../devicetree/bindings/watchdog/aspeed-wdt.txt|   1 +
 .../bindings/watchdog/fsl-imx7ulp-wdt.txt  |  22 ++
 .../devicetree/bindings/watchdog/sunxi-wdt.txt |  22 --
 .../devicetree/bindings/watchdog/watchdog.yaml |  26 ++
 Documentation/watchdog/watchdog-parameters.rst |  19 --
 drivers/watchdog/Kconfig   |  35 +-
 drivers/watchdog/Makefile  |   3 +-
 drivers/watchdog/ar7_w

[GIT PULL REQUEST] watchdog - v5.3 Merge window

2019-07-17 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.3 release cycle.

This series contains:
* add Allwinner H6 watchdog
* drop warning after registering device patches
* hpwdt improvements
* gpio: add support for nowayout option
* introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
* convert remaining drivers to use SPDX license identifier
* Fixes and improvements on several watchdog device drivers

Stephen resolved the following 2 conflicts in linux-next:
1) Documentation/watchdog/hpwdt.rst
Documentation/watchdog/watchdog-parameters.rst

between commit: cc2a2d19f896 ("docs: watchdog: convert docs to ReST and rename 
to *.rst") from the jc_docs tree 
and commit: 74665686f0e2 ("docs: watchdog: convert docs to ReST and rename to 
*.rst") from the watchdog tree.
These are the same patch with only a coouple of differences.

2) Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt

between commit: 8c21ead3ea5d ("dt-bindings: watchdog: move i.MX system 
controller watchdog binding to SCU") from the watchdog tree 
and commit: c2a6ea23a401 ("dt-bindings: fsl: scu: add ocotp binding") from the 
char-misc tree.


The output from git request-pull:

The following changes since commit 46713c3d2f8da5e3d8ddd2249bcb1d9974fb5d28:

  Merge tag 'for-linus-20190706' of git://git.kernel.dk/linux-block (2019-07-06 
11:48:39 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.3-rc1

for you to fetch changes up to 7fb832ae72949c883da52d6316ff08f03c75d300:

  watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe (2019-07-15 
08:49:11 +0200)


linux-watchdog 5.3-rc1 tag


Anson Huang (2):
  watchdog: imx_sc: Add pretimeout support
  dt-bindings: watchdog: move i.MX system controller watchdog binding to SCU

Clément Péron (1):
  dt-bindings: watchdog: add Allwinner H6 watchdog

Eugen Hristev (1):
  watchdog: sama5d4: fix WDD value to be always set to max

Greg Kroah-Hartman (2):
  watchdog: bcm_kona_wdt: no need to check return value of debugfs_create 
functions
  watchdog: mei_wdt: no need to check return value of debugfs_create 
functions

Guenter Roeck (1):
  watchdog: convert remaining drivers to use SPDX license identifier

Hoan Nguyen An (1):
  watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedly

Jerry Hoemann (7):
  watchdog/hpwdt: Stop hpwdt on unregister.
  watchdog/hpwdt: Advertize max_hw_heartbeat_ms
  watchdog/hpwdt: Have core ping watchdog.
  watchdog/hpwdt: Add module parameter kdumptimeout.
  watchdog/hpwdt: Update documentation
  watchdog/hpwdt: Reflect changes
  docs: watchdog: Fix build error.

Ken Sloat (1):
  watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend

Mans Rullgard (1):
  watchdog: gpio: add support for nowayout option

Mauro Carvalho Chehab (1):
  docs: watchdog: convert docs to ReST and rename to *.rst

Nathan Chancellor (1):
  watchdog: digicolor_wdt: Remove unused variable in dc_wdt_probe

Paul Cercueil (2):
  watchdog: jz4740: Use register names from 
  watchdog: jz4740: Avoid starting watchdog in set_timeout

Rasmus Villemoes (3):
  watchdog: introduce watchdog.open_timeout commandline parameter
  watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT
  watchdog: make the device time out at open_deadline when open_timeout is 
used

Sebastian Andrzej Siewior (1):
  watchdog: ie6xx_wdt: Use spinlock_t instead of struct spinlock

Simon Horman (1):
  dt-bindings: watchdog: Rename bindings documentation file

Stefan Wahren (1):
  watchdog: bcm2835_wdt: Fix module autoload

Wolfram Sang (46):
  watchdog: make watchdog_deferred_registration_add() void
  watchdog: let core print error message when registering device fails
  watchdog: aspeed_wdt: drop warning after registering device
  watchdog: bcm2835_wdt: drop warning after registering device
  watchdog: bcm7038_wdt: drop warning after registering device
  watchdog: bcm_kona_wdt: drop warning after registering device
  watchdog: cadence_wdt: drop warning after registering device
  watchdog: da9052_wdt: drop warning after registering device
  watchdog: da9062_wdt: drop warning after registering device
  watchdog: davinci_wdt: drop warning after registering device
  watchdog: digicolor_wdt: drop warning after registering device
  watchdog: ftwdt010_wdt: drop warning after registering device
  watchdog: hpwdt: drop warning after registering device
  watchdog: i6300esb: drop warning after registering device
  watchdog: ie6xx_wdt: drop warning after registering device
  watchdog: imx2_wdt: drop warning after registering device
  watchdog: imx_sc_wdt: drop warning after registering device
   

[GIT PULL REQUEST] watchdog - v5.2 Merge window

2019-05-13 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v5.2 release cycle.

This series contains:
* a new watchdog driver for the ROHM BD70528 watchdog block
* a new watchdog driver for the i.MX system controller watchdog
* Conversions to use device managed functions and other improvements
* refactor watchdog_init_timeout
* Make watchdog core configurable as module
* pretimeout governors improvements
* a lott of other fixes

The output from git request-pull:

The following changes since commit 6203838dec05352bc357625b1e9ba0a10d3bca35:

  Merge tag 'powerpc-5.1-7' of 
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux (2019-05-04 
12:24:05 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.2-rc1

for you to fetch changes up to a9f0bda567e32a2b44165b067adfc4a4f56d1815:

  watchdog: Enforce that at least one pretimeout governor is enabled 
(2019-05-08 10:33:59 +0200)


linux-watchdog 5.2-rc1 tag


Alexandre Belloni (1):
  watchdog: pnx4008: readout watchdog state

Anson Huang (3):
  dt-bindings: watchdog: add i.MX system controller watchdog
  watchdog: imx_sc: Add i.MX system controller watchdog support
  watchdog: imx2_wdt: use devm_platform_ioremap_resource() to simplify code

Bryan Tan (1):
  watchdog: wdat_wdt: fix get_timeleft call for wdat_wdt

Chris Packham (1):
  watchdog: orion_wdt: remove orion_wdt_set_timeout

Colin Ian King (1):
  watchdog: intel_scu_watchdog: fix spelling mistake: "set_hearbeat" -> 
"set_heartbeat"

Georg Hofmann (1):
  watchdog: imx2_wdt: Fix set_timeout for big timeout values

Guenter Roeck (75):
  watchdog: Convert to use devm_platform_ioremap_resource
  watchdog: rtd119x_wdt: Fix remove function
  watchdog: armada_37xx_wdt: Convert to use device managed functions and 
other improvements
  watchdog: asm9260_wdt: Convert to use device managed functions and other 
improvements
  watchdog: aspeed_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: atlas7_wdt: Convert to use device managed functions and other 
improvements
  watchdog: bcm2835_wdt: drop platform_set_drvdata
  watchdog: bcm7038_wdt: Convert to use device managed functions and other 
improvements
  watchdog: bcm_kona_wdt: Convert to use device managed functions and other 
improvements
  watchdog: cadence_wdt: Convert to use device managed functions and other 
improvements
  watchdog: da9052_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: da9055_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: da9062_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: da9063_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: davinci_wdt: Convert to use device managed functions and other 
improvements
  watchdog: ep93xx_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: ftwdt010_wdt: Use 'dev' consistently
  watchdog: gpio_wdt: Convert to use device managed functions and other 
improvements
  watchdog: iTCO_wdt: Various improvements
  watchdog: imgpdc_wdt: Convert to use device managed functions and other 
improvements
  watchdog: intel-mid_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: kempld_wdt: Convert to use device managed functions and other 
improvements
  watchdog: lpc18xx_wdt: Convert to use device managed functions and other 
improvements
  watchdog: max63xx_wdt: Convert to use device managed functions and other 
improvements
  watchdog: max77620_wdt: Convert to use device managed functions and other 
improvements
  watchdog: mena21_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: menf21bmc_wdt: Convert to use device managed functions and 
other improvements
  watchdog: meson_gxbb_wdt: Convert to use device managed functions and 
other improvements
  watchdog: meson_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: mlx_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: moxart_wdt: Convert to use device managed functions and other 
improvements
  watchdog: mtk_wdt: Convert to use device managed functions and other 
improvements
  watchdog: npcm_wdt: Use local variable 'dev' consistently
  watchdog: of_xilinx_wdt: Convert to use device managed functions and 
other improvements
  watchdog: pm8916_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: qcom-wdt: Convert to use device managed functions and other 
improvements
  watchdog: rn5t618_wdt: Use 'dev' instead of dereferencing it repeatedly
  watchdog: rtd119x_wdt: Convert to use device managed functions and other 
improvements
  watchdog: rza_wdt: Use 'dev' 

[GIT PULL REQUEST] watchdog - v5.1 Merge window

2019-03-10 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.21 release cycle.

This series contains:
* A new watchdog driver for the Mellanox systems
* renesas-wdt: Document r8a77470 support
* numerous Mark expected switch fall-throughs
* qcom: Add suspend/resume support
* some small fixes and documentation updates

The output from git request-pull:

The following changes since commit f17b5f06cb92ef2250513a1e154c47b78df07d40:

  Linux 5.0-rc4 (2019-01-27 15:18:05 -0800)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-5.1-rc1

for you to fetch changes up to 458c8961c194f2d2cb6ffed3dd9b6692d74ad65e:

  watchdog: w83877f_wdt: Mark expected switch fall-through (2019-03-02 15:28:22 
+0100)


linux-watchdog 5.1-rc1 tag


Biju Das (1):
  dt-bindings: watchdog: renesas-wdt: Document r8a77470 support

Gustavo A. R. Silva (6):
  watchdog: pc87413: Mark expected switch fall-through
  watchdog: sc1200: Mark expected switch fall-through
  watchdog: smsc37b787_wdt: Mark expected switch fall-through
  watchdog: sbc60xxwdt: Mark expected switch fall-through
  watchdog: sc520_wdt: Mark expected switch fall-through
  watchdog: w83877f_wdt: Mark expected switch fall-through

Jerry Hoemann (2):
  watchdog/hpwdt: Update Kconfig documentation
  watchdog: Update sysfs documentation.

Jisheng Zhang (1):
  watchdog: dw: remove useless pr_fmt

Michael Shych (3):
  platform_data/mlxreg: additions for Mellanox watchdog driver.
  watchdog: mlx-wdt: introduce a watchdog driver for Mellanox systems.
  Documentation/watchdog: Add documentation mlx-wdt driver

Sai Prakash Ranjan (1):
  watchdog: qcom: Add suspend/resume support

YueHaibing (1):
  watchdog: pika_wdt: drop pointless static qualifier in pikawdt_init

 Documentation/ABI/testing/sysfs-class-watchdog |  23 ++
 .../devicetree/bindings/watchdog/renesas-wdt.txt   |   1 +
 Documentation/watchdog/mlx-wdt.txt |  52 
 drivers/watchdog/Kconfig   |  25 +-
 drivers/watchdog/Makefile  |   1 +
 drivers/watchdog/dw_wdt.c  |   2 -
 drivers/watchdog/mlx_wdt.c | 290 +
 drivers/watchdog/pc87413_wdt.c |   2 +-
 drivers/watchdog/pika_wdt.c|   2 +-
 drivers/watchdog/qcom-wdt.c|  23 ++
 drivers/watchdog/sbc60xxwdt.c  |   2 +-
 drivers/watchdog/sc1200wdt.c   |   2 +-
 drivers/watchdog/sc520_wdt.c   |   2 +-
 drivers/watchdog/smsc37b787_wdt.c  |   2 +-
 drivers/watchdog/w83877f_wdt.c |   2 +-
 include/linux/platform_data/mlxreg.h   |  19 ++
 16 files changed, 437 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/watchdog/mlx-wdt.txt
 create mode 100644 drivers/watchdog/mlx_wdt.c


Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v5.0-rc Fixes

2019-01-19 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.21 release cycle.

This series contains:
* mt7621_wdt/rt2880_wdt: Fix compilation problem
* tqmx86: Fix a couple IS_ERR() vs NULL bugs

The output from git request-pull:

The following changes since commit 3bd6e94bec122a951d462c239b47954cf5f36e33:

  arch: restore generic-y += shmparam.h for some architectures (2019-01-06 
18:16:11 -0800)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git 
tags/linux-watchdog-5.0-rc-fixes

for you to fetch changes up to 4a22fc534f2f55808c41197cf17d829099032acb:

  watchdog: tqmx86: Fix a couple IS_ERR() vs NULL bugs (2019-01-07 10:10:35 
+0100)


linux-watchdog 5.0-rc-fixes tag


Dan Carpenter (1):
  watchdog: tqmx86: Fix a couple IS_ERR() vs NULL bugs

NeilBrown (1):
  watchdog: mt7621_wdt/rt2880_wdt: Fix compilation problem

 drivers/watchdog/mt7621_wdt.c | 1 +
 drivers/watchdog/rt2880_wdt.c | 1 +
 drivers/watchdog/tqmx86_wdt.c | 8 
 3 files changed, 6 insertions(+), 4 deletions(-)


Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.21 Merge window

2018-12-30 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.21 release cycle.

This series contains:
* add TQ-Systems TQMX86 watchdog driver
* add Qualcomm PM8916 watchdog driver
* w83627hf_wdt: add quirk for Inves system
* renesas_wdt: several improvements and document r8a774c0 support
* mena21_wdt, mtx-1: Convert to use GPIO descriptor
* bcm281xx, ie6xx_wdt: convert to DEFINE_SHOW_ATTRIBUTE
* documentation: add PM usage and kernel-api: don't reference removed functions
* update bindings for MT7629 SoC
* several small fixes

The output from git request-pull:

The following changes since commit ccda4af0f4b92f7b4c308d3acc262f4a7e3affad:

  Linux 4.20-rc2 (2018-11-11 17:12:31 -0600)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-4.21-rc1

for you to fetch changes up to e3c21e088f8936a004a3d9f2f4e14b3f2bdd6ea9:

  watchdog: tqmx86: Add watchdog driver for the IO controller (2018-12-24 
13:15:07 +0100)


linux-watchdog 4.21-rc1 tag


Andrew Lunn (1):
  watchdog: tqmx86: Add watchdog driver for the IO controller

Colin Ian King (1):
  watchdog: asm9260_wdt: make array mode_name static, shrinks object size

Fabrizio Castro (2):
  watchdog: renesas_wdt: Fix typos
  dt-bindings: watchdog: renesas-wdt: Document r8a774c0 support

Hardik Singh Rathore (1):
  Watchdog: remove outdated comment

Jean Delvare (1):
  watchdog: w83627hf_wdt: Add quirk for Inves system

Jerry Hoemann (3):
  watchdog/hpwdt: Exclude via blacklist
  watchdog/hpwdt: Do not claim unsupported hardware
  watchdog/hpwdt: Update driver version.

Linus Walleij (2):
  watchdog: mena21_wdt: Convert to GPIO descriptors
  watchdog: mtx-1: Convert to use GPIO descriptor

Loic Poulain (2):
  watchdog: Add pm8916 watchdog driver
  dt-bindings: watchdog: Add Qualcomm PM8916 watchdog

Ryder Lee (1):
  dt-bindings: watchdog: update bindings for MT7629 SoC

Tomer Maimon (1):
  watchdog: npcm: Modify npcm watchdog kconfig arch parameter

Wolfram Sang (4):
  watchdog: renesas_wdt: don't set divider while watchdog is running
  watchdog: renesas_wdt: don't keep timer value during suspend/resume
  watchdog: add documentation for PM usage
  watchdog: docs: kernel-api: don't reference removed functions

Yangtao Li (3):
  watchdog: cpwd: add of_node_put()
  watchdog: bcm281xx: convert to DEFINE_SHOW_ATTRIBUTE
  watchdog: ie6xx_wdt: convert to DEFINE_SHOW_ATTRIBUTE

 .../devicetree/bindings/watchdog/mtk-wdt.txt   |   1 +
 .../bindings/watchdog/qcom,pm8916-wdt.txt  |  28 +++
 .../devicetree/bindings/watchdog/renesas-wdt.txt   |   1 +
 Documentation/watchdog/watchdog-kernel-api.txt |   4 -
 Documentation/watchdog/watchdog-pm.txt |  19 ++
 arch/mips/alchemy/board-mtx1.c |  18 +-
 drivers/watchdog/Kconfig   |  22 ++-
 drivers/watchdog/Makefile  |   2 +
 drivers/watchdog/asm9260_wdt.c |   2 +-
 drivers/watchdog/bcm_kona_wdt.c|  16 +-
 drivers/watchdog/cpwd.c|   2 +
 drivers/watchdog/hpwdt.c   |  15 +-
 drivers/watchdog/ie6xx_wdt.c   |  16 +-
 drivers/watchdog/mena21_wdt.c  |  73 ---
 drivers/watchdog/mtx-1_wdt.c   |  19 +-
 drivers/watchdog/pm8916_wdt.c  | 211 +
 drivers/watchdog/renesas_wdt.c |  24 +--
 drivers/watchdog/tqmx86_wdt.c  | 126 
 drivers/watchdog/w83627hf_wdt.c|  38 +++-
 include/linux/watchdog.h   |   3 -
 20 files changed, 529 insertions(+), 111 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/watchdog/qcom,pm8916-wdt.txt
 create mode 100644 Documentation/watchdog/watchdog-pm.txt
 create mode 100644 drivers/watchdog/pm8916_wdt.c
 create mode 100644 drivers/watchdog/tqmx86_wdt.c


Kind regards and best wishes,
Wim.



[GIT PULL REQUEST] watchdog - v4.20 Merge window

2018-10-27 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.20 (or 5.00) release cycle.

This series contains:
* Add Armada 37xx CPU watchdog
* w83627hf_wdt: Add Support for NCT6796D, NCT6797D, NCT6798D
* hpwdt: several improvements
* renesas_wdt: SPDX identifiers, stop when unregistering, support for R7S9210
* rza_wdt: SPDX identifiers, support longer timeouts
* core: fix null pointer dereference when releasing cdev
* iTCO_wdt: Drop option vendorsupport=2
* sama5d4: fix timeout-sec usage
* lantiq_wdt: convert to watchdog framework
* several small fixes

The output from git request-pull:


The following changes since commit 17b57b1883c1285f3d0dc2266e8f79286a7bef38:

  Linux 4.19-rc6 (2018-09-30 07:15:35 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-4.20-rc1

for you to fetch changes up to cd6ba41c192deca20d9add5554bc8c51d0f07de2:

  watchdog: ts4800: release syscon device node in ts4800_wdt_probe() 
(2018-10-22 10:16:28 +0200)


linux-watchdog 4.20-rc1 tag


Alexey Khoroshilov (1):
  watchdog: ts4800: release syscon device node in ts4800_wdt_probe()

Chris Brandt (2):
  watchdog: rza_wdt: Support longer timeouts
  dt-bindings: watchdog: renesas-wdt: Add support for R7S9210

Christophe Leroy (3):
  watchdog: mpc8xxx: use dev_() instead of pr_()
  watchdog: mpc8xxx: provide boot status
  dt-bindings: watchdog: add mpc8xxx-wdt support

Guenter Roeck (2):
  watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D
  MAINTAINERS: Fix file pattern for MEN Z069 watchdog driver

Hauke Mehrtens (3):
  watchdog: lantiq: update register names to better match spec
  watchdog: lantiq: Convert to watchdog_device
  watchdog: lantiq: add get_timeleft callback

Jean Delvare (2):
  watchdog: iTCO_wdt: Drop option vendorsupport=2
  watchdog: iTCO_wdt: Remove unused hooks

Jerry Hoemann (7):
  watchdog: hpwdt: Initialize pretimeout from module parameter.
  watchdog: hpwdt: Claim NMI from iLO
  watchdog: hpwdt: Display module parameters.
  watchdog: hpwdt: Module paramerter alias.
  watchdog: hpwdt: Update version number.
  watchdog: hpwdt: Update Driver Documentation.
  watchdog: hpwdt: Disable PreTimeout when Timeout is smaller

Kuninori Morimoto (1):
  watchdog: rza_wdt: convert to SPDX identifiers

Marek Behún (4):
  watchdog: Add support for Armada 37xx CPU watchdog
  dt-bindings: watchdog: Document armada-37xx-wdt binding
  documentation: watchdog: add documentation for armada-37xx-wdt
  watchdog: armada_37xx_wdt: use do_div for u64 division

Robert P. J. Day (1):
  watchdog: fix a small number of "watchog" typos in comments

Romain Izard (1):
  watchdog: sama5d4: fix timeout-sec usage

Wolfram Sang (3):
  watchdog: renesas_wdt: use SPDX identifier for Renesas drivers
  watchdog: core: fix null pointer dereference when releasing cdev
  watchdog: renesas_wdt: stop when unregistering

 .../bindings/watchdog/armada-37xx-wdt.txt  |  23 ++
 .../devicetree/bindings/watchdog/mpc8xxx-wdt.txt   |  25 ++
 .../devicetree/bindings/watchdog/renesas-wdt.txt   |   1 +
 Documentation/watchdog/hpwdt.txt   |  93 ++---
 Documentation/watchdog/watchdog-parameters.txt |   5 +
 MAINTAINERS|   2 +-
 drivers/watchdog/Kconfig   |  12 +
 drivers/watchdog/Makefile  |   1 +
 drivers/watchdog/armada_37xx_wdt.c | 388 +
 drivers/watchdog/booke_wdt.c   |   2 +-
 drivers/watchdog/hpwdt.c   |  24 +-
 drivers/watchdog/iTCO_vendor.h |   4 -
 drivers/watchdog/iTCO_vendor_support.c | 168 +
 drivers/watchdog/iTCO_wdt.c|   4 -
 drivers/watchdog/lantiq_wdt.c  | 311 -
 drivers/watchdog/mpc8xxx_wdt.c |  46 ++-
 drivers/watchdog/renesas_wdt.c |   6 +-
 drivers/watchdog/rza_wdt.c |  93 +++--
 drivers/watchdog/sama5d4_wdt.c |   6 +-
 drivers/watchdog/ts4800_wdt.c  |   1 +
 drivers/watchdog/via_wdt.c |   4 +-
 drivers/watchdog/w83627hf_wdt.c|   8 +-
 drivers/watchdog/watchdog_dev.c|  10 +-
 23 files changed, 783 insertions(+), 454 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/mpc8xxx-wdt.txt
 create mode 100644 drivers/watchdog/armada_37xx_wdt.c


Re: [PATCH] watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D

2018-10-02 Thread Wim Van Sebroeck
On Sun, Sep 23, 2018 at 06:54:11AM -0700, Guenter Roeck wrote:

> The watchdog controller on NCT6796D, NCT6797D, and NCT6798D is compatible
> with the wtachdog controller on other Nuvoton chips.
> 
> Signed-off-by: Guenter Roeck 

Reviewed-by: Wim Van Sebroeck 

> ---
>  drivers/watchdog/w83627hf_wdt.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index 7817836bff55..4b9365d4de7a 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -50,7 +50,7 @@ static int cr_wdt_csr;  /* WDT control & status 
> register */
>  enum chips { w83627hf, w83627s, w83697hf, w83697ug, w83637hf, w83627thf,
>w83687thf, w83627ehf, w83627dhg, w83627uhg, w83667hg, w83627dhg_p,
>w83667hg_b, nct6775, nct6776, nct6779, nct6791, nct6792, nct6793,
> -  nct6795, nct6102 };
> +  nct6795, nct6796, nct6102 };
>  
>  static int timeout;  /* in seconds */
>  module_param(timeout, int, 0);
> @@ -100,6 +100,7 @@ MODULE_PARM_DESC(early_disable, "Disable watchdog at boot 
> time (default=0)");
>  #define NCT6792_ID   0xc9
>  #define NCT6793_ID   0xd1
>  #define NCT6795_ID   0xd3
> +#define NCT6796_ID   0xd4/* also NCT9697D, NCT9698D */
>  
>  #define W83627HF_WDT_TIMEOUT 0xf6
>  #define W83697HF_WDT_TIMEOUT 0xf4
> @@ -209,6 +210,7 @@ static int w83627hf_init(struct watchdog_device *wdog, 
> enum chips chip)
>   case nct6792:
>   case nct6793:
>   case nct6795:
> + case nct6796:
>   case nct6102:
>   /*
>* These chips have a fixed WDTO# output pin (W83627UHG),
> @@ -407,6 +409,9 @@ static int wdt_find(int addr)
>   case NCT6795_ID:
>   ret = nct6795;
>   break;
> + case NCT6796_ID:
> + ret = nct6796;
> + break;
>   case NCT6102_ID:
>   ret = nct6102;
>   cr_wdt_timeout = NCT6102D_WDT_TIMEOUT;
> @@ -450,6 +455,7 @@ static int __init wdt_init(void)
>   "NCT6792",
>   "NCT6793",
>   "NCT6795",
> + "NCT6796",
>   "NCT6102",
>   };
>  
> -- 
> 2.7.4
> 


[GIT PULL REQUEST] watchdog - v4.19-rc2

2018-09-01 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.19 release cycle.

This pull contains:
* renesas-wdt: Document support for r8a774a1

The output from git request-pull:


The following changes since commit 3f16503b7d2274ac8cbab11163047ac0b4c66cfe:

  Merge branch 'fixes' of 
git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 
(2018-08-28 16:11:34 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-4.19-rc2

for you to fetch changes up to 74081c9f16a213f8f2681c175dc6ad7d17ad16ba:

  dt-bindings: watchdog: renesas-wdt: Document r8a774a1 support (2018-08-29 
20:32:04 +0200)


linux-watchdog 4.19-rc2 tag


Fabrizio Castro (1):
  dt-bindings: watchdog: renesas-wdt: Document r8a774a1 support

 Documentation/devicetree/bindings/watchdog/renesas-wdt.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)



Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.19 Merge window

2018-08-17 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.19 release cycle.

This series contains:
* MEN 16z069 IP-Core: Add driver
* renesas-wdt: Add support for the R8A77990 wdt
* stm32_iwdg: Add stm32mp1 support and pclk feature
* sp805_wdt, orion_wdt, sprd_wdt: add several improvements
* imx2_wdt, stmp3xxx: Switch to SPDX identifier

The output from git request-pull:


The following changes since commit 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe:

  Linux 4.18-rc5 (2018-07-15 12:49:31 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-4.19-rc1

for you to fetch changes up to 12aea518a202bc7c947553840f1d93f8129b41b2:

  watchdog: fix dependencies of menz69_wdt.o (2018-08-06 17:12:42 +0200)


linux-watchdog 4.19-rc1 tag


Fabio Estevam (2):
  watchdog: imx2_wdt: Switch to SPDX identifier
  watchdog: stmp3xxx: Switch to SPDX identifier

Johannes Thumshirn (2):
  watchdog: add driver for the MEN 16z069 IP-Core
  watchdog: fix dependencies of menz69_wdt.o

Ludovic Barre (2):
  dt-bindings: watchdog: add stm32mp1 support
  watchdog: stm32: add pclk feature for stm32mp1

Masaharu Hayakawa (1):
  dt-bindings: watchdog: renesas-wdt: Add support for the R8A77990 wdt

Maxim Kochetkov (1):
  watchdog: orion_wdt: Mark watchdog as active when running at probe

Ray Jui (4):
  dt-bindings: watchdog: Consolidate SP805 binding docs
  dt-bindings: watchdog: Add optional 'timeout-sec' property for sp805
  watchdog: sp805: add 'timeout-sec' DT property support
  watchdog: sp805: set WDOG_HW_RUNNING when appropriate

Srinath Mannam (1):
  watchdog: sp805: Add clock-frequency property

Wei Yongjun (1):
  watchdog: sprd_wdt: Remove redundant dev_err call in sprd_wdt_probe()

 .../devicetree/bindings/watchdog/arm,sp805.txt |  29 +++-
 .../devicetree/bindings/watchdog/renesas-wdt.txt   |   1 +
 .../devicetree/bindings/watchdog/sp805-wdt.txt |  31 
 .../devicetree/bindings/watchdog/st,stm32-iwdg.txt |  13 +-
 MAINTAINERS|   6 +
 drivers/watchdog/Kconfig   |  10 ++
 drivers/watchdog/Makefile  |   1 +
 drivers/watchdog/imx2_wdt.c|   5 +-
 drivers/watchdog/menz69_wdt.c  | 170 +
 drivers/watchdog/orion_wdt.c   |   2 +
 drivers/watchdog/sp805_wdt.c   |  63 ++--
 drivers/watchdog/sprd_wdt.c|   4 +-
 drivers/watchdog/stm32_iwdg.c  | 116 +-
 drivers/watchdog/stmp3xxx_rtc_wdt.c|   5 +-
 14 files changed, 351 insertions(+), 105 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/watchdog/sp805-wdt.txt
 create mode 100644 drivers/watchdog/menz69_wdt.c


Re: linux-next: Tree for Aug 3 (watchdog/menz69_wdt.c)

2018-08-06 Thread Wim Van Sebroeck
Hi Johannes,

> On Fri, Aug 03, 2018 at 08:39:48AM -0700, Randy Dunlap wrote:
> > On 08/03/2018 02:29 AM, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Changes since 20180802:
> > > 
> > 
> > Hi,
> > 
> > On i386 randconfig with COMPILE_TEST=y and MCB not enabled, I see:
> > 
> > drivers/watchdog/menz69_wdt.o: In function `men_z069_remove':
> > menz69_wdt.c:(.text+0xa6): undefined reference to `mcb_release_mem'
> > drivers/watchdog/menz69_wdt.o: In function `men_z069_probe':
> > menz69_wdt.c:(.text+0xdb): undefined reference to `mcb_request_mem'
> > menz69_wdt.c:(.text+0x14a): undefined reference to `mcb_release_mem'
> > drivers/watchdog/menz69_wdt.o: In function `men_z069_driver_init':
> > menz69_wdt.c:(.init.text+0x15): undefined reference to 
> > `__mcb_register_driver'
> > drivers/watchdog/menz69_wdt.o: In function `men_z069_driver_exit':
> > menz69_wdt.c:(.exit.text+0x9): undefined reference to 
> > `mcb_unregister_driver'
> > 
> > 
> > The Kconfig for MENZ069_WATCHDOG says:
> > config MENZ069_WATCHDOG
> > tristate "MEN 16Z069 Watchdog"
> > depends on MCB || COMPILE_TEST
> > select WATCHDOG_CORE
> > 
> > Looks to me like the driver really depends on MCB, unless someone wants
> > to add stubs in .
> 
> *doh* looks like a copy & paste error. Wim can you fold that one in
> (or stage to your tree)?

Added in my tree.

Kind regards,
Wim.

> >From ae045015849cd15fd180e20f44d364e7a37c39c6 Mon Sep 17 00:00:00 2001
> From: Johannes Thumshirn 
> Date: Fri, 3 Aug 2018 18:35:17 +0200
> Subject: [PATCH] watchdog: fix dependencies  of menz69_wdt.o
> 
> Currently menz69_wdt.ko has a dependency on MCB or COMPILE_TEST. But
> it actually needs symbols exported by MCB so the || COMPILE_TEST is
> wrong.
> 
> Signed-off-by: Johannes Thumshirn 
> Reported-by: Randy Dunlap 
> ---
>  drivers/watchdog/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index df55d65bbb1c..5ea8909a41f9 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -163,7 +163,7 @@ config MENF21BMC_WATCHDOG
>  
>  config MENZ069_WATCHDOG
>   tristate "MEN 16Z069 Watchdog"
> - depends on MCB || COMPILE_TEST
> + depends on MCB
>   select WATCHDOG_CORE
>   help
> Say Y here to include support for the MEN 16Z069 Watchdog.
> -- 
> 2.16.4
> 
> 
> 
> -- 
> Johannes Thumshirn  Storage
> jthumsh...@suse.de+49 911 74053 689
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
> Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850


[GIT PULL REQUEST] watchdog - v4.18 Merge window

2018-06-11 Thread Wim Van Sebroeck
Hi Linus,

Please pull the watchdog changes for the v4.18 release cycle.

This series contains:
* renesas_wdt: Add support for the R8A77965 WDT and R-Car Gen2
* renesas-wdt: Remove R-Car M2-W ES2.x from blacklist
* watchdog: Simplify getting .drvdata
* sp805: Add restart handler
* hpwdt: Claim NMIs generated by iLO5
* mena21_wdt: Drop unnecessary mutex lock
* da9062 & da9063: Fixes and general cleanups.

The output from git request-pull:


The following changes since commit 771c577c23bac90597c685971d7297ea00f99d11:

  Linux 4.17-rc6 (2018-05-20 15:31:38 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-4.18-rc1

for you to fetch changes up to 16a7eec2fcd020c73cf0ca38bf774775167d22eb:

  watchdog: da9063: remove duplicated timeout_to_sel calls (2018-06-07 12:41:43 
+0200)


linux-watchdog 4.18-rc1 tag


Fabrizio Castro (1):
  dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support

Geert Uytterhoeven (1):
  watchdog: renesas-wdt: Remove R-Car M2-W ES2.x from blacklist

Jerry Hoemann (1):
  watchdog: hpwdt: Claim NMIs generated by iLO5

Jia-Ju Bai (1):
  watchdog: mena21_wdt: Drop unnecessary mutex lock

Jongsung Kim (1):
  watchdog: sp805: add restart handler

Marco Felsch (5):
  watchdog: da9063: Fix setting/changing timeout
  watchdog: da9063: Fix updating timeout value
  watchdog: da9063: Fix timeout handling during probe
  watchdog: da9063: rename helper function to avoid misunderstandings
  watchdog: da9063: remove duplicated timeout_to_sel calls

Michael Grzeschik (1):
  watchdog: da9062: remove unused code

Wolfram Sang (2):
  watchdog: simplify getting .drvdata
  watchdog: renesas-wdt: Add support for the R8A77965 WDT

 .../devicetree/bindings/watchdog/renesas-wdt.txt   | 23 ---
 drivers/watchdog/cadence_wdt.c |  6 +-
 drivers/watchdog/da9062_wdt.c  | 10 ---
 drivers/watchdog/da9063_wdt.c  | 73 ++
 drivers/watchdog/hpwdt.c   |  2 +-
 drivers/watchdog/mena21_wdt.c  | 18 --
 drivers/watchdog/of_xilinx_wdt.c   |  6 +-
 drivers/watchdog/renesas_wdt.c |  2 +-
 drivers/watchdog/sp805_wdt.c   | 14 +
 drivers/watchdog/wdat_wdt.c|  6 +-
 10 files changed, 100 insertions(+), 60 deletions(-)


[GIT PULL REQUEST] watchdog - v4.17-rc2 patches

2018-04-20 Thread Wim Van Sebroeck
Hi Linus,

Please pull the following watchdog changes for the v4.17 release cycle.

This series contains:
- fall-through fixes
- MAINTAINER change for hpwdt
- renesas-wdt: Add support for WDIOF_CARDRESET
- aspeed: set bootstatus during probe

The output from git request-pull:


The following changes since commit 60cc43fc888428bb2f18f08997432d426a243338:

  Linux 4.17-rc1 (2018-04-15 18:24:20 -0700)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git tags/linux-watchdog-4.17-rc2

for you to fetch changes up to 49d4d277ca54e04170d39484c8758a0ea9bca37d:

  aspeed: watchdog: Set bootstatus during probe (2018-04-16 10:22:40 +0200)


linux-watchdog 4.17-rc2 tag


Eddie James (1):
  aspeed: watchdog: Set bootstatus during probe

Gustavo A. R. Silva (3):
  watchdog: sch311x_wdt: Mark expected switch fall-through
  watchdog: w83977f_wdt: Mark expected switch fall-through
  watchdog: wafer5823wdt: Mark expected switch fall-through

Jerry Hoemann (1):
  watchdog: hpwdt: change maintainer.

Veeraiyan Chidambaram (1):
  watchdog: renesas-wdt: Add support for WDIOF_CARDRESET

 MAINTAINERS | 2 +-
 drivers/watchdog/aspeed_wdt.c   | 7 +++
 drivers/watchdog/renesas_wdt.c  | 6 --
 drivers/watchdog/sch311x_wdt.c  | 2 +-
 drivers/watchdog/w83977f_wdt.c  | 2 +-
 drivers/watchdog/wafer5823wdt.c | 2 +-
 6 files changed, 15 insertions(+), 6 deletions(-)


Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.16 merge window

2018-02-07 Thread Wim Van Sebroeck
ini/ftwdt010: rename driver and symbols
  watchdog: ftwdt010: Make interrupt optional

Martin Kaiser (1):
  watchdog: imx2_wdt: restore previous timeout after suspend+resume

Mathieu Malaterre (2):
  watchdog: jz4740: Add support for the watchdog in jz4780 SoC
  dt: watchdog: Document compatibility with JZ4780

Matt Redfearn (1):
  watchdog: indydog: Add dependency on SGI_HAS_INDYDOG

Michael Grzeschik (3):
  watchdog: da9062: Add restart handler support
  watchdog: da9062: Disable and wait before changing timeout
  watchdog: da9062: use protection delay mechanism from core

Oleksij Rempel (1):
  watchdog: dw_wdt: add stop watchdog operation

Radu Rendec (6):
  watchdog: i6300esb: use the watchdog subsystem
  watchdog: i6300esb: support multiple devices
  watchdog: i6300esb: do not hardcode heartbeat limits
  watchdog: i6300esb: remove info message and version number
  watchdog: xen_wdt: use the watchdog subsystem
  watchdog: xen_wdt: remove info message and version number

Rasmus Villemoes (1):
  watchdog: gpio_wdt: set WDOG_HW_RUNNING in gpio_wdt_stop

Tomas Winkler (1):
  watchdog: mei_wdt: don't use of variable length array

Wim Van Sebroeck (1):
  Change my E-mail address.

 .../bindings/watchdog/cortina,gemini-watchdog.txt  |  17 -
 ...ina,gemin-watchdog.txt => faraday,ftwdt010.txt} |  11 +-
 .../bindings/watchdog/ingenic,jz4740-wdt.txt   |   4 +-
 .../bindings/watchdog/realtek,rtd119x.txt  |  17 +
 .../devicetree/bindings/watchdog/renesas-wdt.txt   |   3 +-
 .../devicetree/bindings/watchdog/sprd-wdt.txt  |  19 +
 Documentation/watchdog/watchdog-parameters.txt |  23 -
 MAINTAINERS|   4 +-
 drivers/watchdog/Kconfig   |  41 +-
 drivers/watchdog/Makefile  |   7 +-
 drivers/watchdog/advantechwdt.c|   2 +-
 drivers/watchdog/alim1535_wdt.c|   2 +-
 drivers/watchdog/aspeed_wdt.c  |  21 +-
 drivers/watchdog/at32ap700x_wdt.c  | 433 -
 drivers/watchdog/da9062_wdt.c  |  48 +-
 drivers/watchdog/davinci_wdt.c |  38 ++
 drivers/watchdog/dw_wdt.c  |  18 +-
 drivers/watchdog/eurotechwdt.c |   2 +-
 drivers/watchdog/f71808e_wdt.c |   4 +-
 drivers/watchdog/ftwdt010_wdt.c| 236 +++
 drivers/watchdog/gemini_wdt.c  | 229 ---
 drivers/watchdog/gpio_wdt.c|  58 +-
 drivers/watchdog/hpwdt.c   |  12 +-
 drivers/watchdog/i6300esb.c| 377 ---
 drivers/watchdog/ib700wdt.c|   2 +-
 drivers/watchdog/imx2_wdt.c|  20 +-
 drivers/watchdog/jz4740_wdt.c  |   1 +
 drivers/watchdog/mei_wdt.c |   7 +-
 drivers/watchdog/mpc8xxx_wdt.c |  83 ++-
 drivers/watchdog/mt7621_wdt.c  |  34 +-
 drivers/watchdog/orion_wdt.c   |   2 +-
 drivers/watchdog/pcwd_pci.c|   2 +-
 drivers/watchdog/pcwd_usb.c|   5 +-
 drivers/watchdog/rtd119x_wdt.c | 168 +
 drivers/watchdog/sp5100_tco.c  | 710 +
 drivers/watchdog/sp5100_tco.h  |  57 +-
 drivers/watchdog/sprd_wdt.c| 399 
 drivers/watchdog/stm32_iwdg.c  |   6 +-
 drivers/watchdog/sunxi_wdt.c   |   7 +-
 drivers/watchdog/watchdog_core.c   |   1 +
 drivers/watchdog/watchdog_dev.c| 125 ++--
 drivers/watchdog/wdt_pci.c |   2 +-
 drivers/watchdog/xen_wdt.c | 255 ++--
 43 files changed, 1711 insertions(+), 1801 deletions(-)
 delete mode 100644 
Documentation/devicetree/bindings/watchdog/cortina,gemini-watchdog.txt
 rename Documentation/devicetree/bindings/watchdog/{cortina,gemin-watchdog.txt 
=> faraday,ftwdt010.txt} (55%)
 create mode 100644 
Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/sprd-wdt.txt
 delete mode 100644 drivers/watchdog/at32ap700x_wdt.c
 create mode 100644 drivers/watchdog/ftwdt010_wdt.c
 delete mode 100644 drivers/watchdog/gemini_wdt.c
 create mode 100644 drivers/watchdog/rtd119x_wdt.c
 create mode 100644 drivers/watchdog/sprd_wdt.c



Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.16 merge window

2018-02-05 Thread Wim Van Sebroeck
ode heartbeat limits
  watchdog: i6300esb: remove info message and version number
  watchdog: xen_wdt: use the watchdog subsystem
  watchdog: xen_wdt: remove info message and version number

Rasmus Villemoes (1):
  watchdog: gpio_wdt: set WDOG_HW_RUNNING in gpio_wdt_stop

Tomas Winkler (1):
  watchdog: mei_wdt: don't use of variable length array

Wim Van Sebroeck (1):
  Change my E-mail address.

 .../bindings/watchdog/cortina,gemini-watchdog.txt  |  17 -
 ...ina,gemin-watchdog.txt => faraday,ftwdt010.txt} |  11 +-
 .../bindings/watchdog/ingenic,jz4740-wdt.txt   |   4 +-
 .../bindings/watchdog/realtek,rtd119x.txt  |  17 +
 .../devicetree/bindings/watchdog/renesas-wdt.txt   |   3 +-
 .../devicetree/bindings/watchdog/sprd-wdt.txt  |  19 +
 Documentation/watchdog/watchdog-parameters.txt |  23 -
 MAINTAINERS|   4 +-
 drivers/watchdog/Kconfig   |  41 +-
 drivers/watchdog/Makefile  |   7 +-
 drivers/watchdog/advantechwdt.c|   2 +-
 drivers/watchdog/alim1535_wdt.c|   2 +-
 drivers/watchdog/aspeed_wdt.c  |  21 +-
 drivers/watchdog/at32ap700x_wdt.c  | 433 -
 drivers/watchdog/da9062_wdt.c  |  48 +-
 drivers/watchdog/davinci_wdt.c |  38 ++
 drivers/watchdog/dw_wdt.c  |  18 +-
 drivers/watchdog/eurotechwdt.c |   2 +-
 drivers/watchdog/f71808e_wdt.c |   4 +-
 drivers/watchdog/ftwdt010_wdt.c| 236 +++
 drivers/watchdog/gemini_wdt.c  | 229 ---
 drivers/watchdog/gpio_wdt.c|  58 +-
 drivers/watchdog/hpwdt.c   |  12 +-
 drivers/watchdog/i6300esb.c| 377 ---
 drivers/watchdog/ib700wdt.c|   2 +-
 drivers/watchdog/imx2_wdt.c|  20 +-
 drivers/watchdog/jz4740_wdt.c  |   1 +
 drivers/watchdog/mei_wdt.c |   7 +-
 drivers/watchdog/mpc8xxx_wdt.c |  83 ++-
 drivers/watchdog/mt7621_wdt.c  |  34 +-
 drivers/watchdog/orion_wdt.c   |   2 +-
 drivers/watchdog/pcwd_pci.c|   2 +-
 drivers/watchdog/pcwd_usb.c|   5 +-
 drivers/watchdog/rtd119x_wdt.c | 168 +
 drivers/watchdog/sp5100_tco.c  | 710 +
 drivers/watchdog/sp5100_tco.h  |  57 +-
 drivers/watchdog/sprd_wdt.c| 399 
 drivers/watchdog/stm32_iwdg.c  |   6 +-
 drivers/watchdog/sunxi_wdt.c   |   7 +-
 drivers/watchdog/watchdog_core.c   |   1 +
 drivers/watchdog/watchdog_dev.c| 125 ++--
 drivers/watchdog/wdt_pci.c |   2 +-
 drivers/watchdog/xen_wdt.c | 255 ++--
 43 files changed, 1711 insertions(+), 1801 deletions(-)
 delete mode 100644 
Documentation/devicetree/bindings/watchdog/cortina,gemini-watchdog.txt
 rename Documentation/devicetree/bindings/watchdog/{cortina,gemin-watchdog.txt 
=> faraday,ftwdt010.txt} (55%)
 create mode 100644 
Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
 create mode 100644 Documentation/devicetree/bindings/watchdog/sprd-wdt.txt
 delete mode 100644 drivers/watchdog/at32ap700x_wdt.c
 create mode 100644 drivers/watchdog/ftwdt010_wdt.c
 delete mode 100644 drivers/watchdog/gemini_wdt.c
 create mode 100644 drivers/watchdog/rtd119x_wdt.c
 create mode 100644 drivers/watchdog/sprd_wdt.c


Re: [GIT PULL REQUEST] watchdog - v4.15 Fixes

2017-12-25 Thread Wim Van Sebroeck
Hi Linus,

> Once more, gmail hated you. No real indication why, apart from:
> 
>   Why is this message in Spam? We've found that lots of messages from
> iguana.be are spam.
> 
> I have no idea why that site is so hated, but one option that your
> upstream  ISP is some scumbag place that allows spammers and scammers
> and thus the addresses end up being on some blacklist.
> 
> Also, all of these commits were committed less than an hour before
> sending me the pull request, so I question the kind of testing they
> got..
> 
>    Linus
> 
> On Sun, Dec 17, 2017 at 2:55 AM, Wim Van Sebroeck  wrote:
> >
> > here are 4 fixes for the watchdog device drivers.
> >
> >   git://www.linux-watchdog.org/linux-watchdog.git

I saw your e-mail last monday and I could have reacted on it with including 
the pull request of the last merge window that showed allready that these 
patches were in for more then a day and that I rebased the tree because of
that pull request. I could also showed you that I did sign the tag that
you requested. But I didn't. 

Instead I just want to wish you a Happy Christmas and a healthy 2018!

With kind regards and a lott of respect,
Wim.



[GIT PULL REQUEST] watchdog - v4.15 Fixes

2017-12-17 Thread Wim Van Sebroeck
Hi Linus,

here are 4 fixes for the watchdog device drivers.
Please pull.

Kind regards,
Wim.

The following changes since commit f3b5ad89de16f5d42e8ad36fbdf85f705c1ae051:

  Merge tag 'for-linus' of 
git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma (2017-12-16 13:43:08 
-0800)

are available in the git repository at:

  git://www.linux-watchdog.org/linux-watchdog.git 

for you to fetch changes up to c42cbe41727a138905a28f8e0b00c147be77ee93:

  watchdog: hpwdt: SMBIOS check (2017-12-17 11:01:49 +0100)


Guenter Roeck (2):
  watchdog: Fix potential kref imbalance when opening watchdog
  watchdog: Fix kref imbalance seen if handle_boot_enabled=0

Jerry Hoemann (1):
  watchdog: hpwdt: SMBIOS check

Matt Redfearn (1):
  watchdog: indydog: Add dependency on SGI_HAS_INDYDOG

 drivers/watchdog/Kconfig|  2 +-
 drivers/watchdog/hpwdt.c|  2 +-
 drivers/watchdog/watchdog_dev.c | 17 +
 3 files changed, 11 insertions(+), 10 deletions(-)



Re: [PATCH] watchdog: pcwd_pci: mark expected switch fall-through

2017-11-03 Thread Wim Van Sebroeck
Hi Gustavo,

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case I replaced "Fall" with a proper
> "fall through" comment, which is what GCC is expecting to find.
> 
> Signed-off-by: Gustavo A. R. Silva 
> ---
>  drivers/watchdog/pcwd_pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
> index c0d07ee..c882252 100644
> --- a/drivers/watchdog/pcwd_pci.c
> +++ b/drivers/watchdog/pcwd_pci.c
> @@ -545,7 +545,7 @@ static long pcipcwd_ioctl(struct file *file, unsigned int 
> cmd,
>   return -EINVAL;
>  
>   pcipcwd_keepalive();
> - /* Fall */
> + /* fall through */
>   }
>  
>   case WDIOC_GETTIMEOUT:
> -- 
> 2.7.4
> 

Shouldn't the /* fall through */ come after the } ?

Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.14-rc1 Merge Window

2017-09-13 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

It contains following changes:
* add support for the watchdog on Meson8 and Meson8m2
* add support for MediaTek MT7623 and MT7622 SoC
* Add support for the r8a77995 wdt
* explicitly request exclusive reset control for asm9260_wdt, zx2967_wdt, 
rt2880_wdt and mt7621_wdt
* improvements on asm9260_wdt, aspeed_wdt, renesas_wdt and cadence_wdt
* Add support for reading freq via CCF + suspend/resume support for 
of_xilinx_wdt
* constify watchdog_ops and various device-id structures
* Revert of commit 1fccb73011ea8a5fa0c6d357c33fa29c695139ea = "iTCO_wdt: all 
versions count down twice" (Bug 196509)

This will update the following files:

 Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt  |   40 +++
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt   |6 
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt |2 
 Documentation/devicetree/bindings/watchdog/renesas-wdt.txt |1 
 Documentation/watchdog/watchdog-parameters.txt |2 
 drivers/watchdog/asm9260_wdt.c |4 
 drivers/watchdog/aspeed_wdt.c  |  132 -
 drivers/watchdog/bcm7038_wdt.c |4 
 drivers/watchdog/cadence_wdt.c |6 
 drivers/watchdog/coh901327_wdt.c   |2 
 drivers/watchdog/da9063_wdt.c  |   67 ++
 drivers/watchdog/diag288_wdt.c |2 
 drivers/watchdog/iTCO_wdt.c|   22 +-
 drivers/watchdog/it87_wdt.c|2 
 drivers/watchdog/max77620_wdt.c|2 
 drivers/watchdog/mei_wdt.c |2 
 drivers/watchdog/meson_wdt.c   |2 
 drivers/watchdog/mt7621_wdt.c  |4 
 drivers/watchdog/of_xilinx_wdt.c   |   83 ++--
 drivers/watchdog/pcwd_usb.c|2 
 drivers/watchdog/qcom-wdt.c|2 
 drivers/watchdog/renesas_wdt.c |   80 ---
 drivers/watchdog/rt2880_wdt.c  |4 
 drivers/watchdog/sc1200wdt.c   |2 
 drivers/watchdog/sp805_wdt.c   |2 
 drivers/watchdog/stm32_iwdg.c  |2 
 drivers/watchdog/ts72xx_wdt.c  |2 
 drivers/watchdog/w83627hf_wdt.c|2 
 drivers/watchdog/ziirave_wdt.c |2 
 drivers/watchdog/zx2967_wdt.c  |2 
 30 files changed, 363 insertions(+), 124 deletions(-)

with these Changes:

commit 4cb30b044a8f06e6e6418ae12c3c00bb02679dac
Author: Arvind Yadav 
Date:   Sat Aug 26 11:41:06 2017 +0530

watchdog: mei_wdt: constify mei_cl_device_id

mei_cl_device_id are not supposed to change at runtime. All functions
working with mei_cl_device_id provided by  work
with const mei_cl_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 05ce42fff3afb2904647f6a88c6dc613b5a2793a
Author: Arvind Yadav 
Date:   Wed Aug 23 22:04:08 2017 +0530

watchdog: sp805: constify amba_id

amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 68c82befe4023afd75006676c4bd708dbe98d668
Author: Arvind Yadav 
Date:   Mon Aug 21 22:18:38 2017 +0530

watchdog: ziirave: constify i2c_device_id

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by  work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 39ad808996dd84f2961e241cb1396b391c6cd039
Author: Arvind Yadav 
Date:   Wed Aug 16 10:27:03 2017 +0530

watchdog: sc1200: constify pnp_device_id

pnp_device_id are not supposed to change at runtime. All functions
working with pnp_device_id provided by  work with
const pnp_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 82f6817fd6409e2253372e7c7b8c1e573390b579
Author: Geert Uytterhoeven 
Date:   Thu Aug 17 13:14:25 2017 +0200

dt-bindings: watchdog: renesas-wdt:

Re: [v6,3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUT

2017-07-11 Thread Wim Van Sebroeck
Hi Guenter,

> > This allows setting a default value for the watchdog.open_timeout
> > commandline parameter via Kconfig.
> > 
> > Some BSPs allow remote updating of the kernel image and root file
> > system, but updating the bootloader requires physical access. Hence, if
> > one has a firmware update that requires relaxing the
> > watchdog.open_timeout a little, the value used must be baked into the
> > kernel image itself and cannot come from the u-boot environment via the
> > kernel command line.
> > 
> > Being able to set the initial value in .config doesn't change the fact
> > that the value on the command line, if present, takes precedence, and is
> > of course immensely useful for development purposes while one has
> > console acccess, as well as usable in the cases where one can make a
> > permanent update of the kernel command line.
> > 
> > Signed-off-by: Rasmus Villemoes 
> 
> Wim, any thoughts on making this configurable ? I used to be opposed to it,
> but it does seem to make some sense to me now after thinking about it.

I will look at it later this week.

Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.13-rc1 Merge Window

2017-07-11 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

It contains the following:
* Add Renesas RZ/A WDT Watchdog driver
* STM32 Independent WatchDoG (IWDG) support
* UniPhier watchdog support
* Add F71868 support
* Add support for NCT6793D and NCT6795D
* dw_wdt: add reset lines support
* core: add option to avoid early handling of watchdog
* core: introduce watchdog_worker_should_ping helper
* Cleanups and improvements for sama5d4, intel-mid_wdt, s3c2410_wdt, orion_wdt, 
gpio_wdt,
  it87_wdt, meson_wdt, davinci_wdt, bcm47xx_wdt, zx2967_wdt, cadence_wdt

This will update the following files:

 Documentation/devicetree/bindings/watchdog/da9062-wdt.txt|   23 
 Documentation/devicetree/bindings/watchdog/dw_wdt.txt|3 
 Documentation/devicetree/bindings/watchdog/renesas-wdt.txt   |4 
 Documentation/devicetree/bindings/watchdog/st,stm32-iwdg.txt |   19 
 Documentation/devicetree/bindings/watchdog/uniphier-wdt.txt  |   20 
 Documentation/watchdog/watchdog-parameters.txt   |6 
 drivers/watchdog/Kconfig |   61 -
 drivers/watchdog/Makefile|3 
 drivers/watchdog/bcm47xx_wdt.c   |4 
 drivers/watchdog/cadence_wdt.c   |2 
 drivers/watchdog/davinci_wdt.c   |   10 
 drivers/watchdog/dw_wdt.c|   11 
 drivers/watchdog/f71808e_wdt.c   |   27 
 drivers/watchdog/gpio_wdt.c  |   73 -
 drivers/watchdog/intel-mid_wdt.c |   17 
 drivers/watchdog/it87_wdt.c  |  588 +--
 drivers/watchdog/meson_gxbb_wdt.c|4 
 drivers/watchdog/orion_wdt.c |2 
 drivers/watchdog/rza_wdt.c   |  199 +++
 drivers/watchdog/s3c2410_wdt.c   |   58 -
 drivers/watchdog/sama5d4_wdt.c   |   19 
 drivers/watchdog/stm32_iwdg.c|  253 
 drivers/watchdog/uniphier_wdt.c  |  268 +
 drivers/watchdog/w83627hf_wdt.c  |   15 
 drivers/watchdog/watchdog_dev.c  |   32 
 drivers/watchdog/zx2967_wdt.c|2 
 26 files changed, 1077 insertions(+), 646 deletions(-)

with these Changes:

commit c013b65ad8a1e132f733404809afc72f7d00e768
Author: Rasmus Villemoes 
Date:   Tue May 30 10:56:45 2017 +0200

watchdog: introduce watchdog_worker_should_ping helper

This will be useful when the condition becomes slightly more
complicated in the next patch.

Signed-off-by: Rasmus Villemoes 
Reviewed-by: Esben Haabendal 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit e7bf02895f06c0603af800c4bfce3ca4ede9147d
Author: Keiji Hayashibara 
Date:   Wed Jun 14 16:53:44 2017 +0900

watchdog: uniphier: add UniPhier watchdog driver

Add a watchdog driver for Socionext UniPhier series SoC.
Note that the timeout value for this device must be a power
of 2 because of the specification.

Signed-off-by: Keiji Hayashibara 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit e75bf0ea77e9778e9a1975eb9b38698babcbde63
Author: Keiji Hayashibara 
Date:   Wed Jun 14 16:53:43 2017 +0900

dt-bindings: watchdog: add description for UniPhier WDT controller

Add uniphier-wdt dt-bindings documentation.

Signed-off-by: Keiji Hayashibara 
Acked-by: Rob Herring 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 011e29e7d93d80c2529ba17109bc4e5d031ea2b1
Author: Arvind Yadav 
Date:   Tue Jun 20 11:04:26 2017 +0530

watchdog: cadence_wdt: make of_device_ids const.

of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by  work with const
of_device_ids. So mark the non-const structs as const.

File size before:
   textdata bss dec hex filename
   1962 612   42578 a12 drivers/watchdog/cadence_wdt.o

File size after constify cdns_wdt_of_match:
   textdata bss dec hex filename
   2378 196   42578 a12 drivers/watchdog/cadence_wdt.o

Signed-off-by: Arvind Yadav 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 935988c67406f35e63873ac63e2962664ee99bdc
Author: Arvind Yadav 
Date:   Mon Jun 12 12:02:39 2017 +0530

watchdog: zx2967: constify zx2967_wdt_ops.

File size before:
   textda

Re: [PATCH V4 0/3] add UniPhier watchdog support

2017-07-06 Thread Wim Van Sebroeck
Hi All,

> On 07/05/2017 03:26 AM, Masahiro Yamada wrote:
> >2017-07-05 19:06 GMT+09:00 Keiji Hayashibara 
> >:
> >>Hi Guenter,
> >>
> >>Let me confirm if I got it.
> >>
> >>I guess that this series finished the review.
> >>Could you tell me the current state of this series?
> >
> >
> >I will pick up 3/3.  (It should have been sent to ARM-SoC ML, though.)
> >
> >I had sent my PRs for v4.13 before Rob acked the DT binding.
> >Please look forward to v4.14.
> >
> 
> 1/3 and 2/3 are in -next, so they should be be included in Wim's pull 
> request
> for 4.13.

That's correct.

Kind regards,
Wim.



Re: [GIT PULL] watchdog updates for v4.12

2017-05-30 Thread Wim Van Sebroeck
Hi Geert,

> Hi Günter, Linus, Wim,
> 
> On Sun, May 14, 2017 at 5:55 AM, Guenter Roeck  wrote:
> > As requested by Wim:
> >
> > Please pull watchdog updates for Linux v4.12 from signed tag:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git 
> > watchdog-for-linus-v4.12
> >
> > Note: I had to drop one of the patches affecting drivers/watchdog/iTCO_wdt.c
> > because it and some other patches affecting the same file came in from
> > another tree, causing severe and unnecessary conflicts. Other than that,
> > the tree is about two weeks old, even though it looks like some of the
> > patches are brand new.
> 
> What happened to this pull request?
> 
> It seems to have been superseded by "[GIT PULL REQUEST] watchdog - v4.12-rc1
> Fixes", which did get pulled, but the latter included less commits.
> 
> E.g. the rza_wdt driver was not included.
> In addition, it has also disappeared from linux-next?

The pull request was to late to include it in the merge window.
So we have to wait for the next merge window.
So that's why we sent in the fixes in before rc2 came out.
The other patches will be in the linux-next tree again in a couple of days.

Kind regards,
wim.



[GIT PULL REQUEST] watchdog - v4.12-rc1 Fixes

2017-05-20 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

It will fix:
* orion_wdt compile-test dependencies
* sama5d4_wdt: WDDIS handling and a race confition
* pcwd_usb: fix NULL-deref at probe
* cadence_wdt: fix timeout setting
* wdt_pci: fix build error if SOFTWARE_REBOOT is defined
* iTCO_wdt: all versions count down twice
* zx2967: remove redundant dev_err call in zx2967_wdt_probe()
* bcm281xx: Fix use of uninitialized spinlock

This will update the following files:

 Documentation/watchdog/watchdog-parameters.txt |2 
 drivers/watchdog/Kconfig   |2 
 drivers/watchdog/bcm_kona_wdt.c|3 
 drivers/watchdog/cadence_wdt.c |2 
 drivers/watchdog/iTCO_wdt.c|   22 +++
 drivers/watchdog/pcwd_usb.c|3 
 drivers/watchdog/sama5d4_wdt.c |   77 ++---
 drivers/watchdog/wdt_pci.c |2 
 drivers/watchdog/zx2967_wdt.c  |4 -
 9 files changed, 77 insertions(+), 40 deletions(-)

with these Changes:

commit fedf266f9955d9a019643cde199a2fd9a0259f6f
Author: Eric Anholt 
Date:   Thu Apr 27 18:02:32 2017 -0700

watchdog: bcm281xx: Fix use of uninitialized spinlock.

The bcm_kona_wdt_set_resolution_reg() call takes the spinlock, so
initialize it earlier.  Fixes a warning at boot with lock debugging
enabled.

Fixes: 6adb730dc208 ("watchdog: bcm281xx: Watchdog Driver")
Signed-off-by: Eric Anholt 
Reviewed-by: Florian Fainelli 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 07441a7dd11f6855bcf55fbbfc6abba42258b2c6
Author: Wei Yongjun 
Date:   Tue Apr 25 16:17:33 2017 +

watchdog: zx2967: remove redundant dev_err call in zx2967_wdt_probe()

There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 1fccb73011ea8a5fa0c6d357c33fa29c695139ea
Author: Paolo Bonzini 
Date:   Wed Apr 5 13:41:15 2017 +0200

iTCO_wdt: all versions count down twice

The ICH9 is listed as having TCO v2, and indeed the behavior in the
datasheet corresponds to v2 (for example the NO_REBOOT flag is
accessible via the 16KiB-aligned Root Complex Base Address).

However, the TCO counts twice just like in v1; the documentation
of the SECOND_TO_STS bit says: "ICH9 sets this bit to 1 to indicate
that the TIMEOUT bit had been (or is currently) set and a second
timeout occurred before the TCO_RLD register was written. If this
bit is set and the NO_REBOOT config bit is 0, then the ICH9 will
reboot the system after the second timeout.  The same can be found
in the BayTrail (Atom E3800) datasheet, and even HOWTOs around
the Internet say that it will reboot after _twice_ the specified
heartbeat.

I did not find the Apollo Lake datasheet, but because v4/v5 has
a SECOND_TO_STS bit just like the previous version I'm enabling
this for Apollo Lake as well.

Cc: linux-watch...@vger.kernel.org
Reviewed-by: Andy Shevchenko 
Signed-off-by: Paolo Bonzini 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 455a9a60b6d4afb293b0e63ec75cc8e82912a767
Author: Shile Zhang 
Date:   Mon Apr 10 22:39:33 2017 +0800

watchdog: wdt_pci: fix build error if define SOFTWARE_REBOOT

To fix following build error when SOFTWARE_REBOOT is defined:

  CC [M]  driver/watchdog/wdt_pci.o
driver/watchdog/wdt_pci.c: In function 'wdtpci_interrupt':
driver/watchdog/wdt_pci.c:335:3: error: too many arguments to function 
'emergency_restart'
   emergency_restart(NULL);
   ^
In file included from driver/watchdog/wdt_pci.c:51:0:
include/linux/reboot.h:80:13: note: declared here
 extern void emergency_restart(void);
 ^

Signed-off-by: Shile Zhang 
Reviewed-by: Guenter Roeck 
    Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 0ddad77b90cb52075b5a9498f0621e3e265cc19f
Author: Tomas Melin 
Date:   Mon Mar 20 09:29:31 2017 +0200

watchdog: cadence_wdt: fix timeout setting

wdt_timeout must not be initialized to CDNS_WDT_DEFAULT_TIMEOUT in
order to allow the value to be overriddden by a device tree setting.

This way, the default timeout value will be used only in case module_param
has not been set, or device tree timeout-sec has not been defined.

Signed-off-by: Tomas Melin 
Reviewed-by: Guenter Roeck 
    Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 46c319b848268dab3f0e7c4a5b6e9146d3bca

Re: [PATCH] watchdog: pcwd_usb: fix NULL-deref at probe

2017-05-14 Thread Wim Van Sebroeck
All,

> > On Fri, May 12, 2017 at 12:36:27PM +0200, Johan Hovold wrote:
> > > Hi Guenter and Wim,
> > > 
> > > On Mon, Apr 03, 2017 at 07:05:46AM -0700, Guenter Roeck wrote:
> > > > On 04/03/2017 01:36 AM, Johan Hovold wrote:
> > > > > On Mon, Mar 13, 2017 at 10:16:33AM -0700, Guenter Roeck wrote:
> > > > >> On Mon, Mar 13, 2017 at 01:49:45PM +0100, Johan Hovold wrote:
> > > > >>> Make sure to check the number of endpoints to avoid dereferencing a
> > > > >>> NULL-pointer should a malicious device lack endpoints.
> > > > >>>
> > > > >>> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> > > > >>> Cc: stable 
> > > > >>> Signed-off-by: Johan Hovold 
> > > > >>
> > > > >> Reviewed-by: Guenter Roeck 
> > > > >
> > > > > Any progress on this one? I noticed you merged it to both the fixes 
> > > > > and
> > > > > next branches in your staging tree, Guenter (but it does not show up 
> > > > > in
> > > > > linux-next). Will you be sending it on to Linus?
> > > 
> > > > my watchdog staging trees are inofficial and not in linux-next.
> > > > Wim is working on setting up a new server which will provide the
> > > > official staging tree.
> > > > 
> > > > I asked Wim to push the pending patches. I'll do it if he asks me.
> > > 
> > > I noticed Guenter's watchdog branch is now in next, but the patches for
> > > 4.12 are still not in mainline. Have you guys decided who will be
> > > sending them on to Linus this cycle?
> > > 
> > Good question. I had expected Wim to do it, since it is actually his
> > repository which is in linux-next. But you are correct, it isn't upstream.
> 
> Due to some issues, we (Linus, Guenter and myself) decided that Guenter will 
> sent the pull request this time (which he allready did).

OK, we were to late. We will line up the fixes for rc2. Feature changes and new 
drivers will be for next merge window.
My apologies to the people that have sent in these changes and drivers.

Kind regards,
Wim.



Re: [PATCH] watchdog: pcwd_usb: fix NULL-deref at probe

2017-05-14 Thread Wim Van Sebroeck
All,

> On Fri, May 12, 2017 at 12:36:27PM +0200, Johan Hovold wrote:
> > Hi Guenter and Wim,
> > 
> > On Mon, Apr 03, 2017 at 07:05:46AM -0700, Guenter Roeck wrote:
> > > On 04/03/2017 01:36 AM, Johan Hovold wrote:
> > > > On Mon, Mar 13, 2017 at 10:16:33AM -0700, Guenter Roeck wrote:
> > > >> On Mon, Mar 13, 2017 at 01:49:45PM +0100, Johan Hovold wrote:
> > > >>> Make sure to check the number of endpoints to avoid dereferencing a
> > > >>> NULL-pointer should a malicious device lack endpoints.
> > > >>>
> > > >>> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> > > >>> Cc: stable 
> > > >>> Signed-off-by: Johan Hovold 
> > > >>
> > > >> Reviewed-by: Guenter Roeck 
> > > >
> > > > Any progress on this one? I noticed you merged it to both the fixes and
> > > > next branches in your staging tree, Guenter (but it does not show up in
> > > > linux-next). Will you be sending it on to Linus?
> > 
> > > my watchdog staging trees are inofficial and not in linux-next.
> > > Wim is working on setting up a new server which will provide the
> > > official staging tree.
> > > 
> > > I asked Wim to push the pending patches. I'll do it if he asks me.
> > 
> > I noticed Guenter's watchdog branch is now in next, but the patches for
> > 4.12 are still not in mainline. Have you guys decided who will be
> > sending them on to Linus this cycle?
> > 
> Good question. I had expected Wim to do it, since it is actually his
> repository which is in linux-next. But you are correct, it isn't upstream.

Due to some issues, we (Linus, Guenter and myself) decided that Guenter will 
sent the pull request this time (which he allready did).

Kind regards,
Wim.



Re: linux-next: manual merge of the drivers-x86 tree with the watchdog tree

2017-05-03 Thread Wim Van Sebroeck
Hi All,

> On Tue, May 02, 2017 at 02:58:22PM -0700, Guenter Roeck wrote:
> > On Tue, May 02, 2017 at 02:30:46PM -0700, Darren Hart wrote:
> > > On Tue, May 02, 2017 at 11:57:18PM +0300, Andy Shevchenko wrote:
> > > > On Tue, May 2, 2017 at 11:21 PM, Darren Hart  
> > > > wrote:
> > > > > On Tue, May 02, 2017 at 12:12:17PM -0700, Guenter Roeck wrote:
> > > > >> On Tue, May 02, 2017 at 11:09:40AM -0700, Darren Hart wrote:
> > > > >> > On Tue, May 02, 2017 at 02:04:03PM +1000, Stephen Rothwell wrote:
> > > > 
> > > > > From my perspective, the most direct solution would be to drop these 
> > > > > two patches
> > > > > from the watchdog tree and let them go through the platform driver 
> > > > > x86 tree with
> > > > > Guenter's Acked-by. If you have additional patches which depend on 
> > > > > these two,
> > > > > then if you will provide an immutable branch we can merge, we can do 
> > > > > that too
> > > > > (but I try to keep the number of external merges to a minimum - which 
> > > > > is
> > > > > becoming increasingly difficult lately for some reason).
> > > > 
> > > > Sorry for not being in doubt, I just decided that Ack from Guenter
> > > > means that default case is to go through PDx86 tree without any
> > > > additional agreement.
> > > 
> > > I assumed that was the case, yes. I read through the thread and would have
> > > thought the same. As Guenter is directing us to Wim, I think the 
> > > MAINTAINERS
> > > file doesn't really capture the logistics of the watchdog maintainer 
> > > model, as a
> > 
> > Now I am confused. Please apologize my lack of understanding.
> > 
> > I am listed as "Reviewer", not "Maintainer", for watchdog drivers.
> 
> :facepalm:
> 
> Yes you are, I misread the get_maintainer.pl output ... somehow.
> 
> > Please let me know how that does not capture the logistics of the watchdog
> > (or any other) maintainer model, and how to better reflect that I review
> > watchdog patches and Wim, as maintainer, sends them to Linus. I thought that
> > is what "R:" and "M:" is for ?
> 
> Nope, it's right, I messed up.
> 
> > 
> > The only possibly unusual detail is that I maintain a branch with all 
> > patches
> > I have reviewed. This branch is picked up by Wim and either accepted as-is 
> > or,
> > if he does not agree with some patch, modified accordingly. This branch is
> > not in linux-next and thus not part of any official maintainer model,
> > but exists for convenience and to enable additional testing through 0day
> > and my own test farm.
> > 
> > > Reviewed-by from a listed maintainer wouldn't be typical unless they 
> > > expected
> > > someone else to merge it - in this case, I suppose Guenter meant Wim and 
> > > not us
> > > :-)
> > > 
> > 
> > You are correct, "Reviewed-by:" typically is intended for Wim, as I thought
> > it would be expected for a designated reviewer. I tend to use "Acked-by:"
> > if I assume or expect that a patch will be picked up by a different 
> > maintainer,
> > though I typically add a note saying that this is the case (no idea if I did
> > that here). Is there some different set of tags I should use ?
> 
> Nope, we just should have confirmed with Wim.
> 
> > On a side note, it appears that I tagged "watchdog: iTCO_wdt: cleanup
> > set/unset no_reboot_bit functions" with "Reviewed-by:", not with 
> > "Acked-by:".
> 
> I noticed this as well. If Wim drops these, we'll correct that in our branch.

It makes sence to keep the patches together. I will drop the patches from the 
watchdog tree.

Kind regards,
Wim.



Re: Stopping watchdog in watchdog driver remove functions

2017-01-01 Thread Wim Van Sebroeck
Hi Guenter,

> I noticed that several watchdog drivers stop the watchdog in trhe driver 
> remove function.
> A non-exhaustive list of drivers doing that is
> 
>   drivers/watchdog/bcm7038_wdt.c
>   drivers/watchdog/cadence_wdt.c
>   drivers/watchdog/imgpdc_wdt.c
>   drivers/watchdog/jz4740_wdt.c
>   drivers/watchdog/kempld_wdt.c
>   drivers/watchdog/max77620_wdt.c
>   drivers/watchdog/moxart_wdt.c
>   drivers/watchdog/sama5d4_wdt.c
>   drivers/watchdog/tangox_wdt.c
>   drivers/watchdog/tegra_wdt.c
> 
> Since a watchdog has to be closed for its driver to be removable, one 
> situation
> where a watchdog is still running on unload is where the watchdog was 
> opened but
> not closed properly (eg by killing the watchdog application, or if the 
> 'nowayout'
> flag is set).
> 
> Given that, does it even make sense to stop the watchdog in the remove 
> function ?
> Should it even be permitted ?

>From an API point of view: if WDIOF_MAGICCLOSE is being used then the watchdog
_SHOULD_ continue to run when the watchdog was not properly closed (which
normally also results in a reboot of the system).
if WDIOF_MAGICCLOSE is not being used then closing the watchdog device means
that the driver needs to stop the watchdog.

Kind regards and happy new year to you all,
Wim.



[GIT PULL REQUEST] watchdog - v4.10 merge window

2016-12-24 Thread Wim Van Sebroeck
Hi Linus,

Due to time constraints and personal issues Guenter and I decided that this 
window will be a pull from another location.
We got it wrong the first time, so here is our second request (together with 
our humble apologies).
(I also hope that Guenters tree is signed, it normally is, but if it isn't then 
you have another thing to blame us...).

So could you please pull from the 'watchdog-for-linus-v4.10' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git

It contains the following patches:
* Add Loongson1 SoC watchdog driver
* Add da9061 watchdog device
* Add IT8620E watchdog device
* module load /unload fixes for bcm7083_wdt, max77620_wdt and jz4740
* intel-mid_wdt fixes
* and other fixes and cleanups 

This will update the following files:

 MAINTAINERS|2 
 drivers/watchdog/Kconfig   |   49 ++
 drivers/watchdog/Makefile  |1 
 drivers/watchdog/bcm2835_wdt.c |   20 
 drivers/watchdog/bcm7038_wdt.c |1 
 drivers/watchdog/cpwd.c|   23 +
 drivers/watchdog/da9062_wdt.c  |   12 ++
 drivers/watchdog/davinci_wdt.c |6 +
 drivers/watchdog/intel-mid_wdt.c   |   22 ++--
 drivers/watchdog/it87_wdt.c|4 
 drivers/watchdog/jz4740_wdt.c  |2 
 drivers/watchdog/loongson1_wdt.c   |  170 +
 drivers/watchdog/max77620_wdt.c|1 
 drivers/watchdog/mei_wdt.c |2 
 drivers/watchdog/meson_gxbb_wdt.c  |1 
 drivers/watchdog/mpc8xxx_wdt.c |1 
 drivers/watchdog/octeon-wdt-main.c |1 
 drivers/watchdog/qcom-wdt.c|2 
 18 files changed, 262 insertions(+), 58 deletions(-)

with these Changes:

commit 067161281f428aa7c6e153e06aab7b5fe1ed1e98
Author: Maciej S. Szmigiero 
Date:   Thu Dec 15 23:52:36 2016 +0100

watchdog: it87_wdt: add IT8620E ID

This adds IT8620E chip ID to it87_wdt driver.
Such chip is often found on current Gigabyte motherboards, it is allegedly
custom made for this manufacturer.

Upon testing it looks like it has a 16-bit timer and cannot be reset via
game port (only via CIR), so it is similar to IT87{18,20,21,28,83} chips.

Tested on GA-F2A88XM-HD3P board.

Signed-off-by: Maciej S. Szmigiero 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 

commit f01d74cc5a2aefa0ba16e2821086a1f2d0a2c899
Author: Corentin Labbe 
Date:   Thu Dec 15 19:03:44 2016 +0100

watchdog: mpc8xxx: Remove unneeded linux/miscdevice.h include

watchdog/mpc8xxx_wdt.c does not use any miscdevice so this patch remove
this unnecessary inclusion.

Signed-off-by: Corentin Labbe 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 

commit 724284a323c4cdea6c1bb1448247ffc858f2bd1d
Author: Corentin Labbe 
Date:   Thu Dec 15 18:49:29 2016 +0100

watchdog: octeon: Remove unneeded linux/miscdevice.h include

watchdog/octeon-wdt-main.c does not use any miscdevice so this patch
remove this unnecessary inclusion.

Signed-off-by: Corentin Labbe 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 

commit 054ae19422859c394d5f26a8756ed57d332f6284
Author: Rasmus Villemoes 
Date:   Mon Dec 12 10:48:43 2016 +0100

watchdog: bcm2835_wdt: set WDOG_HW_RUNNING bit when appropriate

A bootloader may start the watchdog device before handing control to
the kernel - in that case, we should tell the kernel about it so the
watchdog framework can keep it alive until userspace opens
/dev/watchdog0.

Signed-off-by: Rasmus Villemoes 
Reviewed-by: Guenter Roeck 
Acked-by: Eric Anholt 
Signed-off-by: Guenter Roeck 

commit 1d8565ee4f5bd9fccb738e53d6b9fc7a559f7d2b
Author: Yang Ling 
Date:   Thu Dec 8 00:10:58 2016 +0800

watchdog: loongson1: Add Loongson1 SoC watchdog driver

Add watchdog timer specific driver for Loongson1 SoC.

Signed-off-by: Yang Ling 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 

commit b6621df5c87603310c3f94903bb30adbfeb9aa69
Author: Amit Kushwaha 
Date:   Tue Dec 6 10:19:48 2016 -0800

watchdog: cpwd: remove memory allocate failure message

Replaced goto with a return statement and dropped the kfree()
calls because memory allocated with devm_kzalloc() is
automatically freed on driver detach

Signed-off-by: Amit Kushwaha 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 

commit 72106c1894aa4e26ab403282cc7617fcb07d3d4d
Author: Steve Twiss 
Date:   Mon Nov 14 08:22:45 2016 +

watchdog: da9062/61: watchdog driver

The of_device_id match array is added to support "dlg,da9062-watchdog"
as a valid .compatible string. A MODULE_DEVICE_TABLE() macro is added.

This patch assumes the use of a DA9062 fallback compatible string for the
DTS to pick up the DA9062 device driver for use with the DA9061 watchdog
hardware

Copyright he

Re: [GIT PULL REQUEST] watchdog - v4.10 merge window

2016-12-24 Thread Wim Van Sebroeck
Hi Linus, Guenter,

> On 12/23/2016 11:45 AM, Linus Torvalds wrote:
> >On Fri, Dec 23, 2016 at 11:40 AM, Guenter Roeck  wrote:
> >>
> >>FWIW:
> >
> >Hey, I can generate those myself.
> >
> >But when they aren't generated by the person who sends the pull
> >request, they are worthless.
> >
> >The whole point is that I need to get it with the pull request, so
> >that I can see that what I get is what the requester really meant for
> >me to get, and that (hopefully) the person who made the request looked
> >it over and there's nothing surprising to that person either.
> >
> 
> Ok, point taken. Guess Wim should have asked me to send the pull request.

Yep, co-maintainership is not well defined I guess. I will sent out a new 
pull-request
with the necessary info in it.

Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.10 merge window

2016-12-23 Thread Wim Van Sebroeck
Hi Linus,

Due to time constraints and personal issues Guenter and I decided that this 
window will be a pull from another location.
So please pull from 'watchdog-for-linus-v4.10' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git

It contains the following patches:
* Add da9062/61 watchdog driver
* Add Loongson1 SoC watchdog driver
* Add IT8620E watchdog device
* module load /uload fixes for bcm7083_wdt, max77620_wdt and jz4740
* intel-mid_wdt fixes
* and other fixes and cleanups 

Greetings,
Wim.



Re: linux-next: unable to fetch the watchdog tree

2016-12-05 Thread Wim Van Sebroeck
Hi Stephen,

Yes, I am setting up a new server.

Kind regards,
Wim.

> Hi Wim,
> 
> On Tue, 22 Nov 2016 09:49:19 +1100 Stephen Rothwell  
> wrote:
> >
> > On Mon, 14 Nov 2016 16:26:16 +0100 Wim Van Sebroeck  wrote:
> > >
> > > This has been fixed. Thanks for notifying me about it.
> > >   
> > > > For the past few days (nearly a week, sorry) fetching the watchdog tree
> > > > (git://www.linux-watchdog.org/linux-watchdog-next.git#master) has
> > > > resulted in a hung connection.  
> > 
> > It's happening again :-(
> 
> And again.  Have you considered moving your tree somewhere more
> reliable like kernel.org?
> 
> -- 
> Cheers,
> Stephen Rothwell


Re: linux-next: unable to fetch the watchdog tree

2016-11-14 Thread Wim Van Sebroeck
Hi Stephen,

This has been fixed. Thanks for notifying me about it.

Kind regards,
Wim.

> Hi Wim,
> 
> For the past few days (nearly a week, sorry) fetching the watchdog tree
> (git://www.linux-watchdog.org/linux-watchdog-next.git#master) has
> resulted in a hung connection.
> 
> -- 
> Cheers,
> Stephen Rothwell


Re: [PATCH 1/1] watchdog: pcipcwd_show_card_info: wrong format string

2016-11-06 Thread Wim Van Sebroeck
Hi All,

> On 11/05/2016 07:50 AM, Heinrich Schuchardt wrote:
> >fw_rev_major and fw_rev_minor are defined as int.
> >Use %d to print them.
> >
> >Signed-off-by: Heinrich Schuchardt 
> >---
> > drivers/watchdog/pcwd_pci.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c
> >index c0d07ee..e1fbbf6 100644
> >--- a/drivers/watchdog/pcwd_pci.c
> >+++ b/drivers/watchdog/pcwd_pci.c
> >@@ -234,7 +234,7 @@ static void pcipcwd_show_card_info(void)
> > got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major,
> > &fw_rev_minor);
> > if (got_fw_rev)
> >-sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor);
> >+sprintf(fw_ver_str, "%d.%02d", fw_rev_major, fw_rev_minor);
> > else
> > sprintf(fw_ver_str, "");
> >
> >
> Hmm ... I don't think that a negative version number makes much sense.
> Turns out inb() returns a char on some architectures, meaning it is signed,
> meaning it _could_ return a negative number if the version number is 128
> or above. I don't want to risk us reporting version number -128.-110 just
> to make compilers happy.

I couldn't have said this better myself :-) version info is indeed to be 
consider as an unsigned int.

Kind regards,
Wim.



Re: [GIT PULL REQUEST] watchdog - v4.9 merge window

2016-10-12 Thread Wim Van Sebroeck
Hi Linus,

It's an old server with only 512Mb RAM. I'm in the progress off replacing it 
(in another datacenter).
Meanwhile I'll restart git-daemon.

Sorry,
Wim.

> On Wed, Oct 12, 2016 at 11:35 AM, Wim Van Sebroeck  wrote:
> > Hi Linus,
> >
> > Please pull from 'master' branch of
> > git://www.linux-watchdog.org/linux-watchdog.git
> 
> That site really is very ill. It's timing out or getting "Connection
> reset by peer" errors.
> 
> How about just using something like github and signed tags? This is
> not the first time inux-watchdog.org has had problems.
> 
> (In fact, even withour switching to something like github, signed tags
> would be a good thing).
> 
>Linus


[GIT PULL REQUEST] watchdog - v4.9 merge window

2016-10-12 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

It contains:
* a new watchdog pretimeout governor framework
* support to upload the firmware on the ziirave_wdt
* several fixes and cleanups

This will update the following files:

 Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt |3 
 Documentation/devicetree/bindings/watchdog/st_lpc_wdt.txt|2 
 Documentation/watchdog/watchdog-kernel-api.txt   |   33 
 drivers/watchdog/Kconfig |   49 +
 drivers/watchdog/Makefile|8 
 drivers/watchdog/asm9260_wdt.c   |1 
 drivers/watchdog/bcm7038_wdt.c   |2 
 drivers/watchdog/cadence_wdt.c   |   20 
 drivers/watchdog/dw_wdt.c|   11 
 drivers/watchdog/hpwdt.c |8 
 drivers/watchdog/iTCO_wdt.c  |2 
 drivers/watchdog/imx2_wdt.c  |   60 +
 drivers/watchdog/kempld_wdt.c|2 
 drivers/watchdog/mt7621_wdt.c|1 
 drivers/watchdog/of_xilinx_wdt.c |   25 
 drivers/watchdog/pcwd_usb.c  |4 
 drivers/watchdog/pretimeout_noop.c   |   47 +
 drivers/watchdog/pretimeout_panic.c  |   47 +
 drivers/watchdog/rn5t618_wdt.c   |2 
 drivers/watchdog/rt2880_wdt.c|1 
 drivers/watchdog/softdog.c   |   24 
 drivers/watchdog/st_lpc_wdt.c|   33 
 drivers/watchdog/tegra_wdt.c |2 
 drivers/watchdog/txx9wdt.c   |6 
 drivers/watchdog/w83627hf_wdt.c  |2 
 drivers/watchdog/watchdog_core.c |2 
 drivers/watchdog/watchdog_dev.c  |  101 ++
 drivers/watchdog/watchdog_pretimeout.c   |  220 +
 drivers/watchdog/watchdog_pretimeout.h   |   60 +
 drivers/watchdog/ziirave_wdt.c   |  409 ++-
 fs/compat_ioctl.c|2 
 include/linux/watchdog.h |   24 
 32 files changed, 1132 insertions(+), 81 deletions(-)

with these Changes:

commit 39487f6688a557ebfc69816d7e02f210bf8fb2a3
Author: Vladimir Zapolskiy 
Date:   Fri Oct 7 15:41:39 2016 +0300

watchdog: imx2_wdt: add pretimeout function support

The change adds watchdog pretimeout notification handling to imx2_wdt
driver, if device data contains information about a valid interrupt.

It is unlikely but still possible (e.g. through a software limitation)
that only a subset of watchdogs on SoC has interrupt lines, hence
functionally the devices from these two groups have different
capabilities, and this is reflected in different watchdog_info
structs assigned to the devices.

Signed-off-by: Vladimir Zapolskiy 
Reviewed-by: Guenter Roeck 
Reviewed-by: Wolfram Sang 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 2accf320786210db92f36866cc71fa894f510a4a
Author: Wolfram Sang 
Date:   Fri Oct 7 15:41:38 2016 +0300

watchdog: softdog: implement pretimeout support

Give devices which do not have hardware support for pretimeout at least a
software version of it.

Signed-off-by: Wolfram Sang 
Signed-off-by: Vladimir Zapolskiy 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 89873a711dd20b614abb6e4038fb4b5462f4c701
Author: Vladimir Zapolskiy 
Date:   Fri Oct 7 15:39:57 2016 +0300

watchdog: pretimeout: add pretimeout_available_governors attribute

The change adds an option to a user with CONFIG_WATCHDOG_SYSFS and
CONFIG_WATCHDOG_PRETIMEOUT_GOV enabled to get information about all
registered watchdog pretimeout governors by reading watchdog device
attribute named "pretimeout_available_governors".

Signed-off-by: Vladimir Zapolskiy 
Reviewed-by: Guenter Roeck 
Reviewed-by: Wolfram Sang 
Tested-by: Wolfram Sang 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 53f96cee1aff74c8ee3c5f7a25df0c01d7117eeb
Author: Vladimir Zapolskiy 
Date:   Fri Oct 7 15:37:00 2016 +0300

watchdog: pretimeout: add option to select a pretimeout governor in runtime

The change converts watchdog device attribute "pretimeout_governor" from
read-only to read-write type to allow users to select a desirable
watchdog pretimeout governor in runtime, e.g.
   

Re: [PATCH] watchdog: rt2880_wdt: Remove assignment of dev pointer

2016-10-08 Thread Wim Van Sebroeck
Hi Matt,

> Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from
> struct watchdog_device") removed the dev pointer from struct
> watchdog_device, but this driver was still assigning it, leading to a
> compilation error:
> 
> drivers/watchdog/rt2880_wdt.c: In function ‘rt288x_wdt_probe’:
> drivers/watchdog/rt2880_wdt.c:161:16: error: ‘struct watchdog_device’
> has no member named ‘dev’
>   rt288x_wdt_dev.dev = &pdev->dev;
> ^
> scripts/Makefile.build:289: recipe for target
> 'drivers/watchdog/rt2880_wdt.o' failed
> 
> Fix this by removing the assignment.
> 
> Fixes: 0254e953537c
> Signed-off-by: Matt Redfearn 
> ---

This patch and a similar patch from Guenter regarding mt7621_wdt was
added to linux-watchdog-next almost 2 weeks ago.

Kind regards,
Wim.



Re: [PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure

2016-10-08 Thread Wim Van Sebroeck
Hi Julia,

> iTCO_wdt_pm, of type struct dev_pm_ops, is never modified, so declare it as
> const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall 

This patch and your constify watchdog_ops structures were added to 
linux-watchdog-next almost 2 weeks ago.

Kind regards,
Wim.



Re: [PATCH] watchdog: hpwdt: add support for iLO5

2016-10-08 Thread Wim Van Sebroeck
Hi Brian,

> iLO5 will offer the same watchdog timer as previous generations, but the
> PCI subsystem vendor ID will be PCI_VENDOR_ID_HP_3PAR (0x1590) instead of
> PCI_VENDOR_ID_HP (0x103c).  Add 0x1590 to the whitelist and be more
> specific when ignoring the 103c,1979 device.
> 
> Signed-off-by: Brian Boylston 
> ---

This patch was added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH 10/19] watchdog: bindings: Remove obsolete platforms from dt doc.

2016-10-08 Thread Wim Van Sebroeck
Hi Peter,

> STiH415/6 SoC support is being removed from the kernel
> so update the dt bding document to reflect this.
> 
> Signed-off-by: Peter Griffin 
> Cc: 
> Cc: 
> Cc: 
> Cc: 
> ---

This patch and your st_wdt patch has been added to linux-watchdog-next almost 2 
weeks ago.

Kind regards,
Wim.



Re: [PATCH] watchdog-asm9260: Delete owner assignment

2016-10-08 Thread Wim Van Sebroeck
Hi Markus,

> From: Markus Elfring 
> Date: Mon, 15 Aug 2016 13:34:47 +0200
> 
> The field "owner" is set by core. Thus delete an extra initialisation.
> 
> Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
> Signed-off-by: Markus Elfring 

This patch was added to linux-watchdog-next almost 2 weeks ago.

Kind regards,
Wim.



Re: [PATCH v5] watchdog: ziirave_wdt: Add support to upload the firmware.

2016-10-08 Thread Wim Van Sebroeck
Hi Enric,

> This patch adds and entry to the sysfs to start firmware upload process
> on the specified device with the requested firmware.
> 
> The uploading of the firmware needs only to happen once per firmware
> upgrade, as the firmware is stored in persistent storage. If the
> firmware upload or the firmware verification fails then we print and
> error message and exit.
> 
> Signed-off-by: Enric Balletbo i Serra 

This patch was added to linux-watchdog-next almost 2 weeks ago.

Kind regards,
Wim.



Re: [PATCH 3/4] watchdog: sa11x0/pxa: get rid of get_clock_tick_rate

2016-09-27 Thread Wim Van Sebroeck
Hi Robert,

> The OS timer rate used for the watchdog can now be fetched from the
> standard clock API. This will remove the last user of
> get_clock_tick_rate() in both pxa and sa11x0 architectures.
> 
> Signed-off-by: Robert Jarzmik 

Acked-by: Wim Van Sebroeck 

Kind regards,
Wim.



Re: [RFC 3/3] watchdog: introduce CONFIG_WATCHDOG_OPEN_DEADLINE

2016-08-01 Thread Wim Van Sebroeck
Hi All,

> On 07/27/2016 01:17 PM, Rasmus Villemoes wrote:
> >On 2016-07-21 02:31, Guenter Roeck wrote:
> >>On Thu, Jul 21, 2016 at 12:08:52AM +0200, Rasmus Villemoes wrote:
> >>
> >>I hear you. "configure hardware" is a slippery term, though. After all,
> >>one would typically configure the initial timeout in hardware, just as
> >>any "normal" timeout. In many cases, this will actually already be the
> >>case (and should be), since the watchdog should be enabled by the
> >>ROMMON or BIOS before control is passed to the kernel. As such, the
> >>initial timeout should already be set when the driver is loaded.
> >
> >So this suggests to me that you've misunderstood how I imagine the 
> >"open-deadline" (let me keep that name for now) to work. I do certainly 
> >expect the bootloader to have configured and started the watchdog device 
> >before control is handed to the kernel, preferably with a rather large 
> >timeout, so that the watchdog doesn't reset the board before the kernel 
> >gets around to loading the appropriate driver and detecting that there's a 
> >dog to be fed. In fact, if the watchdog isn't running when the kernel 
> >starts, my patch does nothing.
> >
> 
> No, I did not misunderstand it. We just have a different perspective how to 
> fix it.
> 
> >>Overall, my conclusion is that if a devicetree property is not acceptable
> >>for some reason, we should drop the notion of supporting an initial or
> >>"open" timeout entirely, and leave it up to the BIOS/ROMMON as well as the
> >>respective watchdog driver to set an acceptable default or initial 
> >>timeout.
> >>This initial timeout can (and will) be overwritten with the desired 
> >>runtime
> >>timeout by the watchdog daemon after it opened the watchdog device.
> >>
> Devicetree could be handled in the core, with a function to set the
> initial timeout,
> or possibly even with the watchdog registration itself.
> >>>
> >>>But where in the device tree would you put this value? I'd really prefer 
> >>>not
> >>>having to modify the node representing each individual watchdog device I
> >>>might use.
> >>>
> >>The existing "timeout-sec" property is in the watchdog node as well.
> >
> >Yes, but my "timeout" is not used in any way for configuring the watchdog 
> >device nor the driver for it. Nor does an appropriate value depend on 
> >which watchdog hardware one has.
> >
> >I'm interested in, to borrow your words, "fixing the gap" between handing 
> >over control from the kernel to user-space, by making sure that the kernel 
> >only feeds the watchdog for a finite amount of time - if userspace hasn't 
> >come up and opened the watchdog device by then, the board reboots. I set a 
> >rather generous default of two minutes; it could be (and may in some cases 
> >need to be) more, but the important thing is that the kernel doesn't feed 
> >the watchdog indefinitely.
> >
> 
> I don't think we are making progress. You are absolutely opposed to 
> introducing a
> devicetree property, and I am absolutely opposed to introducing a 
> configuration option.
> The only alternatives I can see would be the old fashioned way of 
> introducing platform
> data, and/or to live with a boot parameter. Or we can wait for Wim to chime 
> in
> and share his opinion.

I would go for a device tree property. If that isn't there then we take a 
standard value which should imho not be bigger then 5 minutes.

Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.8 Merge Window

2016-07-31 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

This pull request contains
* New driver for the watchdog in Aspeed SoCs
* New driver for the watchdog in Maxim PMIC MAX77620
* New driver for the watchdog in Amlogic Meson GXBB SoC
* Support for the r8a7796 watchdog device
* Support for F81866 watchdog device
* Support for 5th variation of Apollo Lake
* Support for MCP78S chipset
* clean-up of softdog.c watchdog device driver
* pic32-wdt and pic32-dmt fixes
* core: min and max timeout improvements, WDOG_HW_RUNNING improvements, status 
funtionality
* core: Add a device managed API for watchdog_register_device()
* Documentation/watchdog: watchdog-test improvements
* Several other fixes and improvements

This will update the following files:

 Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt |   16 
 Documentation/devicetree/bindings/watchdog/meson-gxbb-wdt.txt |   16 
 Documentation/devicetree/bindings/watchdog/qcom-wdt.txt   |4 
 Documentation/devicetree/bindings/watchdog/renesas-wdt.txt|5 
 Documentation/driver-model/devres.txt |3 
 Documentation/watchdog/hpwdt.txt  |5 
 Documentation/watchdog/src/watchdog-test.c|   39 -
 Documentation/watchdog/watchdog-kernel-api.txt|9 
 MAINTAINERS   |6 
 arch/arm/boot/dts/qcom-apq8064.dtsi   |3 
 arch/arm/boot/dts/qcom-ipq4019.dtsi   |2 
 arch/arm/boot/dts/qcom-ipq8064.dtsi   |3 
 arch/arm/boot/dts/qcom-msm8960.dtsi   |3 
 drivers/platform/x86/intel_pmc_ipc.c  |   10 
 drivers/watchdog/Kconfig  |   33 +
 drivers/watchdog/Makefile |3 
 drivers/watchdog/aspeed_wdt.c |  212 +++
 drivers/watchdog/bcm2835_wdt.c|   11 
 drivers/watchdog/da9063_wdt.c |2 
 drivers/watchdog/f71808e_wdt.c|   28 -
 drivers/watchdog/gpio_wdt.c   |2 
 drivers/watchdog/iTCO_wdt.c   |2 
 drivers/watchdog/max77620_wdt.c   |  227 
 drivers/watchdog/meson_gxbb_wdt.c |  270 ++
 drivers/watchdog/nv_tco.c |2 
 drivers/watchdog/pcwd.c   |   14 
 drivers/watchdog/pic32-dmt.c  |5 
 drivers/watchdog/pic32-wdt.c  |9 
 drivers/watchdog/qcom-wdt.c   |   69 +-
 drivers/watchdog/sbsa_gwdt.c  |   16 
 drivers/watchdog/sirfsoc_wdt.c|   15 
 drivers/watchdog/softdog.c|   92 ---
 drivers/watchdog/tangox_wdt.c |4 
 drivers/watchdog/watchdog_core.c  |   39 +
 drivers/watchdog/watchdog_dev.c   |   61 +-
 drivers/watchdog/ziirave_wdt.c|2 
 include/linux/watchdog.h  |6 
 37 files changed, 1062 insertions(+), 186 deletions(-)

with these Changes:

commit 1ac06563434e5f3302259608d3589bf7002431fe
Author: Wei Yongjun 
Date:   Tue Jul 26 14:50:14 2016 +

watchdog: gpio_wdt: Fix missing platform_set_drvdata() in gpio_wdt_probe()

Add missing platform_set_drvdata() in gpio_wdt_probe(), otherwise
calling platform_get_drvdata() in remove returns NULL.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun 
Reviewed-by: Guenter Roeck 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 3c10bbde10fe4dca52726e246cefa6b0a1dfbd3e
Author: Guenter Roeck 
Date:   Thu Jul 21 14:21:56 2016 -0700

watchdog: core: Clear WDOG_HW_RUNNING before calling the stop function

WDOG_HW_RUNNING indicates that the hardware watchdog is running while the
watchdog device is closed. The flag may be set by the driver when it is
instantiated to indicate that the watchdog is running, and that the
watchdog core needs to send heartbeat requests to the driver until the
watchdog device is opened.

When the watchdog device is closed, the flag can be used by the driver's
stop function to indicate to the watchdog core that it was unable to stop
the watchdog, and that the watchdog core needs to send heartbeat requests.
This only works if the flag is actually cleared when the watchdog is
stopped. To avoid having to clear the flag in each driver's stop function,

Re: [RFC 1/3] watchdog: change watchdog_need_worker logic

2016-07-17 Thread Wim Van Sebroeck
Hi Rasmus,

> If the driver indicates that the watchdog is running, the framework
> should feed it until userspace opens the device, regardless of whether
> the driver has set max_hw_heartbeat_ms.
> 
> This patch only affects the case where wdd->max_hw_heartbeat_ms is
> zero, wdd->timeout is non-zero, the watchdog is not active and the
> hardware device is running (*):
> 
> - If wdd->timeout is zero, watchdog_need_worker() returns false both
> before and after this patch, and watchdog_next_keepalive() is not
> called.
> 
> - If watchdog_active(wdd), the return value from watchdog_need_worker
> is also the same as before (namely, hm && t > hm). Hence in that case,
> watchdog_next_keepalive() is only called if hm == max_hw_heartbeat_ms
> is non-zero, so the change to min_not_zero there is a no-op.
> 
> - If the watchdog is not active and the device is not running, we
> return false from watchdog_need_worker just as before.
> 
> That leaves the watchdog_hw_running(wdd) && !watchdog_active(wdd) &&
> wdd->timeout case. Again, it's easy to see that if
> wdd->max_hw_heartbeat_ms is non-zero, we return true from
> watchdog_need_worker with and without this patch, and the logic in
> watchdog_next_keepalive is unchanged. Finally, if
> wdd->max_hw_heartbeat_ms is 0, we used to end up in the
> cancel_delayed_work branch, whereas with this patch we end up
> scheduling a ping timeout_ms/2 from now.
> 
> (*) This should imply that no current kernel drivers are affected,
> since the only drivers which explicitly set WDOG_HW_RUNNING are
> imx2_wdt.c and dw_wdt.c, both of which also provide a non-zero value
> for max_hw_heartbeat_ms. The watchdog core also sets WDOG_HW_RUNNING,
> but only when the driver doesn't provide ->stop, in which case it
> must, according to Documentation/watchdog/watchdog-kernel-api.txt, set
> max_hw_heartbeat_ms.
> 
> Signed-off-by: Rasmus Villemoes 
> ---
>  drivers/watchdog/watchdog_dev.c | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index 3595cff..14f8a92 100644
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
> @@ -92,9 +92,13 @@ static inline bool watchdog_need_worker(struct 
> watchdog_device *wdd)
>*   thus is aware that the framework supports generating heartbeat
>*   requests.
>* - Userspace requests a longer timeout than the hardware can handle.
> +  *
> +  * Alternatively, if userspace has not opened the watchdog
> +  * device, we take care of feeding the watchdog if it is
> +  * running.
>*/
> - return hm && ((watchdog_active(wdd) && t > hm) ||
> -   (t && !watchdog_active(wdd) && watchdog_hw_running(wdd)));
> + return (hm && watchdog_active(wdd) && t > hm) ||
> + (t && !watchdog_active(wdd) && watchdog_hw_running(wdd));
>  }
>  
>  static long watchdog_next_keepalive(struct watchdog_device *wdd)
> @@ -107,7 +111,7 @@ static long watchdog_next_keepalive(struct 
> watchdog_device *wdd)
>   unsigned int hw_heartbeat_ms;
>  
>   virt_timeout = wd_data->last_keepalive + msecs_to_jiffies(timeout_ms);
> - hw_heartbeat_ms = min(timeout_ms, wdd->max_hw_heartbeat_ms);
> + hw_heartbeat_ms = min_not_zero(timeout_ms, wdd->max_hw_heartbeat_ms);
>   keepalive_interval = msecs_to_jiffies(hw_heartbeat_ms / 2);
>  
>   if (!watchdog_active(wdd))
> -- 
> 2.5.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [RFC 1/3] watchdog: change watchdog_need_worker logic

2016-07-17 Thread Wim Van Sebroeck
Hi Guenter,

> On 07/17/2016 12:24 PM, Wim Van Sebroeck wrote:
> >Hi Rasmus,
> >
> >>If the driver indicates that the watchdog is running, the framework
> >>should feed it until userspace opens the device, regardless of whether
> >>the driver has set max_hw_heartbeat_ms.
> >>
> >>This patch only affects the case where wdd->max_hw_heartbeat_ms is
> >>zero, wdd->timeout is non-zero, the watchdog is not active and the
> >>hardware device is running (*):
> >>
> >>- If wdd->timeout is zero, watchdog_need_worker() returns false both
> >>before and after this patch, and watchdog_next_keepalive() is not
> >>called.
> >>
> >>- If watchdog_active(wdd), the return value from watchdog_need_worker
> >>is also the same as before (namely, hm && t > hm). Hence in that case,
> >>watchdog_next_keepalive() is only called if hm == max_hw_heartbeat_ms
> >>is non-zero, so the change to min_not_zero there is a no-op.
> >>
> >>- If the watchdog is not active and the device is not running, we
> >>return false from watchdog_need_worker just as before.
> >>
> >>That leaves the watchdog_hw_running(wdd) && !watchdog_active(wdd) &&
> >>wdd->timeout case. Again, it's easy to see that if
> >>wdd->max_hw_heartbeat_ms is non-zero, we return true from
> >>watchdog_need_worker with and without this patch, and the logic in
> >>watchdog_next_keepalive is unchanged. Finally, if
> >>wdd->max_hw_heartbeat_ms is 0, we used to end up in the
> >>cancel_delayed_work branch, whereas with this patch we end up
> >>scheduling a ping timeout_ms/2 from now.
> >>
> >>(*) This should imply that no current kernel drivers are affected,
> >>since the only drivers which explicitly set WDOG_HW_RUNNING are
> >>imx2_wdt.c and dw_wdt.c, both of which also provide a non-zero value
> >>for max_hw_heartbeat_ms. The watchdog core also sets WDOG_HW_RUNNING,
> >>but only when the driver doesn't provide ->stop, in which case it
> >>must, according to Documentation/watchdog/watchdog-kernel-api.txt, set
> >>max_hw_heartbeat_ms.
> >
> >This isn't completely true. We will have the following in the 
> >linux-watchdog tree:
> >drivers/watchdog/aspeed_wdt.c:   set_bit(WDOG_HW_RUNNING, 
> >&wdt->wdd.status);
> >drivers/watchdog/dw_wdt.c:   set_bit(WDOG_HW_RUNNING, &wdd->status);
> >drivers/watchdog/dw_wdt.c:   set_bit(WDOG_HW_RUNNING, 
> >&wdd->status);
> >drivers/watchdog/imx2_wdt.c: set_bit(WDOG_HW_RUNNING, &wdog->status);
> >drivers/watchdog/imx2_wdt.c: set_bit(WDOG_HW_RUNNING, 
> >&wdog->status);
> >drivers/watchdog/max77620_wdt.c: set_bit(WDOG_HW_RUNNING, 
> >&wdt_dev->status);
> >drivers/watchdog/sbsa_gwdt.c:set_bit(WDOG_HW_RUNNING, 
> >&wdd->status);
> >drivers/watchdog/tangox_wdt.c:   set_bit(WDOG_HW_RUNNING, 
> >&dev->wdt.status);
> >
> >I checked the ones that aren't mentioned and aspeed_wdt, max77620_wdt and 
> >sbsa_gwdt.c
> >also have a non-zero value for max_hw_heartbeat_ms. But tangox_wdt.c 
> >doesn't set it.
> >This one will need to be looked at closer.
> >
> 
> I had a brief look; the tangox_wdt problem is my fault. I overlooked that 
> with
> my commit 'watchdog: tangox: Mark running watchdog correctly'.
> 
> We have a number of options: Set max_hw_heartbeat_ms in tangox_wdt.c,
> accept this patch, or both. I think we should accept this patch.

We accept this patch and add a fix for tangox_wdt.c .

> 
> Thanks,
> Guenter
> 
> >>
> >>Signed-off-by: Rasmus Villemoes 
> >>---
> >>  drivers/watchdog/watchdog_dev.c | 10 +++---
> >>  1 file changed, 7 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/drivers/watchdog/watchdog_dev.c 
> >>b/drivers/watchdog/watchdog_dev.c
> >>index 3595cff..14f8a92 100644
> >>--- a/drivers/watchdog/watchdog_dev.c
> >>+++ b/drivers/watchdog/watchdog_dev.c
> >>@@ -92,9 +92,13 @@ static inline bool watchdog_need_worker(struct 
> >>watchdog_device *wdd)
> >> *   thus is aware that the framework supports generating heartbeat
> >> *   requests.
> >> * - Userspace requests a longer timeout than the hardware can 
> >> handle.
> >>+*
> >>+* Alternatively, if userspace has not opened the watchdog
> >>+* device, 

Re: [PATCH 2/3] watchdog: bcm2835_wdt: remove redundant ->set_timeout callback

2016-07-17 Thread Wim Van Sebroeck
Hi Rasmus,

> bcm2835_wdt_set_timeout does exactly what the watchdog framework does
> in the absence of a ->set_timeout callback (see watchdog_set_timeout
> in watchdog_dev.c), so remove it.
> 
> Signed-off-by: Rasmus Villemoes 
> ---
>  drivers/watchdog/bcm2835_wdt.c | 7 ---
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
> index 733e402..482 100644
> --- a/drivers/watchdog/bcm2835_wdt.c
> +++ b/drivers/watchdog/bcm2835_wdt.c
> @@ -82,12 +82,6 @@ static int bcm2835_wdt_stop(struct watchdog_device *wdog)
>   return 0;
>  }
>  
> -static int bcm2835_wdt_set_timeout(struct watchdog_device *wdog, unsigned 
> int t)
> -{
> - wdog->timeout = t;
> - return 0;
> -}
> -
>  static unsigned int bcm2835_wdt_get_timeleft(struct watchdog_device *wdog)
>  {
>   struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog);
> @@ -100,7 +94,6 @@ static const struct watchdog_ops bcm2835_wdt_ops = {
>   .owner =THIS_MODULE,
>   .start =bcm2835_wdt_start,
>   .stop = bcm2835_wdt_stop,
> - .set_timeout =  bcm2835_wdt_set_timeout,
>   .get_timeleft = bcm2835_wdt_get_timeleft,
>  };
>  
> -- 
> 2.5.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH 1/3] watchdog: bcm2835_wdt: constify _ops and _info structures

2016-07-17 Thread Wim Van Sebroeck
Hi Rasmus,

> These are never modified, so might as well be const.
> 
> Signed-off-by: Rasmus Villemoes 
> ---
>  drivers/watchdog/bcm2835_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
> index 2e6164c..733e402 100644
> --- a/drivers/watchdog/bcm2835_wdt.c
> +++ b/drivers/watchdog/bcm2835_wdt.c
> @@ -96,7 +96,7 @@ static unsigned int bcm2835_wdt_get_timeleft(struct 
> watchdog_device *wdog)
>   return WDOG_TICKS_TO_SECS(ret & PM_WDOG_TIME_SET);
>  }
>  
> -static struct watchdog_ops bcm2835_wdt_ops = {
> +static const struct watchdog_ops bcm2835_wdt_ops = {
>   .owner =THIS_MODULE,
>   .start =bcm2835_wdt_start,
>   .stop = bcm2835_wdt_stop,
> @@ -104,7 +104,7 @@ static struct watchdog_ops bcm2835_wdt_ops = {
>   .get_timeleft = bcm2835_wdt_get_timeleft,
>  };
>  
> -static struct watchdog_info bcm2835_wdt_info = {
> +static const struct watchdog_info bcm2835_wdt_info = {
>   .options =  WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE |
>   WDIOF_KEEPALIVEPING,
>   .identity = "Broadcom BCM2835 Watchdog timer",
> -- 
> 2.5.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH v3 0/3] watchdog: Add Amlogic Meson GXBB Watchdog Timer driver

2016-07-17 Thread Wim Van Sebroeck
Hi Neil,

> Adds support for the Amlogic Meson GXBB SoC Watchdog Timer.
> It differs from the meson6/meson8b HW, so need for a separate driver.
> The HW provides a divider capable of having a 1ms timebase thus simplifying
> the counter update.
> The restart call is not provided even if the HW is capable of triggering a
> system reset immediately because of the PSCI firmare having such 
> functionnality.
> The watchdog is not expected to be running at boot time since there is a 
> separate
> system-level watchdog running from the SCPI co-processor, but this case would 
> be
> handle in a next driver update.
> 
> Changes since v2 at 
> http://lkml.kernel.org/r/1464943007-18000-1-git-send-email-narmstr...@baylibre.com
>  :
> - Fix set_timeout behaviour
> 
> Changes since v1 at 
> http://lkml.kernel.org/r/1464614948-28247-1-git-send-email-narmstr...@baylibre.com
>  :
> - Update default timeout to 30sec
> - Add separate CONFIG_
> - Remove unused defines & functions
> - Fix indentation
> - Check set_timeout max value
> - Reorder includes alphabetically
> - Switch to human identify string
> - clk_disable_unprepare on probe failure or removal
> 
> Changes since RFC version at 
> http://lkml.kernel.org/r/1464249112-13658-1-git-send-email-narmstr...@baylibre.com
>  :
> - Remove status callback, will re-introduce it later to managed the 
> already-running use case
> - Fix registers defines indentation
> - Fix space between operators
> - Make all callbacks static functions
> - Fix bindings with missing clocks attribute
> - Do not stop/start watchdog on a timeout setup
> - Fix probe device configuration
> 
> Neil Armstrong (3):
>   watchdog: Add Meson GXBB Watchdog Driver
>   dt-bindings: watchdog: Add Meson GXBB Watchdog bindings
>   ARM64: dts: amlogic: meson-gxbb: Add watchdog node
> 
>  .../bindings/watchdog/meson-gxbb-wdt.txt   |  16 ++
>  arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi|   6 +
>  drivers/watchdog/Kconfig   |  10 +
>  drivers/watchdog/Makefile  |   1 +
>  drivers/watchdog/meson_gxbb_wdt.c  | 270 
> +
>  5 files changed, 303 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/watchdog/meson-gxbb-wdt.txt
>  create mode 100644 drivers/watchdog/meson_gxbb_wdt.c
> 
> -- 
> 2.7.0
> 

This patches have been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH 1/2] watchdog: ziirave_wdt: Correct I2C device id to fix module autoloading.

2016-07-17 Thread Wim Van Sebroeck
Hi Enric,

> The I2C core removes the manufacturer prefix from the compatible field
> so it reports to user-space the uevent i2c:rave-wdt, but this doesn't
> match with the i2c_device_id (i2c:ziirave-wdt) array so the module is not
> autoloaded. Correct the I2C device id to match with the reported uevent
> and fix the module autoloading functionality.
> 
> Signed-off-by: Enric Balletbo i Serra 
> ---
>  drivers/watchdog/ziirave_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
> index cbe373de..fa1efef 100644
> --- a/drivers/watchdog/ziirave_wdt.c
> +++ b/drivers/watchdog/ziirave_wdt.c
> @@ -339,7 +339,7 @@ static int ziirave_wdt_remove(struct i2c_client *client)
>  }
>  
>  static struct i2c_device_id ziirave_wdt_id[] = {
> - { "ziirave-wdt", 0 },
> + { "rave-wdt", 0 },
>   { }
>  };
>  MODULE_DEVICE_TABLE(i2c, ziirave_wdt_id);
> -- 
> 2.1.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH] watchdog: drop redundant 'default n' option for WATCHDOG_SYSFS

2016-07-17 Thread Wim Van Sebroeck
Hi Vladimir,

> The option 'default n' and its absence are equal for kbuild,
> which makes explicit 'default n' redundant.
> 
> Signed-off-by: Vladimir Zapolskiy 
> ---
>  drivers/watchdog/Kconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index b54f26c..8d38cb8 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -48,7 +48,6 @@ config WATCHDOG_NOWAYOUT
>  
>  config WATCHDOG_SYSFS
>   bool "Read different watchdog information through sysfs"
> - default n
>   help
> Say Y here if you want to enable watchdog device status read through
> sysfs attributes.
> -- 
> 2.5.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH V4] watchdog: max77620: Add support for watchdog timer

2016-07-17 Thread Wim Van Sebroeck
Hi Laxman,

> Maxim PMIC MAX77620 is Power management IC which have multiple
> sub blocks like regulators (DCDC/LDOs), GPIO, RTC, Clock, Watchdog
> timer etc.
> 
> Add the driver for watchdog timer under watchdog framework.
> The driver implements the watchdog callbacks to start, stop,
> ping and set timeout for watchodg framework.
> 
> Signed-off-by: Laxman Dewangan 
> Reviewed-by: Guenter Roeck 
> 
> ---
> Changes from V1:
> - Remove the error prints from start/stop/ping to simplify the function.
> - Instead of stopping running WDT, inform HW RUNNING and update the required
>   param accordingly.
> - Resequence the param sets for wdt device to avoid race condition, move all
>   wdt device setting before registration.
> 
> Changes from V2:
> - Set timeout regardless of WDT running or not in probe.
> 
> Changes from V3:
> - Fix typo in comment.
> ---
>  drivers/watchdog/Kconfig|   9 ++
>  drivers/watchdog/Makefile   |   1 +
>  drivers/watchdog/max77620_wdt.c | 227 
> 
>  3 files changed, 237 insertions(+)
>  create mode 100644 drivers/watchdog/max77620_wdt.c
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index b54f26c..ca0602d 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -516,6 +516,15 @@ config MAX63XX_WATCHDOG
>   help
> Support for memory mapped max63{69,70,71,72,73,74} watchdog timer.
>  
> +config MAX77620_WATCHDOG
> + tristate "Maxim Max77620 Watchdog Timer"
> + depends on MFD_MAX77620
> + help
> +  This is the driver for the Max77620 watchdog timer.
> +  Say 'Y' here to enable the watchdog timer support for
> +  MAX77620 chips. To compile this driver as a module,
> +  choose M here: the module will be called max77620_wdt.
> +
>  config IMX2_WDT
>   tristate "IMX2+ Watchdog"
>   depends on ARCH_MXC || ARCH_LAYERSCAPE
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> index a46e7c1..5d38173 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -203,6 +203,7 @@ obj-$(CONFIG_TANGOX_WATCHDOG) += tangox_wdt.o
>  obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o
>  obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o
>  obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o
> +obj-$(CONFIG_MAX77620_WATCHDOG) += max77620_wdt.o
>  obj-$(CONFIG_ZIIRAVE_WATCHDOG) += ziirave_wdt.o
>  obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
>  obj-$(CONFIG_MENF21BMC_WATCHDOG) += menf21bmc_wdt.o
> diff --git a/drivers/watchdog/max77620_wdt.c b/drivers/watchdog/max77620_wdt.c
> new file mode 100644
> index 000..48b84df
> --- /dev/null
> +++ b/drivers/watchdog/max77620_wdt.c
> @@ -0,0 +1,227 @@
> +/*
> + * Maxim MAX77620 Watchdog Driver
> + *
> + * Copyright (C) 2016 NVIDIA CORPORATION. All rights reserved.
> + *
> + * Author: Laxman Dewangan 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +static bool nowayout = WATCHDOG_NOWAYOUT;
> +
> +struct max77620_wdt {
> + struct device   *dev;
> + struct regmap   *rmap;
> + struct watchdog_device  wdt_dev;
> +};
> +
> +static int max77620_wdt_start(struct watchdog_device *wdt_dev)
> +{
> + struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev);
> +
> + return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2,
> +   MAX77620_WDTEN, MAX77620_WDTEN);
> +}
> +
> +static int max77620_wdt_stop(struct watchdog_device *wdt_dev)
> +{
> + struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev);
> +
> + return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL2,
> +   MAX77620_WDTEN, 0);
> +}
> +
> +static int max77620_wdt_ping(struct watchdog_device *wdt_dev)
> +{
> + struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev);
> +
> + return regmap_update_bits(wdt->rmap, MAX77620_REG_CNFGGLBL3,
> +   MAX77620_WDTC_MASK, 0x1);
> +}
> +
> +static int max77620_wdt_set_timeout(struct watchdog_device *wdt_dev,
> + unsigned int timeout)
> +{
> + struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev);
> + unsigned int wdt_timeout;
> + u8 regval;
> + int ret;
> +
> + switch (timeout) {
> + case 0 ... 2:
> + regval = MAX77620_TWD_2s;
> + wdt_timeout = 2;
> + break;
> +
> + case 3 ... 16:
> + regval = MAX77620_TWD_16s;
> + wdt_timeout = 16;
> + break;
> +
> + case 17 ... 64:
> + regval = MAX77620_TWD_64s;
> + wdt_timeout = 64;
> + break;
> +
> + default:
> + regval = MAX77620_TWD_128s;
> + 

Re: [PATCH V2] watchdog: f71808e_wdt: Add F81866 support

2016-07-17 Thread Wim Van Sebroeck
Hi Ji-Ze,

> Adds watchdog enable support for Fintek F81866 Super-IO chip to
> Fintek wdt driver (f71808e_wdt)
> 
> Tested and verified on iBASE MI802 Industrial PC
> 
> Datasheet references:
> http://www.alldatasheet.com/datasheet-pdf/pdf/459085/FINTEK/F81866AD-I.html
> 
> Suggested-by: Guenter Roeck 
> Signed-off-by: Ji-Ze Hong (Peter Hong) 
> ---
> Change Log:
> V2:
>   1. Put the newer F81866 registers in order with olds.
>   2. Set the register from constant value to BIT() marco
> 
>  drivers/watchdog/f71808e_wdt.c | 28 ++--
>  1 file changed, 26 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c
> index d4ba262..3b2de11 100644
> --- a/drivers/watchdog/f71808e_wdt.c
> +++ b/drivers/watchdog/f71808e_wdt.c
> @@ -45,9 +45,11 @@
>  #define SIO_REG_DEVREV   0x22/* Device revision */
>  #define SIO_REG_MANID0x23/* Fintek ID (2 bytes) */
>  #define SIO_REG_ROM_ADDR_SEL 0x27/* ROM address select */
> +#define SIO_F81866_REG_PORT_SEL  0x27/* F81866 Multi-Function 
> Register */
>  #define SIO_REG_MFUNCT1  0x29/* Multi function select 1 */
>  #define SIO_REG_MFUNCT2  0x2a/* Multi function select 2 */
>  #define SIO_REG_MFUNCT3  0x2b/* Multi function select 3 */
> +#define SIO_F81866_REG_GPIO1 0x2c/* F81866 GPIO1 Enable Register */
>  #define SIO_REG_ENABLE   0x30/* Logical device enable */
>  #define SIO_REG_ADDR 0x60/* Logical device address (2 bytes) */
>  
> @@ -60,6 +62,7 @@
>  #define SIO_F71882_ID0x0541  /* Chipset ID */
>  #define SIO_F71889_ID0x0723  /* Chipset ID */
>  #define SIO_F81865_ID0x0704  /* Chipset ID */
> +#define SIO_F81866_ID0x1010  /* Chipset ID */
>  
>  #define F71808FG_REG_WDO_CONF0xf0
>  #define F71808FG_REG_WDT_CONF0xf5
> @@ -116,7 +119,8 @@ module_param(start_withtimeout, uint, 0);
>  MODULE_PARM_DESC(start_withtimeout, "Start watchdog timer on module load 
> with"
>   " given initial timeout. Zero (default) disables this feature.");
>  
> -enum chips { f71808fg, f71858fg, f71862fg, f71869, f71882fg, f71889fg, 
> f81865 };
> +enum chips { f71808fg, f71858fg, f71862fg, f71869, f71882fg, f71889fg, 
> f81865,
> +  f81866};
>  
>  static const char *f71808e_names[] = {
>   "f71808fg",
> @@ -126,6 +130,7 @@ static const char *f71808e_names[] = {
>   "f71882fg",
>   "f71889fg",
>   "f81865",
> + "f81866",
>  };
>  
>  /* Super-I/O Function prototypes */
> @@ -370,6 +375,22 @@ static int watchdog_start(void)
>   superio_clear_bit(watchdog.sioaddr, SIO_REG_MFUNCT3, 5);
>   break;
>  
> + case f81866:
> + /* Set pin 70 to WDTRST# */
> + superio_clear_bit(watchdog.sioaddr, SIO_F81866_REG_PORT_SEL,
> +   BIT(3) | BIT(0));
> + superio_set_bit(watchdog.sioaddr, SIO_F81866_REG_PORT_SEL,
> + BIT(2));
> + /*
> +  * GPIO1 Control Register when 27h BIT3:2 = 01 & BIT0 = 0.
> +  * The PIN 70(GPIO15/WDTRST) is controlled by 2Ch:
> +  * BIT5: 0 -> WDTRST#
> +  *   1 -> GPIO15
> +  */
> + superio_clear_bit(watchdog.sioaddr, SIO_F81866_REG_GPIO1,
> +   BIT(5));
> + break;
> +
>   default:
>   /*
>* 'default' label to shut up the compiler and catch
> @@ -382,7 +403,7 @@ static int watchdog_start(void)
>   superio_select(watchdog.sioaddr, SIO_F71808FG_LD_WDT);
>   superio_set_bit(watchdog.sioaddr, SIO_REG_ENABLE, 0);
>  
> - if (watchdog.type == f81865)
> + if (watchdog.type == f81865 || watchdog.type == f81866)
>   superio_set_bit(watchdog.sioaddr, F81865_REG_WDO_CONF,
>   F81865_FLAG_WDOUT_EN);
>   else
> @@ -788,6 +809,9 @@ static int __init f71808e_find(int sioaddr)
>   case SIO_F81865_ID:
>   watchdog.type = f81865;
>   break;
> + case SIO_F81866_ID:
> + watchdog.type = f81866;
> + break;
>   default:
>   pr_info("Unrecognized Fintek device: %04x\n",
>   (unsigned int)devid);
> -- 
> 1.9.1
> 

This patch has been added to linux-watchog-next.

Kind regards,
Wim.



Re: [PATCH 0/3] watchdog, sbsa_gwdt: Update SBSA watchdog with the new infrastructure of watchdog.

2016-07-17 Thread Wim Van Sebroeck
Hi Fu,

> From: Fu Wei 
> 
> This patchset:
> (1)Try to fix an issue about min and max timeout validity check:
> when max_hw_heartbeat_ms is defined, this check should be skipped.
> 
> (2)Use max_hw_heartbeat_ms instead of max_timeout in SBSA watchdog.
> 
> (3)Set WDOG_HW_RUNNING, when SBSA watchdog is already running before
> it's initialized.
> 
> Changelog:
> v1: The first formal upstreaming version
> 
> RFC: https://lkml.org/lkml/2016/5/3/145
> 
> Pratyush Anand (3):
>   watchdog: skip min and max timeout validity check when
> max_hw_heartbeat_ms is defined
>   sbsa_gwdt: Use max_hw_heartbeat_ms instead of max_timeout
>   sbsa_gwdt: Set WDOG_HW_RUNNING, when watchdog is already running.
> 
>  drivers/watchdog/sbsa_gwdt.c | 6 --
>  drivers/watchdog/watchdog_core.c | 2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> -- 
> 2.5.5
> 

These patches have been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH] watchdog: pcwd: Utilize the module_isa_driver macro

2016-07-17 Thread Wim Van Sebroeck
Hi William,

> This driver does not do anything special in module init/exit. This patch
> eliminates the module init/exit boilerplate code by utilizing the
> module_isa_driver macro.
> 
> Signed-off-by: William Breathitt Gray 
> ---
>  drivers/watchdog/pcwd.c | 14 +-
>  1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
> index e936f15..3ad5206 100644
> --- a/drivers/watchdog/pcwd.c
> +++ b/drivers/watchdog/pcwd.c
> @@ -992,19 +992,7 @@ static struct isa_driver pcwd_isa_driver = {
>   },
>  };
>  
> -static int __init pcwd_init_module(void)
> -{
> - return isa_register_driver(&pcwd_isa_driver, PCWD_ISA_NR_CARDS);
> -}
> -
> -static void __exit pcwd_cleanup_module(void)
> -{
> - isa_unregister_driver(&pcwd_isa_driver);
> - pr_info("Watchdog Module Unloaded\n");
> -}
> -
> -module_init(pcwd_init_module);
> -module_exit(pcwd_cleanup_module);
> +module_isa_driver(pcwd_isa_driver, PCWD_ISA_NR_CARDS);
>  
>  MODULE_AUTHOR("Ken Hollis , "
>   "Wim Van Sebroeck ");
> -- 
> 2.7.3
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [RFC 1/3] watchdog: change watchdog_need_worker logic

2016-07-17 Thread Wim Van Sebroeck
Hi Rasmus,

> If the driver indicates that the watchdog is running, the framework
> should feed it until userspace opens the device, regardless of whether
> the driver has set max_hw_heartbeat_ms.
> 
> This patch only affects the case where wdd->max_hw_heartbeat_ms is
> zero, wdd->timeout is non-zero, the watchdog is not active and the
> hardware device is running (*):
> 
> - If wdd->timeout is zero, watchdog_need_worker() returns false both
> before and after this patch, and watchdog_next_keepalive() is not
> called.
> 
> - If watchdog_active(wdd), the return value from watchdog_need_worker
> is also the same as before (namely, hm && t > hm). Hence in that case,
> watchdog_next_keepalive() is only called if hm == max_hw_heartbeat_ms
> is non-zero, so the change to min_not_zero there is a no-op.
> 
> - If the watchdog is not active and the device is not running, we
> return false from watchdog_need_worker just as before.
> 
> That leaves the watchdog_hw_running(wdd) && !watchdog_active(wdd) &&
> wdd->timeout case. Again, it's easy to see that if
> wdd->max_hw_heartbeat_ms is non-zero, we return true from
> watchdog_need_worker with and without this patch, and the logic in
> watchdog_next_keepalive is unchanged. Finally, if
> wdd->max_hw_heartbeat_ms is 0, we used to end up in the
> cancel_delayed_work branch, whereas with this patch we end up
> scheduling a ping timeout_ms/2 from now.
> 
> (*) This should imply that no current kernel drivers are affected,
> since the only drivers which explicitly set WDOG_HW_RUNNING are
> imx2_wdt.c and dw_wdt.c, both of which also provide a non-zero value
> for max_hw_heartbeat_ms. The watchdog core also sets WDOG_HW_RUNNING,
> but only when the driver doesn't provide ->stop, in which case it
> must, according to Documentation/watchdog/watchdog-kernel-api.txt, set
> max_hw_heartbeat_ms.

This isn't completely true. We will have the following in the linux-watchdog 
tree:
drivers/watchdog/aspeed_wdt.c:  set_bit(WDOG_HW_RUNNING, 
&wdt->wdd.status);
drivers/watchdog/dw_wdt.c:  set_bit(WDOG_HW_RUNNING, &wdd->status);
drivers/watchdog/dw_wdt.c:  set_bit(WDOG_HW_RUNNING, &wdd->status);
drivers/watchdog/imx2_wdt.c:set_bit(WDOG_HW_RUNNING, &wdog->status);
drivers/watchdog/imx2_wdt.c:set_bit(WDOG_HW_RUNNING, &wdog->status);
drivers/watchdog/max77620_wdt.c:set_bit(WDOG_HW_RUNNING, 
&wdt_dev->status);
drivers/watchdog/sbsa_gwdt.c:   set_bit(WDOG_HW_RUNNING, &wdd->status);
drivers/watchdog/tangox_wdt.c:  set_bit(WDOG_HW_RUNNING, 
&dev->wdt.status);

I checked the ones that aren't mentioned and aspeed_wdt, max77620_wdt and 
sbsa_gwdt.c
also have a non-zero value for max_hw_heartbeat_ms. But tangox_wdt.c doesn't 
set it.
This one will need to be looked at closer.

> 
> Signed-off-by: Rasmus Villemoes 
> ---
>  drivers/watchdog/watchdog_dev.c | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index 3595cff..14f8a92 100644
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
> @@ -92,9 +92,13 @@ static inline bool watchdog_need_worker(struct 
> watchdog_device *wdd)
>*   thus is aware that the framework supports generating heartbeat
>*   requests.
>* - Userspace requests a longer timeout than the hardware can handle.
> +  *
> +  * Alternatively, if userspace has not opened the watchdog
> +  * device, we take care of feeding the watchdog if it is
> +  * running.
>*/
> - return hm && ((watchdog_active(wdd) && t > hm) ||
> -   (t && !watchdog_active(wdd) && watchdog_hw_running(wdd)));
> + return (hm && watchdog_active(wdd) && t > hm) ||
> + (t && !watchdog_active(wdd) && watchdog_hw_running(wdd));
>  }
>  
>  static long watchdog_next_keepalive(struct watchdog_device *wdd)
> @@ -107,7 +111,7 @@ static long watchdog_next_keepalive(struct 
> watchdog_device *wdd)
>   unsigned int hw_heartbeat_ms;
>  
>   virt_timeout = wd_data->last_keepalive + msecs_to_jiffies(timeout_ms);
> - hw_heartbeat_ms = min(timeout_ms, wdd->max_hw_heartbeat_ms);
> + hw_heartbeat_ms = min_not_zero(timeout_ms, wdd->max_hw_heartbeat_ms);
>   keepalive_interval = msecs_to_jiffies(hw_heartbeat_ms / 2);
>  
>   if (!watchdog_active(wdd))
> -- 
> 2.5.0
> 

Kind regards,
Wim.



Re: [PATCH v2] watchdog: Add a device managed API for watchdog_register_device()

2016-07-17 Thread Wim Van Sebroeck
Hi Neil,

> This helps in reducing code in .remove callbacks and sometimes
> dropping .remove callbacks entirely.
> 
> Changes since v1 at 
> http://lkml.kernel.org/r/1464251510-15554-1-git-send-email-narmstr...@baylibre.com
>  :
> - Fix brackets in devm_watchdog_register_device()
> 
> Signed-off-by: Neil Armstrong 
> ---
>  Documentation/driver-model/devres.txt |  3 +++
>  drivers/watchdog/watchdog_core.c  | 37 
> +++
>  include/linux/watchdog.h  |  3 +++
>  3 files changed, 43 insertions(+)
> 
> diff --git a/Documentation/driver-model/devres.txt 
> b/Documentation/driver-model/devres.txt
> index c63eea0..589296b 100644
> --- a/Documentation/driver-model/devres.txt
> +++ b/Documentation/driver-model/devres.txt
> @@ -357,3 +357,6 @@ SLAVE DMA ENGINE
>  
>  SPI
>devm_spi_register_master()
> +
> +WATCHDOG
> +  devm_watchdog_register_device()
> diff --git a/drivers/watchdog/watchdog_core.c 
> b/drivers/watchdog/watchdog_core.c
> index 981a668..7c5e3dc 100644
> --- a/drivers/watchdog/watchdog_core.c
> +++ b/drivers/watchdog/watchdog_core.c
> @@ -329,6 +329,43 @@ void watchdog_unregister_device(struct watchdog_device 
> *wdd)
>  
>  EXPORT_SYMBOL_GPL(watchdog_unregister_device);
>  
> +static void devm_watchdog_unregister_device(struct device *dev, void *res)
> +{
> + watchdog_unregister_device(*(struct watchdog_device **)res);
> +}
> +
> +/**
> + * devm_watchdog_register_device() - resource managed 
> watchdog_register_device()
> + * @dev: device that is registering this watchdog device
> + * @wdd: watchdog device
> + *
> + * Managed watchdog_register_device(). For watchdog device registered by this
> + * function,  watchdog_unregister_device() is automatically called on driver
> + * detach. See watchdog_register_device() for more information.
> + */
> +int devm_watchdog_register_device(struct device *dev,
> + struct watchdog_device *wdd)
> +{
> + struct watchdog_device **rcwdd;
> + int ret;
> +
> + rcwdd = devres_alloc(devm_watchdog_unregister_device, sizeof(*wdd),
> +  GFP_KERNEL);
> + if (!rcwdd)
> + return -ENOMEM;
> +
> + ret = watchdog_register_device(wdd);
> + if (!ret) {
> + *rcwdd = wdd;
> + devres_add(dev, rcwdd);
> + } else {
> + devres_free(rcwdd);
> + }
> +
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(devm_watchdog_register_device);
> +
>  static int __init watchdog_deferred_registration(void)
>  {
>   mutex_lock(&wtd_deferred_reg_mutex);
> diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
> index 51732d6c..6b75e38 100644
> --- a/include/linux/watchdog.h
> +++ b/include/linux/watchdog.h
> @@ -180,4 +180,7 @@ extern int watchdog_init_timeout(struct watchdog_device 
> *wdd,
>  extern int watchdog_register_device(struct watchdog_device *);
>  extern void watchdog_unregister_device(struct watchdog_device *);
>  
> +/* devres register variant */
> +int devm_watchdog_register_device(struct device *dev, struct watchdog_device 
> *);
> +
>  #endif  /* ifndef _LINUX_WATCHDOG_H */
> -- 
> 2.7.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.7 Merge Window

2016-05-25 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

This adds following changes:
* Add support for Fintek F81865 Super-IO chip
* Add support for watchdogs (RWDT and SWDT) found on RCar Gen3 based SoCs from 
Renesas
* octeon: Handle the FROZEN hot plug notifier actions
* f71808e_wdt fixes and cleanups
* Some small improvements in code and documentation

This will update the following files:

 Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt |4 
 Documentation/devicetree/bindings/watchdog/renesas-wdt.txt |   25 +
 Documentation/watchdog/hpwdt.txt   |   57 +--
 Documentation/watchdog/watchdog-parameters.txt |4 
 MAINTAINERS|1 
 arch/arm64/configs/defconfig   |2 
 drivers/watchdog/Kconfig   |8 
 drivers/watchdog/Makefile  |1 
 drivers/watchdog/cpwd.c|4 
 drivers/watchdog/f71808e_wdt.c |   30 +
 drivers/watchdog/imx2_wdt.c|   19 +
 drivers/watchdog/jz4740_wdt.c  |4 
 drivers/watchdog/octeon-wdt-main.c |2 
 drivers/watchdog/qcom-wdt.c|7 
 drivers/watchdog/renesas_wdt.c |  213 +
 drivers/watchdog/shwdt.c   |4 
 drivers/watchdog/sp5100_tco.c  |   15 
 drivers/watchdog/watchdog_core.c   |2 
 drivers/watchdog/watchdog_dev.c|1 
 19 files changed, 349 insertions(+), 54 deletions(-)

with these Changes:

commit 540be8b2add1a18a4289b11c1a9b6956eb846630
Author: Geert Uytterhoeven 
Date:   Sun May 22 11:06:29 2016 +0200

MAINTAINERS: Add file patterns for watchdog device tree bindings

Submitters of device tree binding documentation may forget to CC
the subsystem maintainer if this is missing.

Signed-off-by: Geert Uytterhoeven 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 
Cc: linux-watch...@vger.kernel.org

commit ae67643edc6edcab41d8d5d35cb796416b253a01
Author: William Breathitt Gray 
Date:   Wed May 11 08:47:46 2016 -0400

Documentation: Add ebc-c384_wdt watchdog-parameters.txt entry

The WinSystems EBC-C384 watchdog timer driver supports two module
parameters: timeout and nowayout. These parameters should be documented
in the watchdog-parameters.txt file.

Signed-off-by: William Breathitt Gray 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 12fe36e2ca0e474a2d7b48ab018d16977f9745a4
Author: Muhammad Falak R Wani 
Date:   Fri May 6 18:29:41 2016 +0530

watchdog: shwdt: Use setup_timer()

The function setup_timer combines the initialization of a timer with
the initialization of the timer's function and data fields.
The multiline code for timer initialization is now replaced
with function setup_timer.

Signed-off-by: Muhammad Falak R Wani 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit d904ac34bdbcf62a50c745cfe991681ae3948e4e
Author: Muhammad Falak R Wani 
Date:   Fri May 6 18:29:40 2016 +0530

watchdog: cpwd: Use setup_timer()

The function setup_timer combines the initialization of a timer with
the initialization of the timer's function and data fields.
The multiline code for timer initialization is now replaced
with function setup_timer.

Signed-off-by: Muhammad Falak R Wani 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit fc4d2c7390dde766ec62f8f83be06e9227e9eb7a
Author: Wolfram Sang 
Date:   Fri Apr 1 13:56:26 2016 +0200

arm64: defconfig: enable Renesas Watchdog Timer

Signed-off-by: Wolfram Sang 
Reviewed-by: Geert Uytterhoeven 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit bd99b68ed7f96c9c845aad2a25f84145213058f2
Author: Wolfram Sang 
Date:   Fri Apr 1 13:56:23 2016 +0200

watchdog: renesas-wdt: add driver

Add support for watchdogs (RWDT and SWDT) found on RCar Gen3 based SoCs
from Renesas.

Signed-off-by: Wolfram Sang 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit e26e74b15468b42c47cf9b045539720006abb1e4
Author: Colin Ian King 
Date:   Tue Apr 26 18:18:49 2016 +0100

watchdog: remove error message when unable to allocate watchdog device

The dev_err message is superfluous because the failure is already
printed by dev_kzalloc, so remove it.

Signed-off-by: Colin Ian King 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit b97cb21a46341575c6cbe3d327a08b99030c3aee
Author: Knud Poulsen 
Date:  

Re: [PATCH 52/54] MAINTAINERS: Add file patterns for watchdog device tree bindings

2016-05-23 Thread Wim Van Sebroeck
Hi Geert,

> Submitters of device tree binding documentation may forget to CC
> the subsystem maintainer if this is missing.
> 
> Signed-off-by: Geert Uytterhoeven 
> Cc: Wim Van Sebroeck 
> Cc: Guenter Roeck 
> Cc: linux-watch...@vger.kernel.org
> ---
> Please apply this patch directly if you want to be involved in device
> tree binding documentation for your subsystem.
> ---
>  MAINTAINERS | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9f54762f002e16de..7202b6565dd98d50 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12400,6 +12400,7 @@ L:linux-watch...@vger.kernel.org
>  W:   http://www.linux-watchdog.org/
>  T:   git git://www.linux-watchdog.org/linux-watchdog.git
>  S:   Maintained
> +F:   Documentation/devicetree/bindings/watchdog/
>  F:   Documentation/watchdog/
>  F:   drivers/watchdog/
>  F:   include/linux/watchdog.h
> -- 
> 1.9.1
> 

Patch added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH] Documentation: Add ebc-c384_wdt watchdog-parameters.txt entry

2016-05-14 Thread Wim Van Sebroeck
Hi William

> The WinSystems EBC-C384 watchdog timer driver supports two module
> parameters: timeout and nowayout. These parameters should be documented
> in the watchdog-parameters.txt file.
> 
> Signed-off-by: William Breathitt Gray 
> ---
>  Documentation/watchdog/watchdog-parameters.txt | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/watchdog/watchdog-parameters.txt 
> b/Documentation/watchdog/watchdog-parameters.txt
> index c161399..a8d3642 100644
> --- a/Documentation/watchdog/watchdog-parameters.txt
> +++ b/Documentation/watchdog/watchdog-parameters.txt
> @@ -86,6 +86,10 @@ nowayout: Watchdog cannot be stopped once started
>  davinci_wdt:
>  heartbeat: Watchdog heartbeat period in seconds from 1 to 600, default 60
>  -
> +ebc-c384_wdt:
> +timeout: Watchdog timeout in seconds. (1<=timeout<=15300, default=60)
> +nowayout: Watchdog cannot be stopped once started
> +-
>  ep93xx_wdt:
>  nowayout: Watchdog cannot be stopped once started
>  timeout: Watchdog timeout in seconds. (1<=timeout<=3600, default=TBD)
> -- 
> 2.7.3
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.



Re: [PATCH 2/2] watchdog: shwdt: Use setup_timer()

2016-05-14 Thread Wim Van Sebroeck
Hi Muhammed,

> The function setup_timer combines the initialization of a timer with
> the initialization of the timer's function and data fields.
> The multiline code for timer initialization is now replaced
> with function setup_timer.
> 
> Signed-off-by: Muhammad Falak R Wani 
> ---
>  drivers/watchdog/shwdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
> index f908121..517a733 100644
> --- a/drivers/watchdog/shwdt.c
> +++ b/drivers/watchdog/shwdt.c
> @@ -275,9 +275,7 @@ static int sh_wdt_probe(struct platform_device *pdev)
>   return rc;
>   }
>  
> - init_timer(&wdt->timer);
> - wdt->timer.function = sh_wdt_ping;
> - wdt->timer.data = (unsigned long)wdt;
> + setup_timer(&wdt->timer, sh_wdt_ping, (unsigned long)wdt);
>   wdt->timer.expires  = next_ping_period(clock_division_ratio);
>  
>   dev_info(&pdev->dev, "initialized.\n");
> -- 
> 1.9.1
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.



Re: [PATCH 1/2] watchdog: cpwd: Use setup_timer()

2016-05-14 Thread Wim Van Sebroeck
Hi Muhammed,

> The function setup_timer combines the initialization of a timer with
> the initialization of the timer's function and data fields.
> The multiline code for timer initialization is now replaced
> with function setup_timer.
> 
> Signed-off-by: Muhammad Falak R Wani 
> ---
>  drivers/watchdog/cpwd.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
> index 0200768..71ee079 100644
> --- a/drivers/watchdog/cpwd.c
> +++ b/drivers/watchdog/cpwd.c
> @@ -611,9 +611,7 @@ static int cpwd_probe(struct platform_device *op)
>   }
>  
>   if (p->broken) {
> - init_timer(&cpwd_timer);
> - cpwd_timer.function = cpwd_brokentimer;
> - cpwd_timer.data = (unsigned long) p;
> + setup_timer(&cpwd_timer, cpwd_brokentimer, (unsigned long)p);
>   cpwd_timer.expires  = WD_BTIMEOUT;
>  
>   pr_info("PLD defect workaround enabled for model %s\n",
> -- 
> 1.9.1
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.



Re: [PATCH] watchdog: remove error message when unable to allocate watchdog device

2016-05-14 Thread Wim Van Sebroeck
Hi Colin,

> From: Colin Ian King 
> 
> The dev_err message is superfluous because the failure is already
> printed by dev_kzalloc, so remove it.
> 
> Signed-off-by: Colin Ian King 
> ---
>  drivers/watchdog/jz4740_wdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
> index 6a7d5c3..c8d51dd 100644
> --- a/drivers/watchdog/jz4740_wdt.c
> +++ b/drivers/watchdog/jz4740_wdt.c
> @@ -160,10 +160,8 @@ static int jz4740_wdt_probe(struct platform_device *pdev)
>  
>   drvdata = devm_kzalloc(&pdev->dev, sizeof(struct jz4740_wdt_drvdata),
>  GFP_KERNEL);
> - if (!drvdata) {
> - dev_err(&pdev->dev, "Unable to alloacate watchdog device\n");
> + if (!drvdata)
>   return -ENOMEM;
> - }
>  
>   if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
>   heartbeat = DEFAULT_HEARTBEAT;
> -- 
> 2.7.4
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.



Re: [PATCH] watchdog: core: Fix circular locking dependency

2016-05-14 Thread Wim Van Sebroeck
Hi Guenter,

> On 05/14/2016 10:07 AM, Guenter Roeck wrote:
> >Hi Wim,
> >
> >On 05/14/2016 09:41 AM, Wim Van Sebroeck wrote:
> >>Hi Guenter,
> >>
> >>>lockdep reports the following circular locking dependency.
> >>>
> >
> >You are faster than me this time. I was just about to send you a pull 
> >request.
> >Sorry for being late. The watchdog-next branch in my repository on 
> >kernel.org
> >has all patches in my queue, in case you want to have a look.
> >
> >I'll rebase my branch to yours and see if anything is missing, then send
> >you a pull request on top of it if needed.
> >
> 
> All there. Looks like you picked it up right after I updated the branch
> this morning.

Correct ;-)

Kind regards,
Wim.



Re: [PATCH] watchdog: qcom: Report reboot reason

2016-05-14 Thread Wim Van Sebroeck
Hi Guenter,

> The Qualcom watchdog timer block reports if the system was reset by the
> watchdog. Pass the information to user space.
> 
> Cc: Grant Grundler 
> Signed-off-by: Guenter Roeck 
> ---
>  drivers/watchdog/qcom-wdt.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

This patch has been added into linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH 2/5] watchdog: octeon: Handle the FROZEN hot plug notifier actions.

2016-05-14 Thread Wim Van Sebroeck
Hi Richard,

> When performing a suspend operation, the kernel brings all of the
> non-boot CPUs offline, calling the hot plug notifiers with the flag,
> CPU_TASKS_FROZEN, set in the action code.  Similarly, during resume,
> the CPUs are brought back online, but again the notifiers have the
> FROZEN flag set.
> 
> While some very few drivers really need to treat suspend/resume
> specially, this driver unintentionally ignores the notifications.
> 
> This patch changes the driver to disable the watchdog interrupt
> whenever the CPU goes offline, and to enable it whenever the CPU goes
> back online.  As a result, the suspended state is no longer a special
> case that leaves the watchdog active.
> 
> Cc: Wim Van Sebroeck 
> Cc: Guenter Roeck 
> Cc: linux-watch...@vger.kernel.org
> Signed-off-by: Richard Cochran 
> ---
>  drivers/watchdog/octeon-wdt-main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH] sp5100_tco: properly check for new register layouts

2016-05-14 Thread Wim Van Sebroeck
Hi Lucas,

> Commits 190aa4304de6 (Add AMD Mullins platform support) and
> cca118fa2a0a94 (Add AMD Carrizo platform support) enabled the
> driver on a lot more devices, but the following commit missed
> a single location in the code when checking if the SB800 register
> offsets should be used. This leads to the wrong register being
> written which in turn causes ACPI to go haywire.
> 
> Fix this by introducing a helper function to check for the new
> register layout and use this consistently.
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=114201
> https://bugzilla.redhat.com/show_bug.cgi?id=1329910
> Fixes: bdecfcdb5461 (sp5100_tco: fix the device check for SB800
> and later chipsets)
> Cc: sta...@vger.kernel.org (4.5+)
> Signed-off-by: Lucas Stach 
> ---
>  drivers/watchdog/sp5100_tco.c | 15 ++-
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH] watchdog: core: Fix circular locking dependency

2016-05-14 Thread Wim Van Sebroeck
Hi Guenter,

> lockdep reports the following circular locking dependency.
> 
> ==
> INFO: possible circular locking dependency detected ]
> 4.6.0-rc3-00191-gfabf418 #162 Not tainted
> ---
> systemd/1 is trying to acquire lock:
> ((&(&wd_data->work)->work)){+.+...}, at: [<80141650>] flush_work+0x0/0x280
> 
> but task is already holding lock:
> 
> (&wd_data->lock){+.+...}, at: [<804acfa8>] watchdog_release+0x18/0x190
> 
> which lock already depends on the new lock.
> the existing dependency chain (in reverse order) is:
> 
> -> #1 (&wd_data->lock){+.+...}:
>   [<80662310>] mutex_lock_nested+0x64/0x4a8
>   [<804aca4c>] watchdog_ping_work+0x18/0x4c
>   [<80143128>] process_one_work+0x1ac/0x500
>   [<801434b4>] worker_thread+0x38/0x554
>   [<80149510>] kthread+0xf4/0x108
>   [<80107c10>] ret_from_fork+0x14/0x24
> 
> -> #0 ((&(&wd_data->work)->work)){+.+...}:
>   [<8017c4e8>] lock_acquire+0x70/0x90
>   [<8014169c>] flush_work+0x4c/0x280
>   [<801440f8>] __cancel_work_timer+0x9c/0x1e0
>   [<804acfcc>] watchdog_release+0x3c/0x190
>   [<8022c5e8>] __fput+0x80/0x1c8
>   [<80147b28>] task_work_run+0x94/0xc8
>   [<8010b998>] do_work_pending+0x8c/0xb4
>   [<80107ba8>] slow_work_pending+0xc/0x20
> 
> other info that might help us debug this:
> Possible unsafe locking scenario:
> 
> CPU0CPU1
> 
> lock(&wd_data->lock);
> lock((&(&wd_data->work)->work));
> lock(&wd_data->lock);
> lock((&(&wd_data->work)->work));
> 
> *** DEADLOCK ***
> 
> 1 lock held by systemd/1:
> 
> stack backtrace:
> CPU: 2 PID: 1 Comm: systemd Not tainted 4.6.0-rc3-00191-gfabf418 #162
> Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> [<8010f5e4>] (unwind_backtrace) from [<8010c038>] (show_stack+0x10/0x14)
> [<8010c038>] (show_stack) from [<8039d7fc>] (dump_stack+0xa8/0xd4)
> [<8039d7fc>] (dump_stack) from [<80177ee0>] (print_circular_bug+0x214/0x334)
> [<80177ee0>] (print_circular_bug) from [<80179230>] 
> (check_prevs_add+0x4dc/0x8e8)
> [<80179230>] (check_prevs_add) from [<8017b3d8>] (__lock_acquire+0xc6c/0x14ec)
> [<8017b3d8>] (__lock_acquire) from [<8017c4e8>] (lock_acquire+0x70/0x90)
> [<8017c4e8>] (lock_acquire) from [<8014169c>] (flush_work+0x4c/0x280)
> [<8014169c>] (flush_work) from [<801440f8>] (__cancel_work_timer+0x9c/0x1e0)
> [<801440f8>] (__cancel_work_timer) from [<804acfcc>] 
> (watchdog_release+0x3c/0x190)
> [<804acfcc>] (watchdog_release) from [<8022c5e8>] (__fput+0x80/0x1c8)
> [<8022c5e8>] (__fput) from [<80147b28>] (task_work_run+0x94/0xc8)
> [<80147b28>] (task_work_run) from [<8010b998>] (do_work_pending+0x8c/0xb4)
> [<8010b998>] (do_work_pending) from [<80107ba8>] (slow_work_pending+0xc/0x20)
> 
> Turns out the call to cancel_delayed_work_sync() in watchdog_release()
> is not necessary and can be dropped. If the worker is no longer necessary,
> the subsequent call to watchdog_update_worker() will cancel it. If it is
> already running, it won't do anything, since the worker function checks
> if it needs to ping the watchdog or not.
> 
> Reported-by: Clemens Gruber 
> Tested-by: Clemens Gruber 
> Fixes: 11d7aba9ceb7 ("watchdog: imx2: Convert to use infrastructure triggered 
> keepalives")
> Signed-off-by: Guenter Roeck 
> ---
>  drivers/watchdog/watchdog_dev.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index e2c5abbb45ff..3595cffa24ea 100644
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
> @@ -736,7 +736,6 @@ static int watchdog_release(struct inode *inode, struct 
> file *file)
>   watchdog_ping(wdd);
>   }
>  
> - cancel_delayed_work_sync(&wd_data->work);
>   watchdog_update_worker(wdd);
>  
>   /* make sure that /dev/watchdog can be re-opened */
> -- 
> 2.5.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



[GIT PULL REQUEST] watchdog - v4.6 Merge Window

2016-03-19 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

It contains:
* new drivers for: NI 903x/913x watchdog driver, WinSystems EBC-C384
  watchdog timer and ARM SBSA watchdog driver
* Support for NCT6102D devices
* Improvements of the generic watchdog framework (improve restart
  handler, make set_timeout optional, introduce infrastructure
  triggered keepalives, ...
* improvements on the pnx4008 watchdog driver
* several smaller fixes and improvements

This will update the following files:

 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt |   31 +
 Documentation/watchdog/watchdog-kernel-api.txt   |   59 +-
 Documentation/watchdog/watchdog-parameters.txt   |   12 
 MAINTAINERS  |6 
 arch/arm/mach-lpc32xx/common.c   |   15 
 arch/arm/mach-lpc32xx/common.h   |1 
 arch/arm/mach-lpc32xx/phy3250.c  |1 
 drivers/watchdog/Kconfig |   52 +
 drivers/watchdog/Makefile|3 
 drivers/watchdog/atlas7_wdt.c|5 
 drivers/watchdog/bcm47xx_wdt.c   |3 
 drivers/watchdog/da9063_wdt.c|3 
 drivers/watchdog/digicolor_wdt.c |3 
 drivers/watchdog/dw_wdt.c|  323 ---
 drivers/watchdog/ebc-c384_wdt.c  |  188 ++
 drivers/watchdog/imgpdc_wdt.c|3 
 drivers/watchdog/imx2_wdt.c  |   77 --
 drivers/watchdog/lpc18xx_wdt.c   |3 
 drivers/watchdog/meson_wdt.c |3 
 drivers/watchdog/moxart_wdt.c|3 
 drivers/watchdog/mtk_wdt.c   |3 
 drivers/watchdog/ni903x_wdt.c|  270 +
 drivers/watchdog/pnx4008_wdt.c   |   42 +
 drivers/watchdog/qcom-wdt.c  |3 
 drivers/watchdog/rc32434_wdt.c   |2 
 drivers/watchdog/s3c2410_wdt.c   |   19 
 drivers/watchdog/sbsa_gwdt.c |  408 +++
 drivers/watchdog/sunxi_wdt.c |3 
 drivers/watchdog/tangox_wdt.c|   14 
 drivers/watchdog/w83627hf_wdt.c  |   22 
 drivers/watchdog/watchdog_core.c |4 
 drivers/watchdog/watchdog_dev.c  |  207 ++-
 drivers/watchdog/ziirave_wdt.c   |2 
 include/linux/watchdog.h |   43 +
 34 files changed, 1482 insertions(+), 354 deletions(-)

with these Changes:

commit d1ed3ba4e3d76b4ebec239c64f990c26d7935700
Author: Guenter Roeck 
Date:   Tue Mar 8 18:46:13 2016 -0800

watchdog: Ensure that wdd is not dereferenced if NULL

Smatch rightfully complains that wdd is dereferenced in the watchdog
release function after being checked for NULL. Also make sure that it
is not accessed outside mutex protection to avoid use-after-free problems.

Fixes: e6c71e84e4c0 ("watchdog: Introduce WDOG_HW_RUNNING flag")
Reported-by: Dan Carpenter 
Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit 11d7aba9ceb726d86aaaca3eb5f7d79de38989c5
Author: Guenter Roeck 
Date:   Sun Feb 28 13:12:20 2016 -0800

watchdog: imx2: Convert to use infrastructure triggered keepalives

The watchdog infrastructure now supports handling watchdog keepalive
if the watchdog is running while the watchdog device is closed.
Convert the driver to use this infrastructure.

Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit f29a72c24ad4927027e77e4eed431a61bc8335b2
Author: Guenter Roeck 
Date:   Sun Feb 28 13:12:19 2016 -0800

watchdog: dw_wdt: Convert to use watchdog infrastructure

Convert driver to use watchdog infrastructure. This includes
infrastructure support to handle watchdog keepalive if the watchdog
is running while the watchdog device is closed.

Signed-off-by: Guenter Roeck 
Tested-by: Douglas Anderson 
    Signed-off-by: Wim Van Sebroeck 

commit 15013ad813f6544be8e79afc23672745950d59bc
Author: Guenter Roeck 
Date:   Sun Feb 28 13:12:18 2016 -0800

watchdog: Add support for minimum time between heartbeats

Some watchdogs require a minimum time between heartbeats.
Examples are the watchdogs in DA9062 and AT91SAM9x.

Signed-off-by: Guenter Roeck 
    Signed-off-by: Wim Van Sebroeck 

commit d0684c8a9354953efdea214b437445c00743cf49
Author: Guenter Roeck 
Date:   Sun Feb 28 13:12:17 2016 -0800

watchdog: Make stop function optional

Not al

Re: linux-next: manual merge of the watchdog tree with the arm-soc tree

2016-03-07 Thread Wim Van Sebroeck
Hi All,

> It's much easier for us if all DTS changes go in through the arm-soc
> trees, to avoid these kind of conflicts. Is this on a branch where you
> can easily drop it and we pick it up instead, or is it on a now-stable
> branch?
> 
> 
> -Olof

I can always redo the tree once you picked it up.

Kind regards,
Wim.



Re: [PATCH v8 0/10] watchdog: Add support for keepalives triggered by infrastructure

2016-03-07 Thread Wim Van Sebroeck
Hi Guenter,

> Hi Wim,
> 
> On Sun, Mar 06, 2016 at 11:49:56AM +0100, Wim Van Sebroeck wrote:
> > Hi Guenter,
> > 
> > > The watchdog infrastructure is currently purely passive, meaning
> > > it only passes information from user space to drivers and vice versa.
> > > 
> [ ... ]
> > 
> > Patches 1 till 7 of this series has been added to linux-watchdog-next.
> > 
> Thanks a lot!

Did you receive any feedback/test-results on patches 8 till 10 ?

Kind regards,
Wim.



Re: [patch] watchdog: pnx833x_wdt: fix typo in MODULE_PARM_DESC

2016-03-06 Thread Wim Van Sebroeck
Hi all,

> On 01/08/2016 03:02 AM, Dan Carpenter wrote:
> >The module_param() is "pnx833x_wdt_timeout" and MODULE_PARM_DESC()
> >should match.
> >
> >Signed-off-by: Dan Carpenter 
> >
> >diff --git a/drivers/watchdog/pnx833x_wdt.c 
> >b/drivers/watchdog/pnx833x_wdt.c
> >index 882fdcb..69da25a 100644
> >--- a/drivers/watchdog/pnx833x_wdt.c
> >+++ b/drivers/watchdog/pnx833x_wdt.c
> >@@ -52,8 +52,9 @@ static int pnx833x_wdt_alive;
> >  /* Set default timeout in MHZ.*/
> >  static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT;
> >  module_param(pnx833x_wdt_timeout, int, 0);
> >-MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), 
> >default="
> >-__MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
> >+MODULE_PARM_DESC(pnx833x_wdt_timeout,
> >+ "Watchdog timeout in Mhz. (68Mhz clock), default="
> >+ __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds).");
> 
> The intent here was to have a module parameter named 'timeout'.
> Of course that was never the case. Wonder if anyone ever noticed.
> The correct fix would be to use something like
>   module_param_named(timeout, pnx833x_wdt_timeout, int, 0);
> but of course that would change the ABI. On the other side,
> 'timeout' is the documented module parameter in
> Documentation/watchdog/watchdog-parameters.txt, so one could argue
> that using module_param_named() would be a bug fix and not an ABI change.
> 
> Not really sure what the best approach is here. Wim, any comments ?
> Provide module_param_named() in _addition_ to the existing module_param(),
> maybe, if that is possible ?
> 

I would keep the userspace variable the same.
So keep: MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock),
and fix the internal variables...

That will give us no userspace changes and no additional fixes.

Kind regards,
Wim.



Re: [PATCH v8 0/10] watchdog: Add support for keepalives triggered by infrastructure

2016-03-06 Thread Wim Van Sebroeck
Hi Guenter,

> The watchdog infrastructure is currently purely passive, meaning
> it only passes information from user space to drivers and vice versa.
> 
> Since watchdog hardware tends to have its own quirks, this can result
> in quite complex watchdog drivers. A number of scanarios are especially 
> common.
> 
> - A watchdog is always active and can not be disabled, or can not be disabled
>   once enabled. To support such hardware, watchdog drivers have to implement
>   their own timers and use those timers to trigger watchdog keepalives while
>   the watchdog device is not or not yet opened.
> - A variant of this is the desire to enable a watchdog as soon as its driver
>   has been instantiated, to protect the system while it is still booting up,
>   but the watchdog daemon is not yet running.
> - Some watchdogs have a very short maximum timeout, in the range of just a few
>   seconds. Such low timeouts are difficult if not impossible to support from
>   user space. Drivers supporting such watchdog hardware need to implement
>   a timer function to augment heartbeats from user space.
> 
> This patch set solves the above problems while keeping changes to the
> watchdog core minimal.
> 
> - A new status flag, WDOG_HW_RUNNING, informs the watchdog subsystem that
>   a watchdog is running, and that the watchdog subsystem needs to generate
>   heartbeat requests while the associated watchdog device is closed.
> - A new parameter in the watchdog data structure, max_hw_heartbeat_ms, informs
>   the watchdog subsystem about a maximum hardware heartbeat. The watchdog
>   subsystem uses this information together with the configured timeout
>   and the maximum permitted timeout to determine if it needs to generate
>   additional heartbeat requests.
> 
> As part of this patchset, the semantics of the 'timeout' variable and of
> the WDOG_ACTIVE flag are changed slightly.
> 
> Per the current watchdog kernel API, the 'timeout' variable is supposed
> to reflect the actual hardware watchdog timeout. WDOG_ACTIVE is supposed
> to reflect if the hardware watchdog is running or not.
> 
> Unfortunately, this does not always reflect reality. In drivers which solve
> the above mentioned problems internally, 'timeout' is the watchdog timeout
> as seen from user space, and WDOG_ACTIVE reflects that user space is expected
> to send keepalive requests to the watchdog driver.
> 
> After this patch set is applied, this so far inofficial interpretation
> is the 'official' semantics for the timeout variable and the WDOG_ACTIVE
> flag. In other words, both values no longer reflect the hardware watchdog
> status, but its status as seen from user space.
> 
> Patch #1 makes the set_timeout function optional.
> 
> Patch #2 adds timer functionality to the watchdog core. It solves the problem
> of short maximum hardware heartbeats by augmenting heartbeats triggered from
> user space with internally triggered heartbeats.
> 
> Patch #3 adds functionality to generate heartbeats while the watchdog device
> is closed. It handles situation where where the watchdog is running after
> the driver has been instantiated, but the device is not yet opened,
> and post-close situations necessary if a watchdog can not be stopped.
> 
> Patch #4 makes the stop function optional.
> 
> Patch #5 adds code to ensure that the minimum time between heartbeats meets
> constraints provided by the watchdog driver.
> 
> Patch #6 to #10 are example conversions of some watchdog drivers.
> Out of those, patches #6 (dw_wdt) and #7 (imx2) have been tested.
> Patches #8 to #10 will require testing and are marked as RFT.
> 
> The patch series is also available in branch watchdog-timer of
> git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git.
> The series is curently based on top of v4.5-rc5.
> 
> The patch series was inspired by an earlier patch set from Timo Kokonnen.
> 
> v8:
> - max_hw_timeout_ms -> max_hw_heartbeat_ms
> - Rebased to v4.5-rc5
> - The patch to make the set_timeout function optional is now the first
>   patch of the series.
> - Separate code making the stop function optional into a separate patch.
> - Dropped all Acked-by: and Tested-by: tags. Even though there are no
>   functional changes, I concluded that the changes are too substantial
>   to warrant maintaining previously provided tags.
>   Note: while the patch series was rearranged, correctness was ensured
>   by implementing the max_hw_timeout_ms -> max_hw_heartbeat_ms changes
>   separately on top of the original series and comparing the results.
> v7:
> - Rebased to v4.5-rc1.
> - Moved new variables to local data structure
> - Fixed typos in documentation (hw_max_timeout_ms -> max_hw_timeout_ms).
> - Enforce that max_hw_timeout_ms must be set if the stop function is
>   not implemented by a driver.
> - Set max_hw_timeout_ms in converted drivers.
> v6:
> - Added patch #9, converting the dw_wdt driver.
> - Set last_keepalive more accurately when starting the watchdog.
> - Rebased 

Re: [PATCH v2] watchdog: tangox_wdt: test clock rate to avoid division by 0

2016-03-06 Thread Wim Van Sebroeck
Hi Wolfram,

> From: Wolfram Sang 
> 
> The clk API may return 0 on clk_get_rate, so we should check the result before
> using it as a divisor. For this, refactor the code to use a central
> error path.
> 
> Signed-off-by: Wolfram Sang 
> ---
>  drivers/watchdog/tangox_wdt.c | 14 ++
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/tangox_wdt.c b/drivers/watchdog/tangox_wdt.c
> index 709c1ed6fd79b9..cfbed7e051b619 100644
> --- a/drivers/watchdog/tangox_wdt.c
> +++ b/drivers/watchdog/tangox_wdt.c
> @@ -139,6 +139,10 @@ static int tangox_wdt_probe(struct platform_device *pdev)
>   return err;
>  
>   dev->clk_rate = clk_get_rate(dev->clk);
> + if (!dev->clk_rate) {
> + err = -EINVAL;
> + goto err;
> + }
>  
>   dev->wdt.parent = &pdev->dev;
>   dev->wdt.info = &tangox_wdt_info;
> @@ -171,10 +175,8 @@ static int tangox_wdt_probe(struct platform_device *pdev)
>   }
>  
>   err = watchdog_register_device(&dev->wdt);
> - if (err) {
> - clk_disable_unprepare(dev->clk);
> - return err;
> - }
> + if (err)
> + goto err;
>  
>   platform_set_drvdata(pdev, dev);
>  
> @@ -187,6 +189,10 @@ static int tangox_wdt_probe(struct platform_device *pdev)
>   dev_info(&pdev->dev, "SMP86xx/SMP87xx watchdog registered\n");
>  
>   return 0;
> +
> + err:
> + clk_disable_unprepare(dev->clk);
> + return err;
>  }
>  
>  static int tangox_wdt_remove(struct platform_device *pdev)
> -- 
> 2.7.0
> 

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH 5/6] watchdog: atlas7_wdt: test clock rate to avoid division by 0

2016-03-06 Thread Wim Van Sebroeck
Hi Wolfram,

> From: Wolfram Sang 
> 
> The clk API may return 0 on clk_get_rate, so we should check the result before
> using it as a divisor.
> 
> Signed-off-by: Wolfram Sang 
> ---
> 
> Should go individually via subsystem tree.
> 
>  drivers/watchdog/atlas7_wdt.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/watchdog/atlas7_wdt.c b/drivers/watchdog/atlas7_wdt.c
> index df6d9242a31958..ed80734befae16 100644
> --- a/drivers/watchdog/atlas7_wdt.c
> +++ b/drivers/watchdog/atlas7_wdt.c
> @@ -154,6 +154,11 @@ static int atlas7_wdt_probe(struct platform_device *pdev)
>   writel(0, wdt->base + ATLAS7_WDT_CNT_CTRL);
>  
>   wdt->tick_rate = clk_get_rate(clk);
> + if (!wdt->tick_rate) {
> + ret = -EINVAL;
> + goto err1;
> + }
> +
>   wdt->clk = clk;
>   atlas7_wdd.min_timeout = 1;
>   atlas7_wdd.max_timeout = UINT_MAX / wdt->tick_rate;
> -- 
> 2.7.0
> 

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [RFC PATCH] watchdog: s3c2410_wdt: Add max and min timeout values

2016-03-06 Thread Wim Van Sebroeck
Hi Javier,

> The watchdog maximum timeout value is determined by the number of bits
> for the interval timer counter, its source clock frequency, the number
> of bits of the prescaler and maximum divider value.
> 
> This can be calculated with the following equation:
> 
> max_timeout = counter / (freq / (max_prescale + 1) / max_divider)
> 
> Setting a maximum timeout value will allow the watchdog core to refuse
> user-space calls to the WDIOC_SETTIMEOUT ioctl that sets not supported
> timeout values.
> 
> For example, systemd tries to set a timeout of 10 minutes on reboot to
> ensure that the machine will be rebooted even if a reboot failed. This
> leads to the following error message on an Exynos5422 Odroid XU4 board:
> 
> [  147.986045] s3c2410-wdt 101d.watchdog: timeout 600 too big
> 
> Reported-by: Krzysztof Kozlowski 
> Signed-off-by: Javier Martinez Canillas 
> 
> ---
> Hello,
> 
> I'm sending this as an RFC because I don't have access to user manuals
> for all the Exynos SoCs that this driver supports. But at least in all
> the ones I have here, the maximum prescaler and divider values are the
> same and also all have a 16-bit interval timer counter.
> 
> So this patch assumes that all IP blocks supported by this driver are
> the same on that regard, if that's not the case then we can move these
> values on a per IP block basis using struct of_device_id .data field.
> 
> Best regards,
> Javier
> 
>  drivers/watchdog/s3c2410_wdt.c | 16 
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> index 0093450441fe..f289c9fc353a 100644
> --- a/drivers/watchdog/s3c2410_wdt.c
> +++ b/drivers/watchdog/s3c2410_wdt.c
> @@ -47,6 +47,8 @@
>  #define S3C2410_WTDAT0x04
>  #define S3C2410_WTCNT0x08
>  
> +#define S3C2410_WTCNT_MAXCNT 0x
> +
>  #define S3C2410_WTCON_RSTEN  (1 << 0)
>  #define S3C2410_WTCON_INTEN  (1 << 2)
>  #define S3C2410_WTCON_ENABLE (1 << 5)
> @@ -56,8 +58,11 @@
>  #define S3C2410_WTCON_DIV64  (2 << 3)
>  #define S3C2410_WTCON_DIV128 (3 << 3)
>  
> +#define S3C2410_WTCON_MAXDIV 0x80
> +
>  #define S3C2410_WTCON_PRESCALE(x)((x) << 8)
>  #define S3C2410_WTCON_PRESCALE_MASK  (0xff << 8)
> +#define S3C2410_WTCON_PRESCALE_MAX   0xff
>  
>  #define CONFIG_S3C2410_WATCHDOG_ATBOOT   (0)
>  #define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME (15)
> @@ -198,6 +203,14 @@ do { 
> \
>  
>  /* functions */
>  
> +static inline unsigned int s3c2410wdt_max_timeout(struct clk *clock)
> +{
> + unsigned long freq = clk_get_rate(clock);
> +
> + return S3C2410_WTCNT_MAXCNT / (freq / (S3C2410_WTCON_PRESCALE_MAX + 1)
> +/ S3C2410_WTCON_MAXDIV);
> +}
> +
>  static inline struct s3c2410_wdt *freq_to_wdt(struct notifier_block *nb)
>  {
>   return container_of(nb, struct s3c2410_wdt, freq_transition);
> @@ -567,6 +580,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
>   return ret;
>   }
>  
> + wdt->wdt_device.min_timeout = 1;
> + wdt->wdt_device.max_timeout = s3c2410wdt_max_timeout(wdt->clock);
> +
>   ret = s3c2410wdt_cpufreq_register(wdt);
>   if (ret < 0) {
>   dev_err(dev, "failed to register cpufreq\n");
> -- 
> 2.5.0
> 

This patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH v14 0/4] Watchdog: introduce ARM SBSA watchdog driver

2016-03-04 Thread Wim Van Sebroeck
Hi Fu,

> From: Fu Wei 
> 
> This patchset:
> (1)Introduce Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
> for FDT info of SBSA Generic Watchdog, and give two examples of
> adding SBSA Generic Watchdog device node into the dts files:
> foundation-v8.dts and amd-seattle-soc.dtsi.
> 
> (2)Introduce ARM SBSA watchdog driver:
> a.Use linux kernel watchdog framework;
> b.Work with FDT on ARM64;
> c.Support getting timeout from parameter and FDT at the driver
>   init stage.
> d.The driver works in two modes:
>   (1) single stage timeout (ignore WS0 interrupt)
>   (2) two stages timeout (register WS0 interrupt, do panic in routine)
> e.User can config working mode by module parameter "action".
> 
> This patchset has been tested with watchdog daemon
> (ACPI/FDT, module/build-in) on the following platforms:
> (1)ARM Foundation v8 model
> (2)AMD Seattle platform
> 
> This patchset has been tested with kdump successfully.
> 
> Changelog:
> v14:Fix a bug of registering interrupt routine: do a ping before
> registering interrupt routine, in case where is a pending interrupt.
> Reorder the initialization code to postpone registering interrupt routine.
> Improve some code style:
> (1)add some macro of string
> (2)use watchdog_get_drvdata instead of to_sbsa_gwdt,
>delete to_sbsa_gwdt.
> 
> v13:https://lkml.org/lkml/2016/2/16/713
> Fix a dev_warn message typo"signle"-->"single"
> Add MODULE_ALIAS
> Add more *ed-by in commit message.
> 
> v12:https://lkml.org/lkml/2016/2/16/154
> Fix a dev_warn message typo"fall"--"falling"
> Remove unnecessary "status" in dts
> Add more *ed-by in commit message.
> 
> v11:https://lkml.org/lkml/2016/2/9/577
> Merge patch 4 and 5.
> Improve some comments.
> The driver works in two modes, it's configured by "action"(instead of
> panic_enabled).
> Improve the initialization of the timeout limits.
> Feeding dog by writing "0" to WRR.
> 
> v10:https://lkml.org/lkml/2016/2/3/817
> Delete pretimeout support.
> Separate the driver to two parts:
> (1) single stage timeout driver(ignore WS0 interrupt);
> (2) register WS0 interrupt for the half timeout panic.
> timeout == (enable --> WS1).
> 
> v9: https://lkml.org/lkml/2015/11/9/57
> Rebase to latest kernel version(4.3).
> Update the Documentation of sbsa-gwdt device node info of FDT:
> (1) move some introduction to pretimeout patch
> (2) delete WS1 value from "interrupts" of binding documentation,
> since WS1 won't be handled by Linux.
> 
> v8: https://lkml.org/lkml/2015/10/27/466
> Rebase to latest kernel version(4.3-rc7).
> Separate the patches of GTDT support and arm_arch_timer. This
> clocksource relevant patch will upstreamed in a individual patchset.
> Update all the default timeout and pretimeout to 30s and 60s.
> Improve documentation and inline comments.
> Fix a bug in pretimeout support which makes timeout and pretimeout
> parameters initialization fail.
> 
> v7: https://lkml.org/lkml/2015/8/24/611
> Rebase to latest kernel version(4.2-rc7).
> Improve FDT support: geting resource by order, instead of name.
> According to the FDT support, Update the example dts file, gtdt.c
> and sbsa_gwdt.c.
> Pass the sparse test, and fix the warning.
> Fix the max_pretimeout and max_timeout value overflow bug.
> Delete the WCV output value.
> 
> 
> v6: https://lkml.org/lkml/2015/6/23/359
> Improve the dtb example files: reduce the register frame size to 4K.
> Improve pretimeout support:
> (1) improve watchdog_init_timeouts function
>   (2) rename watchdog_check_min_max_timeouts back to the original name
> (1) improve watchdog_timeout_invalid/watchdog_pretimeout_invalid
> Add the new features in the sbsa_gwdt driver:
>   (1) In the second stage, user can feed the dog without cleaning WS0.
>   (2) In the second stage, user can trigger WS1 by setting pretimeout = 0.
>   (3) expand the max value of pretimeout, in case 10 second is not enough
>   for a kdump kernel reboot in panic.
> 
> v5: https://lkml.org/lkml/2015/6/10/357
> Improve pretimeout support:
> (1)fix typo in documentation and comments.
>   (2)fix the timeout limits validation bug.
> Simplify sbsa_gwdt driver:
>   (1)integrate all the registers access functions into caller.
> 
> v4: https://lkml.org/lkml/2015/6/2/4
> Refactor GTDT support code: remove it from arch/arm64/kernel/acpi.c,
> put it into drivers/acpi/gtdt.c file.
> Integrate the GTDT code of drivers/clocksource/arm_arch_timer.c into
> drivers/acpi/gtdt.c.
> Improve pretimeout support, fix "pretimeout == 0" problem.
> Simplify sbsa_gwdt driver:
> (1)timeout/pretimeout limits setup;
> (2)keepalive function;
>  

Re: [PATCH v8] watchdog: Add watchdog timer support for the WinSystems EBC-C384

2016-03-04 Thread Wim Van Sebroeck
Hi William,

> The WinSystems EBC-C384 has an onboard watchdog timer. The timeout range
> supported by the watchdog timer is 1 second to 255 minutes. Timeouts
> under 256 seconds have a 1 second granularity, while the rest have a 1
> minute granularity.
> 
> This driver adds watchdog timer support for this onboard watchdog timer.
> The timeout may be configured via the timeout module parameter.
> 
> Signed-off-by: William Breathitt Gray 
> ---
> Changes in v8:
>   - Utilize the roundup macro to round up second resolution to minute
> granularity when setting the timeout member
> 
>  MAINTAINERS |   6 ++
>  drivers/watchdog/Kconfig|   9 ++
>  drivers/watchdog/Makefile   |   1 +
>  drivers/watchdog/ebc-c384_wdt.c | 188 
> 
>  4 files changed, 204 insertions(+)
>  create mode 100644 drivers/watchdog/ebc-c384_wdt.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 28eb61b..66107fd 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11860,6 +11860,12 @@ M:   David Härdeman 
>  S:   Maintained
>  F:   drivers/media/rc/winbond-cir.c
>  
> +WINSYSTEMS EBC-C384 WATCHDOG DRIVER
> +M:   William Breathitt Gray 
> +L:   linux-watch...@vger.kernel.org
> +S:   Maintained
> +F:   drivers/watchdog/ebc-c384_wdt.c
> +
>  WIMAX STACK
>  M:   Inaky Perez-Gonzalez 
>  M:   linux-wi...@intel.com
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 0f6d851..11f3a3d 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -713,6 +713,15 @@ config ALIM7101_WDT
>  
> Most people will say N.
>  
> +config EBC_C384_WDT
> + tristate "WinSystems EBC-C384 Watchdog Timer"
> + depends on X86
> + select WATCHDOG_CORE
> + help
> +   Enables watchdog timer support for the watchdog timer on the
> +   WinSystems EBC-C384 motherboard. The timeout may be configured via
> +   the timeout module parameter.
> +
>  config F71808E_WDT
>   tristate "Fintek F71808E, F71862FG, F71869, F71882FG and F71889FG 
> Watchdog"
>   depends on X86
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
> index f566753..15762c8 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -88,6 +88,7 @@ obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
>  obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o
>  obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o
>  obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o
> +obj-$(CONFIG_EBC_C384_WDT) += ebc-c384_wdt.o
>  obj-$(CONFIG_F71808E_WDT) += f71808e_wdt.o
>  obj-$(CONFIG_SP5100_TCO) += sp5100_tco.o
>  obj-$(CONFIG_GEODE_WDT) += geodewdt.o
> diff --git a/drivers/watchdog/ebc-c384_wdt.c b/drivers/watchdog/ebc-c384_wdt.c
> new file mode 100644
> index 000..77fda0b
> --- /dev/null
> +++ b/drivers/watchdog/ebc-c384_wdt.c
> @@ -0,0 +1,188 @@
> +/*
> + * Watchdog timer driver for the WinSystems EBC-C384
> + * Copyright (C) 2016 William Breathitt Gray
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License, version 2, as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * General Public License for more details.
> + */
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define MODULE_NAME  "ebc-c384_wdt"
> +#define WATCHDOG_TIMEOUT 60
> +/*
> + * The timeout value in minutes must fit in a single byte when sent to the
> + * watchdog timer; the maximum timeout possible is 15300 (255 * 60) seconds.
> + */
> +#define WATCHDOG_MAX_TIMEOUT 15300
> +#define BASE_ADDR0x564
> +#define ADDR_EXTENT  5
> +#define CFG_ADDR (BASE_ADDR + 1)
> +#define PET_ADDR (BASE_ADDR + 2)
> +
> +static bool nowayout = WATCHDOG_NOWAYOUT;
> +module_param(nowayout, bool, 0);
> +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started 
> (default="
> + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
> +
> +static unsigned timeout;
> +module_param(timeout, uint, 0);
> +MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default="
> + __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
> +
> +static int ebc_c384_wdt_start(struct watchdog_device *wdev)
> +{
> + unsigned t = wdev->timeout;
> +
> + /* resolution is in minutes for timeouts greater than 255 seconds */
> + if (t > 255)
> + t = DIV_ROUND_UP(t, 60);
> +
> + outb(t, PET_ADDR);
> +
> + return 0;
> +}
> +
> +static int ebc_c384_wdt_stop(struct watchdog_device *wdev)
> +{
> + outb(0x00, PET_ADDR);
> +
> + return 0;
> +}
> +
> +static int ebc_c384_wdt_set_timeout(struct watchdog_device *wdev, unsigned t)
> +{
> + /* resolution is in mi

Re: [PATCH] watchdog: Add 'action' and 'data' parameters to restart handler callback

2016-03-04 Thread Wim Van Sebroeck
Hi Guenter,

> The 'action' (or restart mode) and data parameters may be used by restart
> handlers, so they should be passed to the restart callback functions.
> 
> Cc: Sylvain Lemieux 
> Signed-off-by: Guenter Roeck 
> ---
>  drivers/watchdog/bcm47xx_wdt.c   | 3 ++-
>  drivers/watchdog/da9063_wdt.c| 3 ++-
>  drivers/watchdog/digicolor_wdt.c | 3 ++-
>  drivers/watchdog/imgpdc_wdt.c| 3 ++-
>  drivers/watchdog/imx2_wdt.c  | 3 ++-
>  drivers/watchdog/lpc18xx_wdt.c   | 3 ++-
>  drivers/watchdog/meson_wdt.c | 3 ++-
>  drivers/watchdog/moxart_wdt.c| 3 ++-
>  drivers/watchdog/mtk_wdt.c   | 3 ++-
>  drivers/watchdog/qcom-wdt.c  | 3 ++-
>  drivers/watchdog/s3c2410_wdt.c   | 3 ++-
>  drivers/watchdog/sunxi_wdt.c | 3 ++-
>  drivers/watchdog/watchdog_core.c | 2 +-
>  include/linux/watchdog.h | 2 +-
>  14 files changed, 26 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c
> index df1c2a4b0165..a1900b9ab6c4 100644
> --- a/drivers/watchdog/bcm47xx_wdt.c
> +++ b/drivers/watchdog/bcm47xx_wdt.c
> @@ -87,7 +87,8 @@ static int bcm47xx_wdt_hard_set_timeout(struct 
> watchdog_device *wdd,
>   return 0;
>  }
>  
> -static int bcm47xx_wdt_restart(struct watchdog_device *wdd)
> +static int bcm47xx_wdt_restart(struct watchdog_device *wdd,
> +unsigned long action, void *data)
>  {
>   struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
>  
> diff --git a/drivers/watchdog/da9063_wdt.c b/drivers/watchdog/da9063_wdt.c
> index 11e887572649..a100f648880d 100644
> --- a/drivers/watchdog/da9063_wdt.c
> +++ b/drivers/watchdog/da9063_wdt.c
> @@ -119,7 +119,8 @@ static int da9063_wdt_set_timeout(struct watchdog_device 
> *wdd,
>   return ret;
>  }
>  
> -static int da9063_wdt_restart(struct watchdog_device *wdd)
> +static int da9063_wdt_restart(struct watchdog_device *wdd, unsigned long 
> action,
> +   void *data)
>  {
>   struct da9063_watchdog *wdt = watchdog_get_drvdata(wdd);
>   int ret;
> diff --git a/drivers/watchdog/digicolor_wdt.c 
> b/drivers/watchdog/digicolor_wdt.c
> index 1ccb0b239348..77df772406b0 100644
> --- a/drivers/watchdog/digicolor_wdt.c
> +++ b/drivers/watchdog/digicolor_wdt.c
> @@ -48,7 +48,8 @@ static void dc_wdt_set(struct dc_wdt *wdt, u32 ticks)
>   spin_unlock_irqrestore(&wdt->lock, flags);
>  }
>  
> -static int dc_wdt_restart(struct watchdog_device *wdog)
> +static int dc_wdt_restart(struct watchdog_device *wdog, unsigned long action,
> +   void *data)
>  {
>   struct dc_wdt *wdt = watchdog_get_drvdata(wdog);
>  
> diff --git a/drivers/watchdog/imgpdc_wdt.c b/drivers/watchdog/imgpdc_wdt.c
> index 3679f2e1922f..516fbef00856 100644
> --- a/drivers/watchdog/imgpdc_wdt.c
> +++ b/drivers/watchdog/imgpdc_wdt.c
> @@ -150,7 +150,8 @@ static int pdc_wdt_start(struct watchdog_device *wdt_dev)
>   return 0;
>  }
>  
> -static int pdc_wdt_restart(struct watchdog_device *wdt_dev)
> +static int pdc_wdt_restart(struct watchdog_device *wdt_dev,
> +unsigned long action, void *data)
>  {
>   struct pdc_wdt_dev *wdt = watchdog_get_drvdata(wdt_dev);
>  
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 1a48cb28718f..7ae92aef4cc8 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -77,7 +77,8 @@ static const struct watchdog_info imx2_wdt_info = {
>   .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
>  };
>  
> -static int imx2_wdt_restart(struct watchdog_device *wdog)
> +static int imx2_wdt_restart(struct watchdog_device *wdog, unsigned long 
> action,
> + void *data)
>  {
>   struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
>   unsigned int wcr_enable = IMX2_WDT_WCR_WDE;
> diff --git a/drivers/watchdog/lpc18xx_wdt.c b/drivers/watchdog/lpc18xx_wdt.c
> index 6914c83aa6d9..fd171e6caa16 100644
> --- a/drivers/watchdog/lpc18xx_wdt.c
> +++ b/drivers/watchdog/lpc18xx_wdt.c
> @@ -153,7 +153,8 @@ static int lpc18xx_wdt_start(struct watchdog_device 
> *wdt_dev)
>   return 0;
>  }
>  
> -static int lpc18xx_wdt_restart(struct watchdog_device *wdt_dev)
> +static int lpc18xx_wdt_restart(struct watchdog_device *wdt_dev,
> +unsigned long action, void *data)
>  {
>   struct lpc18xx_wdt_dev *lpc18xx_wdt = watchdog_get_drvdata(wdt_dev);
>   unsigned long flags;
> diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> index aea5d2f44ad7..56ea1caf71c3 100644
> --- a/drivers/watchdog/meson_wdt.c
> +++ b/drivers/watchdog/meson_wdt.c
> @@ -62,7 +62,8 @@ struct meson_wdt_dev {
>   const struct meson_wdt_data *data;
>  };
>  
> -static int meson_wdt_restart(struct watchdog_device *wdt_dev)
> +static int meson_wdt_restart(struct watchdog_device *wdt_dev,
> +  unsigned long action, void *data)
>  {
>   struct meson_

Re: [PATCH] Rename "trigger" reset reason "hw watchdog"

2016-03-04 Thread Wim Van Sebroeck
Hi Martyn,

> The Zodiac watchdog is implemented on a microcontoller. The reset reason
> currently labelled "trigger" is not to detect when the watchdog has
> triggered (as had been initially understood and suggested by the naming),
> but to inform the reader that the watchdog, which in fact has it's own
> hardware watchdog, has been reset because the hardware watchdog has
> triggered. Renaming to "hw watchdog".
> 
> Signed-off-by: Martyn Welch 
> ---
>  drivers/watchdog/ziirave_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c
> index 0c7cb73..cbe373de 100644
> --- a/drivers/watchdog/ziirave_wdt.c
> +++ b/drivers/watchdog/ziirave_wdt.c
> @@ -36,7 +36,7 @@
>  #define ZIIRAVE_STATE_OFF0x1
>  #define ZIIRAVE_STATE_ON 0x2
>  
> -static char *ziirave_reasons[] = {"power cycle", "triggered", NULL, NULL,
> +static char *ziirave_reasons[] = {"power cycle", "hw watchdog", NULL, NULL,
> "host request", NULL, "illegal configuration",
> "illegal instruction", "illegal trap",
> "unknown"};
> -- 
> 2.1.4
> 

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH for-4.5] watchdog/rc32434_wdt: fix ioctl error handling

2016-03-04 Thread Wim Van Sebroeck
Hi Michael,

> Calling return copy_to_user(...) in an ioctl will not do the right thing
> if there's a pagefault: copy_to_user returns the number of bytes not
> copied in this case.
> 
> Fix up watchdog/rc32434_wdt to do
>   return copy_to_user(...)) ?  -EFAULT : 0;
> 
> instead.
> 
> Cc: sta...@vger.kernel.org
> Signed-off-by: Michael S. Tsirkin 
> ---
> 
> Untested.
> 
>  drivers/watchdog/rc32434_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c
> index 71e78ef..3a75f3b 100644
> --- a/drivers/watchdog/rc32434_wdt.c
> +++ b/drivers/watchdog/rc32434_wdt.c
> @@ -237,7 +237,7 @@ static long rc32434_wdt_ioctl(struct file *file, unsigned 
> int cmd,
>   return -EINVAL;
>   /* Fall through */
>   case WDIOC_GETTIMEOUT:
> - return copy_to_user(argp, &timeout, sizeof(int));
> + return copy_to_user(argp, &timeout, sizeof(int)) ? -EFAULT : 0;
>   default:
>   return -ENOTTY;
>   }
> -- 
> MST

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH] watchdog: orion: Depend on 32-bit ARM

2016-03-04 Thread Wim Van Sebroeck
Hi Thierry,

> From: Thierry Reding 
> 
> The driver uses the atomic_io_modify() function to update registers, but
> that function is only available on 32-bit ARM. Recent changes have added
> ARCH_MVEBU support to 64-bit ARM and hence allowed this driver to build
> on 64-bit ARM where this function isn't available and thereby causing
> allmodconfig builds to break.
> 
> Signed-off-by: Thierry Reding 
> ---
>  drivers/watchdog/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 9289da313d98..cfec157488b1 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -399,6 +399,7 @@ config DAVINCI_WATCHDOG
>  config ORION_WATCHDOG
>   tristate "Orion watchdog"
>   depends on ARCH_ORION5X || ARCH_DOVE || MACH_DOVE || ARCH_MVEBU
> + depends on ARM
>   select WATCHDOG_CORE
>   help
> Say Y here if to include support for the watchdog timer
> -- 
> 2.7.1
> 

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH v2] watchdog: w83627hf: Added NCT6102D support.

2016-03-04 Thread Wim Van Sebroeck
Hi Rob,

> As used in (and tested on) the ASRock IMB-150 board. Implementation is
> identical to other NCT chips, just with different registers.
> 
> Signed-off-by: Rob Kramer 
> ---
>  drivers/watchdog/Kconfig|  1 +
>  drivers/watchdog/w83627hf_wdt.c | 22 +++---
>  2 files changed, 20 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 4f0e7be..318d8bc 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1140,6 +1140,7 @@ config W83627HF_WDT
>   NCT6779
>   NCT6791
>   NCT6792
> + NCT6102D/04D/06D
>  
> This watchdog simply watches your kernel to make sure it doesn't
> freeze, and if it does, it reboots your computer after a certain
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index cab14bc..09e8003 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -45,10 +45,11 @@
>  static int wdt_io;
>  static int cr_wdt_timeout;   /* WDT timeout register */
>  static int cr_wdt_control;   /* WDT control register */
> +static int cr_wdt_csr;   /* WDT control & status register */
>  
>  enum chips { w83627hf, w83627s, w83697hf, w83697ug, w83637hf, w83627thf,
>w83687thf, w83627ehf, w83627dhg, w83627uhg, w83667hg, w83627dhg_p,
> -  w83667hg_b, nct6775, nct6776, nct6779, nct6791, nct6792 };
> +  w83667hg_b, nct6775, nct6776, nct6779, nct6791, nct6792, nct6102 };
>  
>  static int timeout;  /* in seconds */
>  module_param(timeout, int, 0);
> @@ -92,15 +93,21 @@ MODULE_PARM_DESC(early_disable, "Disable watchdog at boot 
> time (default=0)");
>  #define W83667HG_B_ID0xb3
>  #define NCT6775_ID   0xb4
>  #define NCT6776_ID   0xc3
> +#define NCT6102_ID   0xc4
>  #define NCT6779_ID   0xc5
>  #define NCT6791_ID   0xc8
>  #define NCT6792_ID   0xc9
>  
>  #define W83627HF_WDT_TIMEOUT 0xf6
>  #define W83697HF_WDT_TIMEOUT 0xf4
> +#define NCT6102D_WDT_TIMEOUT 0xf1
>  
>  #define W83627HF_WDT_CONTROL 0xf5
>  #define W83697HF_WDT_CONTROL 0xf3
> +#define NCT6102D_WDT_CONTROL 0xf0
> +
> +#define W836X7HF_WDT_CSR 0xf7
> +#define NCT6102D_WDT_CSR 0xf2
>  
>  static void superio_outb(int reg, int val)
>  {
> @@ -197,6 +204,7 @@ static int w83627hf_init(struct watchdog_device *wdog, 
> enum chips chip)
>   case nct6779:
>   case nct6791:
>   case nct6792:
> + case nct6102:
>   /*
>* These chips have a fixed WDTO# output pin (W83627UHG),
>* or support more than one WDTO# output pin.
> @@ -229,8 +237,8 @@ static int w83627hf_init(struct watchdog_device *wdog, 
> enum chips chip)
>   superio_outb(cr_wdt_control, t);
>  
>   /* reset trigger, disable keyboard & mouse turning off watchdog */
> - t = superio_inb(0xF7) & ~0xD0;
> - superio_outb(0xF7, t);
> + t = superio_inb(cr_wdt_csr) & ~0xD0;
> + superio_outb(cr_wdt_csr, t);
>  
>   superio_exit();
>  
> @@ -322,6 +330,7 @@ static int wdt_find(int addr)
>  
>   cr_wdt_timeout = W83627HF_WDT_TIMEOUT;
>   cr_wdt_control = W83627HF_WDT_CONTROL;
> + cr_wdt_csr = W836X7HF_WDT_CSR;
>  
>   ret = superio_enter();
>   if (ret)
> @@ -387,6 +396,12 @@ static int wdt_find(int addr)
>   case NCT6792_ID:
>   ret = nct6792;
>   break;
> + case NCT6102_ID:
> + ret = nct6102;
> + cr_wdt_timeout = NCT6102D_WDT_TIMEOUT;
> + cr_wdt_control = NCT6102D_WDT_CONTROL;
> + cr_wdt_csr = NCT6102D_WDT_CSR;
> + break;
>   case 0xff:
>   ret = -ENODEV;
>   break;
> @@ -422,6 +437,7 @@ static int __init wdt_init(void)
>   "NCT6779",
>   "NCT6791",
>   "NCT6792",
> + "NCT6102",
>   };
>  
>   wdt_io = 0x2e;
> -- 
> 2.6.2
> 

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH 1/3] watchdog: ts4800: add hardware dependency

2016-03-04 Thread Wim Van Sebroeck
Hi Jean,

> The Technologic Systems TS-4800 is an i.MX515 board, so its drivers
> are useless unless building a SOC_IMX51 kernel, except for build
> testing purposes.
> 
> Signed-off-by: Jean Delvare 
> Cc: Damien Riegel 
> Cc: Rob Herring 
> Cc: Guenter Roeck 
> Cc: Wim Van Sebroeck 
> ---
>  drivers/watchdog/Kconfig |1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-4.5-rc3.orig/drivers/watchdog/Kconfig   2016-02-09 
> 08:53:37.465170476 +0100
> +++ linux-4.5-rc3/drivers/watchdog/Kconfig2016-02-09 08:53:45.001221261 
> +0100
> @@ -468,6 +468,7 @@ config NUC900_WATCHDOG
>  config TS4800_WATCHDOG
>   tristate "TS-4800 Watchdog"
>   depends on HAS_IOMEM && OF
> + depends on SOC_IMX51 || COMPILE_TEST
>   select WATCHDOG_CORE
>   select MFD_SYSCON
>   help
> 
> -- 
> Jean Delvare
> SUSE L3 Support

Patch has been added to linux-watchdog-next.

Kind regards,
Wim.



Re: [PATCH v3] watchdog: Add watchdog timer support for the WinSystems EBC-C384

2016-02-28 Thread Wim Van Sebroeck
Hi Guenter,

> On 02/28/2016 06:07 AM, Wim Van Sebroeck wrote:
> >>>+static int ebc_c384_wdt_set_timeout(struct watchdog_device *wdev, 
> >>>unsigned t)
> >>>+{
> >>>+  /* resolution is in minutes for timeouts greater than 255 seconds */
> >>>+  if (t > 255) {
> >>>+  /* truncate second resolution to minute resolution */
> >>>+  t /= 60;
> >>>+  wdev->timeout = t * 60;
> >>>+
> >>>+  /* set watchdog timer for minutes */
> >>>+  outb(0x00, CFG_ADDR);
> >>
> >>If ask for 299 seconds surely I should get 300 not 240 ?
> >>(Whether to round off or round up is an interesting question for the
> >>middle range - does it go off early or late - I'd have said late but...)
> >
> >This is my preference:
> > if (t > 255)
> > t = (((t - 1) / 60) + 1) * 60;
> >
> 
> In case I am missing something: Why not just use DIV_ROUND_UP() ?

That's indeed also usable (from kernel.h: #define DIV_ROUND_UP(n,d) (((n) + (d) 
-1) / (d)) which is the same) and indeed preferable.

Kind regards,
Wim.



Re: [PATCH v3] watchdog: Add watchdog timer support for the WinSystems EBC-C384

2016-02-28 Thread Wim Van Sebroeck
> > +static int ebc_c384_wdt_set_timeout(struct watchdog_device *wdev, unsigned 
> > t)
> > +{
> > +   /* resolution is in minutes for timeouts greater than 255 seconds */
> > +   if (t > 255) {
> > +   /* truncate second resolution to minute resolution */
> > +   t /= 60;
> > +   wdev->timeout = t * 60;
> > +
> > +   /* set watchdog timer for minutes */
> > +   outb(0x00, CFG_ADDR);
> 
> If ask for 299 seconds surely I should get 300 not 240 ?
> (Whether to round off or round up is an interesting question for the
> middle range - does it go off early or late - I'd have said late but...)

This is my preference:
if (t > 255)
t = (((t - 1) / 60) + 1) * 60;

Which basically is a round-up to minutes
t = 256 -> gives 300
t = 299 -> gives 300 
t = 300 -> gives 300
t = 301 -> gives 360
t = 15299 -> gives 15300
t = 15300 -> gives 15300
t = 15301 -> gives 15360

So I am also for going late.

Kind regards,
Wim.



Re: [PATCH v7 1/9] watchdog: Introduce hardware maximum timeout in watchdog core

2016-02-28 Thread Wim Van Sebroeck
Hi Guenter,

Code is OK, but I still have one last remark:
When I coded the generic watchdog framework, I used the following terminology:
* timeout for userspace timeout's
* heartbeat for the internal hardware timeout.
I would like us to stick to this, so that the story keeps being clear and 
consistent.

So the hardware maximum timeout where you talk about is actually
a maximum heartbeat value. Can you change this in v8?
And then directly fold the drop of the 'cancel' parameter in the same patch?

I also like to have "Make set_timeout function optional" as the first patch of 
the series.
This patch can be used even without the other patches.

I also like the WDOG_HW_RUNNING flag. But I would split the patch that adds 
this into 2 patches:
* a patch that adds the WDOG_HW_RUNNING flag
* and a patch that makes the stop function optional.

Thanks in advance,
Wim.

> From: Guenter Roeck 
> 
> Introduce an optional hardware maximum timeout in the watchdog core.
> The hardware maximum timeout can be lower than the maximum timeout.
> 
> Drivers can set the maximum hardware timeout value in the watchdog data
> structure. If the configured timeout exceeds the maximum hardware timeout,
> the watchdog core enables a timer function to assist sending keepalive
> requests to the watchdog driver.
> 
> Signed-off-by: Guenter Roeck 
> ---
> v7:
> - Rebased to v4.5-rc1
> - Moved new variables to local data structure
> - Dropped Uwe's Acked-by: due to substantial changes
> v6:
> - Set last_keepalive more accurately when starting the watchdog
> - Rebased to v4.4-rc2
> - Added Uwe's Acked-by:
> v5:
> - Rebased to v4.4-rc1
> v4:
> - Improved and fixed documentation
> - Split hw_timeout_ms variable to timeout_ms, hw_timeout_ms for clarity
> - Dropped redundant comments
> - Added comments explaining failure conditions in watchdog_timeout_invalid().
> - Moved the call to watchdog_update_worker() into _watchdog_ping().
> v3:
> - Reworked and cleaned up some of the functions.
> - No longer call the worker update function if all that is needed is to stop
>   the worker.
> - max_timeout will now be ignored if max_hw_timeout_ms is provided.
> v2:
> - Improved and hopefully clarified documentation.
> - Rearranged variables in struct watchdog_device such that internal variables
>   come last.
> - The code now ensures that the watchdog times out  seconds after
>   the most recent keepalive sent from user space.
> - The internal keepalive now stops silently and no longer generates a
>   warning message. Reason is that it will now stop early, while there
>   may still be a substantial amount of time for keepalives from user space
>   to arrive. If such keepalives arrive late (for example if user space
>   is configured to send keepalives just a few seconds before the watchdog
>   times out), the message would just be noise and not provide any value.
> ---
>  Documentation/watchdog/watchdog-kernel-api.txt |  19 +++-
>  drivers/watchdog/watchdog_dev.c| 136 
> +++--
>  include/linux/watchdog.h   |  28 +++--
>  3 files changed, 164 insertions(+), 19 deletions(-)
> 
> diff --git a/Documentation/watchdog/watchdog-kernel-api.txt 
> b/Documentation/watchdog/watchdog-kernel-api.txt
> index 55120a055a14..46979568b9e5 100644
> --- a/Documentation/watchdog/watchdog-kernel-api.txt
> +++ b/Documentation/watchdog/watchdog-kernel-api.txt
> @@ -52,6 +52,7 @@ struct watchdog_device {
>   unsigned int timeout;
>   unsigned int min_timeout;
>   unsigned int max_timeout;
> + unsigned int max_hw_timeout_ms;
>   struct notifier_block reboot_nb;
>   struct notifier_block restart_nb;
>   void *driver_data;
> @@ -73,8 +74,18 @@ It contains following fields:
>additional information about the watchdog timer itself. (Like it's unique 
> name)
>  * ops: a pointer to the list of watchdog operations that the watchdog 
> supports.
>  * timeout: the watchdog timer's timeout value (in seconds).
> +  This is the time after which the system will reboot if user space does
> +  not send a heartbeat request if WDOG_ACTIVE is set.
>  * min_timeout: the watchdog timer's minimum timeout value (in seconds).
> -* max_timeout: the watchdog timer's maximum timeout value (in seconds).
> +  If set, the minimum configurable value for 'timeout'.
> +* max_timeout: the watchdog timer's maximum timeout value (in seconds),
> +  as seen from userspace. If set, the maximum configurable value for
> +  'timeout'. Not used if max_hw_timeout_ms is non-zero.
> +* max_hw_timeout_ms: Maximum hardware timeout, in milli-seconds.
> +  If set, the infrastructure will send heartbeats to the watchdog driver
> +  if 'timeout' is larger than max_hw_timeout_ms, unless WDOG_ACTIVE
> +  is set and userspace failed to send a heartbeat for at least 'timeout'
> +  seconds.
>  * reboot_nb: notifier block that is registered for reboot notifications, for
>internal use only. If the driver calls watchdog_stop_on_reboot, watchdog 
>

[GIT PULL REQUEST] watchdog - v4.5-rc Fixes

2016-02-04 Thread Wim Van Sebroeck
Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

It will fix several Kconfig dependencies, a compilation warning in pcwd_usb,
a failure to abort the sp805 wdt after a ping and the max63xx wdt's 
MODULE_LICENSE.

This will update the following files:

 Kconfig   |6 +-
 max63xx_wdt.c |2 +-
 pcwd_usb.c|3 +--
 sp805_wdt.c   |5 ++---
 4 files changed, 9 insertions(+), 7 deletions(-)

with these Changes:

commit d42d6108711b142804b4710d4215efbf5f9b6e21
Author: Richard Weinberger 
Date:   Mon Jan 25 23:24:14 2016 +0100

watchdog: Fix dependencies for !HAS_IOMEM archs

Not every arch has io memory.
So, unbreak the build by fixing the dependencies.

Signed-off-by: Richard Weinberger 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit df1a3e64f79b3e277a22b2e789896f86c63eec1f
Author: Arnd Bergmann 
Date:   Mon Jan 25 17:06:27 2016 +0100

watchdog: imgdpc: select WATCHDOG_CORE

The imgpdc_wdt driver can be built on all architectures with
CONFIG_COMPILE_TEST, but fails if no other watchdog driver is
enabled:

drivers/watchdog/built-in.o: In function `pdc_wdt_remove':
imgpdc_wdt.c:(.text+0x74): undefined reference to 
`watchdog_unregister_device'

This adds the normal 'select WATCHDOG_CORE' that is needed to
ensure the driver always builds cleanly.

Signed-off-by: Arnd Bergmann 
Reviewed-by: James Hogan 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit c75f6c5ac0877e8d9728f680aa324e9adeff91e1
Author: Marc Gonzalez 
Date:   Thu Jan 21 15:27:07 2016 +0100

watchdog: tango: rename ARCH_TANGOX to ARCH_TANGO

This change was requested by arm-soc maintainer Kevin Hilman
because the X in TANGOX is a wildcard.

Signed-off-by: Marc Gonzalez 
Acked-by: Mans Rullgard 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 99f08ca84156f08b8545f7a5bfedfdd2452c4556
Author: Tomas Winkler 
Date:   Tue Jan 19 15:51:04 2016 +0200

watchdog: pcwd_usb: fix compilation warning

In function ‘usb_pcwd_probe’:
drivers/watchdog/pcwd_usb.c:611:12: warning: variable ‘maxp’ set but not
used [-Wunused-but-set-variable]
  int pipe, maxp;

Signed-off-by: Tomas Winkler 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 55e071779c79890f43b75d4472243280e91581de
Author: Sandeep Tripathy 
Date:   Tue Jan 19 14:44:49 2016 +0530

watchdog: sp805: ping fails to abort wdt reset

sp805 wdt asserts interrupt for the first expiry and
reloads the counter. If wdt interrupt is set and count
reaches zero then wdt reset event is generated. To get
wdt reset at 't' timeout the driver loads wdt counter
with 't/2'. A ping before time 't'  *should* prevent
wdt reset. Currently if ping is done after 't/2' then
wdt interrupt condition gets set. On the next countdown
of loadval wdt reset event occurs eventhough wdt was
reloaded before the set timeout 't'.

This patch clears the interrupt condition on ping.

Signed-off-by: Sandeep Tripathy 
    Acked-by: Viresh Kumar 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

commit 29efefb9091dc7b58a2ac9d054c92295101e6bb2
Author: Uwe Kleine-König 
Date:   Fri Jan 15 18:35:34 2016 +0100

watchdog: max63xx: make module's license marker match the header

The header specifies GPL version 2 only, so make the MODULE_LICENSE
string use the respective string for that.

    Signed-off-by: Uwe Kleine-König 
Signed-off-by: Guenter Roeck 
Signed-off-by: Wim Van Sebroeck 

For completeness, I added the overal diff below.

Greetings,
Wim.


diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 4f0e7be..0f6d851 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -145,7 +145,8 @@ config MENF21BMC_WATCHDOG
 config TANGOX_WATCHDOG
tristate "Sigma Designs SMP86xx/SMP87xx watchdog"
select WATCHDOG_CORE
-   depends on ARCH_TANGOX || COMPILE_TEST
+   depends on ARCH_TANGO || COMPILE_TEST
+   depends on HAS_IOMEM
help
  Support for the watchdog in Sigma Designs SMP86xx (tango3)
  and SMP87xx (tango4) family chips.
@@ -618,6 +619,7 @@ config DIGICOLOR_WATCHDOG
 config LPC18XX_WATCHDOG
tristate "LPC18xx/43xx Watchdog"
depends on ARCH_LPC18XX || COMPILE_TEST
+   depends on HAS_IOMEM
select WATCHDOG_CORE
help
  Say Y here if to include support for the watchdog timer
@@ -1374,6 +1376,7 @@ config BCM_KONA_WDT_DEBUG
 config BCM7038_WDT
tristate "BCM7038 Watchdog"
select WATCHDOG

Re: [PATCH v2 0/6] watchdog: Replace driver based refcounting

2015-12-29 Thread Wim Van Sebroeck
Hi Guenter,

> All variables required by the watchdog core to manage a watchdog are
> currently stored in struct watchdog_device. The lifetime of those
> variables is determined by the watchdog driver. However, the lifetime
> of variables used by the watchdog core differs from the lifetime of
> struct watchdog_device. To remedy this situation, watchdog drivers
> can implement ref and unref callbacks, to be used by the watchdog
> core to lock struct watchdog_device in memory. This mechanism was
> introduced with commit e907df327252 ("watchdog: Add support for
> dynamically allocated watchdog_device structs").
> 
> While this solves the immediate problem, it depends on watchdog drivers
> to actually implement the ref/unref callbacks. This is error prone,
> often not implemented in the first place, or not implemented correctly.
> 
> To solve the problem without requiring driver support, split the variables
> in struct watchdog_device into two data structures - one for variables
> associated with the watchdog driver, one for variables associated with
> the watchdog core. With this approach, the watchdog core can keep track
> of the variables it uses and no longer depends on ref/unref callbacks
> in the driver. As a side effect, some of the variables originally in struct
> watchdog_driver are now private to the watchdog core and no longer visible
> in watchdog drivers.
> 
> The 'ref' and 'unref' callbacks in struct watchdog_driver are no longer
> used and marked as deprecated for the time being.
> 
> Patch 1/6 moves watchdog device creation from watchdog_core.c to
> watchdog_dev.c to simplify watchdog device handling.
> 
> Patch 2/6 modifies the diag288 watchdog to no longer use and overload
> watchdog core internal flags.
> 
> Patch 3/6 separates variables in watchdog_device based on variable
> lifetime.
> 
> Patch 4/6 to 6/6 remove existing ref/unref functions from the drivers
> implementing it. Two of those patches (for da9052 and da9055) fix a
> previously introduced bug as side effect.
> 
> The series applies on top of the current watchdog-next as well as the
> pending patches introducing sysfs support ("watchdog: Use static struct
> class watchdog_class in stead of pointer" and "watchdog: Read device
> status through sysfs attributes") by Pratyush Anand.
> 
> ---
> v2: Add patch 2/6.
> Add more detailed description to patch 3/6.
> Rename internal data structure to watchdog_core_data, and the variable
> pointing to it to wd_data. Move its declaration into watchdog_dev.c.
> Reorder include files in watchdog_dev.c to alphabetic order.
> Remove _watchdog_ping helper function and call watchdog_ping()
> directly. Handle locks in the calling code.
> Drop locking from watchdog_open(). It is already protected against
> parallel device removal in the driver core code, and file access
> functions won't be called before the function returns.
> Remove previously added message "watchdog still running". It wasn't
> there before, and we should avoid user visible changes.
> Add missing kfree() to the sch56xx patch.
> Add comments to da9052 and da9055 patches indicating that the
> patches fix a bug.

This patchset has been added to linux-watchdog-next.

Kind regards,
Wim.

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


Re: [PATCH] MAINTAINERS: Add Guenter Roeck as reviewer of watchdog drivers

2015-12-28 Thread Wim Van Sebroeck
Hi Guenter,

> I have been reviewing watchdog drivers for years, so we might
> as well make it official.
> 
> Signed-off-by: Guenter Roeck 
> ---
>  MAINTAINERS | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index cba790b42f23..b1e3da7dc393 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11602,6 +11602,7 @@ F:drivers/input/tablet/wacom_serial4.c
>  
>  WATCHDOG DEVICE DRIVERS
>  M:   Wim Van Sebroeck 
> +R:   Guenter Roeck 
>  L:   linux-watch...@vger.kernel.org
>  W:   http://www.linux-watchdog.org/
>  T:   git git://www.linux-watchdog.org/linux-watchdog.git
> -- 
> 2.1.4
> 

I think I forgot to tell you that this patch was added in linux-watchdog-next,
but I am sure you allready saw it :-).

Kind regards,
Wim.

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


Re: [PATCH v2 0/5] watchdog: Do not use 'dev' from watchdog_device in watchdog drivers

2015-12-28 Thread Wim Van Sebroeck
Hi Guenter,

> The 'dev' variable in watchdog drivers has a different lifetime than the
> watchdog character device and should therefore not be used by watchdog
> drivers.
> 
> Some of the drivers use the variable to print kernel messages. Those
> messages are either dropped or changed to use the parent device.
> One driver sets the variable during initialization to the watchdog
> driver's parent device, which is wrong and was removed.
> 
> v2: Use parent device for dev_XXX messages instead of pr_XXX.

This patchset has been added to linux-watchdog-next.

Kind regards,
Wim.

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


  1   2   3   4   5   >