aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-07-08watchdog: bcm_kona_wdt: no need to check return value of debugfs_create ↵Greg Kroah-Hartman1-10/+4
functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Wim Van Sebroeck <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Ray Jui <[email protected]> Cc: Scott Branden <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08docs: watchdog: Fix build error.Jerry Hoemann1-0/+2
make htmldocs fails due to missing blank line following header. Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08docs: watchdog: convert docs to ReST and rename to *.rstMauro Carvalho Chehab16-561/+1013
Convert those documents and prepare them to be part of the kernel API book, as most of the stuff there are related to the Kernel interfaces. Still, in the future, it would make sense to split the docs, as some of the stuff is clearly focused on sysadmin tasks. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: make the device time out at open_deadline when open_timeout is usedRasmus Villemoes1-5/+6
When the watchdog device is not open by userspace, the kernel takes care of pinging it. When the open_timeout feature is in use, we should ensure that the hardware fires close to open_timeout seconds after the kernel has assumed responsibility for the device. To do this, simply reuse the logic that is already in place for ensuring the same thing when userspace is responsible for regularly pinging the device: - When watchdog_active(wdd), this patch doesn't change anything. - When !watchdog_active(wdd), the "virtual timeout" should be taken to be ->open_deadline". When the open_timeout feature is not used or the device has been opened at least once, ->open_deadline is KTIME_MAX, and the arithmetic ends up returning keepalive_interval as we used to. This has been tested on a Wandboard with various combinations of open_timeout and timeout-sec properties for the on-board watchdog by booting with 'init=/bin/sh', timestamping the lines on the serial console, and comparing the timestamp of the 'imx2-wdt 20bc000.wdog: timeout nnn sec' line with the timestamp of the 'U-Boot SPL ...' line (which appears just after reset). Suggested-by: Guenter Roeck <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: introduce CONFIG_WATCHDOG_OPEN_TIMEOUTRasmus Villemoes3-6/+16
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: introduce watchdog.open_timeout commandline parameterRasmus Villemoes2-1/+43
The watchdog framework takes care of feeding a hardware watchdog until userspace opens /dev/watchdogN. If that never happens for some reason (buggy init script, corrupt root filesystem or whatnot) but the kernel itself is fine, the machine stays up indefinitely. This patch allows setting an upper limit for how long the kernel will take care of the watchdog, thus ensuring that the watchdog will eventually reset the machine. A value of 0 (the default) means infinite timeout, preserving the current behaviour. This is particularly useful for embedded devices where some fallback logic is implemented in the bootloader (e.g., use a different root partition, boot from network, ...). There is already handle_boot_enabled serving a similar purpose. However, such a binary choice is unsuitable if the hardware watchdog cannot be programmed by the bootloader to provide a timeout long enough for userspace to get up and running. Many of the embedded devices we see use external (gpio-triggered) watchdogs with a fixed timeout of the order of 1-2 seconds. The open timeout only applies for the first open from userspace. Should userspace need to close the watchdog device, with the intention of re-opening it shortly, the application can emulate the open timeout feature by combining the nowayout feature with an appropriate WDIOC_SETTIMEOUT immediately prior to closing the device. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08dt-bindings: watchdog: move i.MX system controller watchdog binding to SCUAnson Huang2-24/+15
i.MX system controller watchdog depends on SCU driver to support interrupt function, so it needs to be subnode of SCU node in DT, binding doc should be moved to fsl,scu.txt as well. Signed-off-by: Anson Huang <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: imx_sc: Add pretimeout supportAnson Huang2-20/+106
i.MX system controller watchdog can support pretimeout IRQ via general SCU MU IRQ, it depends on IMX_SCU and driver MUST be probed after SCU IPC ready, then enable corresponding SCU IRQ group and register SCU IRQ notifier, when watchdog pretimeout IRQ fires, SCU MU IRQ will be handled and watchdog pretimeout notifier will be called to handle the event. Signed-off-by: Anson Huang <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: renesas_wdt: Add a few cycles delayYoshihiro Shimoda1-0/+14
According to the hardware manual of R-Car Gen2 and Gen3, software should wait a few RLCK cycles as following: - Delay 2 cycles before setting watchdog counter. - Delay 3 cycles before disabling module clock. So, this patch adds such delays. Signed-off-by: Yoshihiro Shimoda <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: gpio: add support for nowayout optionMans Rullgard1-0/+7
Add support for the nowayout option in the gpio watchdog driver. Signed-off-by: Mans Rullgard <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedlyHoan Nguyen An1-10/+11
Add helper variable dev = &pdev->dev Signed-off-by: Hoan Nguyen An <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08dt-bindings: watchdog: add Allwinner H6 watchdogClément Péron1-0/+1
Allwinner H6 has a similar watchdog as the A64 which is already a compatible of the A31. This commit add the H6 compatible. Signed-off-by: Clément Péron <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: jz4740: Avoid starting watchdog in set_timeoutPaul Cercueil1-1/+13
Previously the jz4740_wdt_set_timeout() function was starting the timer unconditionally, even if it was stopped when that function was entered. Now, the timer will be restarted only if it was already running before this function is called. Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: jz4740: Use register names from <linux/mfd/ingenic-tcu.h>Paul Cercueil1-23/+16
Use the macros from <linux/mfd/ingenic-tcu.h> instead of declaring our own. Signed-off-by: Paul Cercueil <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog/hpwdt: Reflect changesJerry Hoemann1-1/+1
Bump driver number to reflect recent changes. Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog/hpwdt: Update documentationJerry Hoemann1-0/+4
Update documentation to explain new module parameter kdumptimeout. Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog/hpwdt: Add module parameter kdumptimeout.Jerry Hoemann1-3/+24
Instead of unconditionally stopping the watchdog timer after receipt of a pretimeout NMI, reprogram the timeout based upon module parameter kdumptimeout. The provides a more flexible override than the depricated allow_kdump. Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog/hpwdt: Have core ping watchdog.Jerry Hoemann1-2/+10
Instead of stopping the hw timer during probe, have the core update the timer if the timer is already running. Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog/hpwdt: Advertize max_hw_heartbeat_msJerry Hoemann1-5/+5
Set max_hw_heartbeat_ms instead of max_timeout so that user client can set timeout range in excess of what the underlying hardware supports. Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog/hpwdt: Stop hpwdt on unregister.Jerry Hoemann1-3/+1
Have the WD core stop the watchdog on unregister instead of explicitly calling hpwdt_stop() in hpwdt_exit(). Signed-off-by: Jerry Hoemann <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: bcm2835_wdt: Fix module autoloadStefan Wahren1-0/+1
The commit 5e6acc3e678e ("bcm2835-pm: Move bcm2835-watchdog's DT probe to an MFD.") broke module autoloading on Raspberry Pi. So add a module alias this fix this. Signed-off-by: Stefan Wahren <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: sama5d4: fix WDD value to be always set to maxEugen Hristev1-3/+1
WDD value must be always set to max (0xFFF) otherwise the hardware block will reset the board on the first ping of the watchdog. Signed-off-by: Eugen Hristev <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: xen_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: wm831x_wdt: drop warning after registering deviceWolfram Sang1-8/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: ts4800_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: tegra_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: stmp3xxx_rtc_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: stm32_iwdg: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: st_lpc_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: sprd_wdt: drop warning after registering deviceWolfram Sang1-1/+0
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: sp805_wdt: drop warning after registering deviceWolfram Sang1-4/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: sp5100_tco: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: sama5d4_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: s3c2410_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: rave-sp-wdt: drop warning after registering deviceWolfram Sang1-1/+0
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: qcom-wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: pnx4008_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: pic32-wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: pic32-dmt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: of_xilinx_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: npcm_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: nic7018_wdt: drop warning after registering deviceWolfram Sang1-1/+0
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: ni903x_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: mpc8xxx_wdt: drop warning after registering deviceWolfram Sang1-4/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: menf21bmc_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: mena21_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: mei_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: max77620_wdt: drop warning after registering deviceWolfram Sang1-7/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: loongson1_wdt: drop warning after registering deviceWolfram Sang1-3/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2019-07-08watchdog: jz4740_wdt: drop warning after registering deviceWolfram Sang1-5/+1
The core will print out details now. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>