18 Apr, 2019
11 commits
-
The default watchdog action is partition reset now, so no need kernel
to take care. Besides, scfw full test case may set other watchdog
action but kernel may set it back later to default partition reset
which scfw wouldn't expect, so avoid touching watchdog action.
Please modify scfw code in case changing watchdog action to board
reset.Signed-off-by: Robin Gong
Reviewed-by: Anson Huang
(cherry picked from commit d9189e251995cc91efcac62a8d1c59ff32cdb8dc)
(cherry picked from commit 13445b41c617042b309fb4cc5159a6d6ab9182fe) -
Change to partiton reset instead of board reset since SCFW is ready
now.Signed-off-by: Robin Gong
(cherry picked from commit 2a3fe06f582c85be1669a9231da5a8c51d2a37fe) -
Align timeout value with imx2_wdt.
Signed-off-by: Robin Gong
(cherry picked from commit 6417e1a8039a16f7b1a76ea250237567ee3a72f5) -
Since watchdog on i.mx8 is a software watchdog in scfw side, it should be
stopped while kernel enter system suspend if watchdog fired. Otherwise,
unexpected watchdog reset will happen. Restore back if watchdog fired too.Signed-off-by: Robin Gong
Reviewed-by: Anson Huang
(cherry picked from commit b77f789b470b61ab95a8c9fd0a01cebe1e342141) -
Add pre_timeout set and notification for i.mx8qm/qxp.
BuildInfo:
- SCFW 36ff24f3, IMX-MKIMAGE 05d3d4a7, ATF 93dd1cc
- U-Boot 2017.03-00684-g28c5243Signed-off-by: Robin Gong
Reviewed-by: Anson Huang
(cherry picked from commit 28367d5317e0132483d93656731ab4b8ebf5a99a) -
This watchdog driver is a virtual driver in Linux and call ATF interface
where call SCFW eventually. In SCFW, it's done by SCU timer tick instead
of hardware watchdog.This is why we have to call ATF because such system
resource owned by secure patition.Currently, booard reset happen if not
ping this software watchdog in time in linux side, may change to partition
reboot once SCFW support this feature in the future.
BuildInfo:
- SCFW 93c142a9, IMX-MKIMAGE 2522fd70, ATF f2547fb
- U-Boot 2017.03-00097-gd7599cfSigned-off-by: Robin Gong
Reviewed-by: Anson Huang
(cherry picked from commit 3582decf35940566ed5eb43393c422315931f183) -
If explicit reset fails fallback using the watchdog timeout. We
already have set the timeout counter to 0, but we might need to ping
the watchdog to load the new timeout, if a previous watchdog timeout
value has already been set.We also decrease the time we spend waiting, to give a chance to log
that the explicit reset failed and that we fallback to watchdog
timeout reset.Signed-off-by: Octavian Purdila
Signed-off-by: Arulpandiyan Vadivel -
For i.MX7ULP wdog, when we want to unlock the wdog with 16bit unlock command,
the two unlock command sequence must be write to WDOG_CNT register within 16 bus
clocks, otherwise, system may be reset unexpected. As writel include memory barrier,
if we use writel to send the unlock command, it may take more time than 16 bus clock,
so we should use writel_relaxed to write the unlock command to the CNT register.Signed-off-by: Bai Ping
Signed-off-by: Arulpandiyan Vadivel -
Add system reboot for i.MX7ULP. As there is no other way to reboot the
system, so use wdog restart handler to trigger the system reboot.Signed-off-by: Bai Ping
Arul: Fix for 4.19 kernel.
Signed-off-by: Arulpandiyan Vadivel -
When resuming from VLLS mode, the wdog will be reset, the first we configure
the wdog, an initial timeout value should be write into the TOVAL register,
otherwise, the wdog will not be initialized successfully.Signed-off-by: Bai Ping
Signed-off-by: Arulpandiyan Vadivel -
Add watchdog driver for i.MX7ULP.
Signed-off-by: Bai Ping
Signed-off-by: Arulpandiyan Vadivel
27 Feb, 2019
1 commit
-
[ Upstream commit 3aa8b8bbc142eeaac89891de584535ceb7fce405 ]
These files need
#include
to compile correctly.Fixes: ac3167257b9f ("headers: separate linux/mod_devicetable.h from linux/platform_device.h")
Signed-off-by: NeilBrown
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
Signed-off-by: Sasha Levin
13 Feb, 2019
1 commit
-
[ Upstream commit e990e12741877e9bfac402ca468f4007a75f6e2a ]
The datasheet says we must stop the timer before changing the clock
divider. This can happen when the restart handler is called while the
watchdog is running.Signed-off-by: Wolfram Sang
Reviewed-by: Fabrizio Castro
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
Signed-off-by: Sasha Levin
23 Aug, 2018
1 commit
-
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
recently exposed a brittle part of the build for supporting non-gcc
compilers.Both Clang and ICC define __GNUC__, __GNUC_MINOR__, and
__GNUC_PATCHLEVEL__ for quick compatibility with code bases that haven't
added compiler specific checks for __clang__ or __INTEL_COMPILER.This is brittle, as they happened to get compatibility by posing as a
certain version of GCC. This broke when upgrading the minimal version
of GCC required to build the kernel, to a version above what ICC and
Clang claim to be.Rather than always including compiler-gcc.h then undefining or
redefining macros in compiler-intel.h or compiler-clang.h, let's
separate out the compiler specific macro definitions into mutually
exclusive headers, do more proper compiler detection, and keep shared
definitions in compiler_types.h.Fixes: cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
Reported-by: Masahiro Yamada
Suggested-by: Eli Friedman
Suggested-by: Joe Perches
Signed-off-by: Nick Desaulniers
Signed-off-by: Linus Torvalds
19 Aug, 2018
1 commit
-
Pull watchdog updates from Wim Van Sebroeck:
- add MEN 16z069 IP-Core driver
- renesas-wdt: add support for the R8A77990 wdt
- stm32_iwdg: Add stm32mp1 support and pclk feature
- sp805_wdt, orion_wdt, sprd_wdt: several improvements
- imx2_wdt, stmp3xxx: switch to SPDX identifier
* tag 'linux-watchdog-4.19-rc1' of git://www.linux-watchdog.org/linux-watchdog:
watchdog: fix dependencies of menz69_wdt.o
watchdog: sp805: Add clock-frequency property
watchdog: add driver for the MEN 16z069 IP-Core
watchdog: sprd_wdt: Remove redundant dev_err call in sprd_wdt_probe()
watchdog: stmp3xxx: Switch to SPDX identifier
watchdog: imx2_wdt: Switch to SPDX identifier
watchdog: sp805: set WDOG_HW_RUNNING when appropriate
watchdog: sp805: add 'timeout-sec' DT property support
dt-bindings: watchdog: Add optional 'timeout-sec' property for sp805
dt-bindings: watchdog: Consolidate SP805 binding docs
watchdog: orion_wdt: Mark watchdog as active when running at probe
watchdog: stm32: add pclk feature for stm32mp1
dt-bindings: watchdog: add stm32mp1 support
dt-bindings: watchdog: renesas-wdt: Add support for the R8A77990 wdt
06 Aug, 2018
2 commits
-
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
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Use clock-frequency property given in _DSD object
of ACPI device to calculate Watchdog rate as binding
clock devices are not available as device tree.Note: There is no formal review process for _DSD
propertiesSigned-off-by: Srinath Mannam
Reviewed-by: Guenter Roeck
Reviewed-by: Ray Jui
Reviewed-by: Scott Branden
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
02 Aug, 2018
8 commits
-
Add a driver for the MEN 16z069 Watchdog and Reset Controller IP-Core.
Signed-off-by: Johannes Thumshirn
Reviewed-by: Michael Moese
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
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 -
Adopt the SPDX license identifier headers to ease license compliance
management.Signed-off-by: Fabio Estevam
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Adopt the SPDX license identifier headers to ease license compliance
management.Signed-off-by: Fabio Estevam
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
If the watchdog hardware is already enabled during the boot process,
when the Linux watchdog driver loads, it should reset the watchdog and
tell the watchdog framework. As a result, ping can be generated from
the watchdog framework, until the userspace watchdog daemon takes over
controlSigned-off-by: Ray Jui
Reviewed-by: Vladimir Olovyannikov
Reviewed-by: Scott Branden
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Add support for optional devicetree property 'timeout-sec'.
'timeout-sec' is used in the driver if specified in devicetree.
Otherwise, fall back to driver default, i.e., 60 secondsSigned-off-by: Ray Jui
Reviewed-by: Scott Branden
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
If the watchdog is fully enabled and running at probe,
mark it as such so the watchdog core can handle it until
the watchdog device is opened.Signed-off-by: Maxim Kochetkov
Reviewed-by: Guenter Roeck
[groeck: Updated subject and description]
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
This patch adds compatible data to manage pclk clock by
compatible. Adds stm32mp1 support which requires pclk clock.Signed-off-by: Ludovic Barre
Acked-by: Alexandre TORGUE
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
07 Jul, 2018
1 commit
-
At over 4000 #includes, is the 9th most
#included header file in the Linux kernel. It does not need
, so drop that header and explicitly add
to source files that need it.4146 #include
After this patch, there are 225 files that use ,
for a reduction of around 3900 times that
does not have to be read & parsed.225 #include
This patch was build-tested on 20 different arch-es.
It also makes these drivers SubmitChecklist#1 compliant.
Signed-off-by: Randy Dunlap
Reported-by: kbuild test robot # drivers/media/platform/vimc/
Reported-by: kbuild test robot # drivers/pinctrl/pinctrl-u300.c
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2018
1 commit
-
Pull MIPS updates from James Hogan:
"These are the main MIPS changes for 4.18.Rough overview:
- MAINTAINERS: Add Paul Burton as MIPS co-maintainer
- Misc: Generic compiler intrinsics, Y2038 improvements, Perf+MT fixes
- Platform support: Netgear WNR1000 V3, Microsemi Ocelot integrated
switch, Ingenic watchdog cleanupsMore detailed summary:
Maintainers:
- Add Paul Burton as MIPS co-maintainer, as I soon won't have access
to much MIPS hardware, nor enough time to properly maintain MIPS on
my own.Miscellaneous:
- Use generic GCC library routines from lib/
- Add notrace to generic ucmpdi2 implementation
- Rename compiler intrinsic selects to GENERIC_LIB_*
- vmlinuz: Use generic ashldi3- y2038: Convert update/read_persistent_clock() to *_clock64()
- sni: Remove read_persistent_clock()- perf: Fix perf with MT counting other threads
- Probe for per-TC perf counters in cpu-probe.c
- Use correct VPE ID for VPE tracingMinor cleanups:
- Avoid unneeded built-in.a in DTS dirs
- sc-debugfs: Re-use kstrtobool_from_user
- memset.S: Reinstate delay slot indentation
- VPE: Fix spelling "uneeded" -> "Unneeded"
Platform support:
BCM47xx:
- Add support for Netgear WNR1000 V3
- firmware: Support small NVRAM partitions
- Use __initdata for LEDs platform data
Ingenic:
- Watchdog driver & platform code improvements:
- Disable clock after stopping counter
- Use devm_* functions
- Drop module remove function
- Move platform reset code to restart handler in driver
- JZ4740: Convert watchdog instantiation to DT
- JZ4780: Fix watchdog DT node
- qi_lb60_defconfig: Enable watchdog driverMicrosemi:
- Ocelot: Add support for integrated switch
- pcb123: Connect phys to ports"* tag 'mips_4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits)
MAINTAINERS: Add Paul Burton as MIPS co-maintainer
MIPS: ptrace: Make FPU context layout comments match reality
MIPS: memset.S: Reinstate delay slot indentation
MIPS: perf: Fix perf with MT counting other threads
MIPS: perf: Use correct VPE ID when setting up VPE tracing
MIPS: perf: More robustly probe for the presence of per-tc counters
MIPS: Probe for MIPS MT perf counters per TC
MIPS: mscc: Connect phys to ports on ocelot_pcb123
MIPS: mscc: Add switch to ocelot
MIPS: JZ4740: Drop old platform reset code
MIPS: qi_lb60: Enable the jz4740-wdt driver
MIPS: JZ4780: dts: Fix watchdog node
MIPS: JZ4740: dts: Add bindings for the jz4740-wdt driver
watchdog: JZ4740: Drop module remove function
watchdog: JZ4740: Register a restart handler
watchdog: JZ4740: Use devm_* functions
watchdog: JZ4740: Disable clock after stopping counter
MIPS: VPE: Fix spelling mistake: "uneeded" -> "unneeded"
MIPS: Re-use kstrtobool_from_user()
MIPS: Convert update_persistent_clock() to update_persistent_clock64()
...
07 Jun, 2018
2 commits
-
Every time da9063_wdt_update_timeout() gets called a timeout_to_sel() is
made because the timeout argument of update_timeout() is the raw
register value. Moving the secondraw-value translation into
da9063_wdt_update_timeout() removes duplicated code.Signed-off-by: Marco Felsch
Acked-by: Steve Twiss
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
_da9063_wdt_set_timeout() is called by da9063_wdg_set_timeout(),
da9063_wdg_start() and da9063_wdg_probe() but the name expect only to be
called by da9063_wdg_set_timeout(). Rename the function to avoid
misunderstandings.Signed-off-by: Marco Felsch
Acked-by: Steve Twiss
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
06 Jun, 2018
4 commits
-
The patch "watchdog: da9062: use protection delay mechanism from core"
(fb484262) removed the only user of j_time_stamp. This turned into some
leftover functions that are removed with this patch.Signed-off-by: Michael Grzeschik
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
The watchdog can be enabled in previous steps (e.g. the bootloader). Set
the driver default timeout value (8s) if the watchdog is already running
and the HW_RUNNING flag. So the watchdog core framework will ping the
watchdog till the user space activates the watchdog explicit with the
desired timeout value.Fixes: 5e9c16e37608 ("watchdog: Add DA9063 PMIC watchdog driver.")
Signed-off-by: Marco Felsch
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
The DA9063 watchdog has only one register field to store the timeout value
and to enable the watchdog. The watchdog gets enabled if the value is
not zero. There is no issue if the watchdog is already running but it
leads into problems if the watchdog is disabled.If the watchdog is disabled and only the timeout value should be prepared
the watchdog gets enabled too. Add a check to get the current watchdog
state and update the watchdog timeout value on hw-side only if the
watchdog is already active.Fixes: 5e9c16e37608 ("watchdog: Add DA9063 PMIC watchdog driver.")
Signed-off-by: Marco Felsch
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
If the timeout value is set more than once the DA9063 watchdog triggers
a reset signal which reset the system.To update the timeout value we have to disable the watchdog, clear the
watchdog counter value and write the new timeout value to the watchdog.
Clearing the counter value is a feature to be on the safe side because the
data sheet doesn't describe the behaviour of the watchdog counter value
after a watchdog disabling-enable-sequence.The patch is based on Philipp Zabel's previous patch.
Fixes: 5e9c16e37608 ("watchdog: Add DA9063 PMIC watchdog driver.")
Signed-off-by: Marco Felsch
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
22 May, 2018
5 commits
-
There is already a mutex in the watchdog core which serializes
calls to the various API functions.
So the mutex lock "drv->lock" is unnecessary and can be dropped.Signed-off-by: Jia-Ju Bai
Reviewed-by: Johannes Thumshirn
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
Reviewed-by: Guenter Roeck -
On iLO5 going forward we want to return and not claim the NMI, if
the NMI was NOT gnerated by the iLO as a result of the watchdog
timing out or an explicit generate NMI.The sense of the test in is inverted and prevents hpwdt_pretimeout
from claiming NMIs when it should.Signed-off-by: Jerry Hoemann
Fixes: a042229a18ac ("watchdog: hpwdt: Update nmi_panic message.")
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Add restart handler for SP805 watchdog so that the driver can be
used to reboot the system.Signed-off-by: Jongsung Kim
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
System restart triggered by watchdog time-out works fine on a Koelsch
board with R-Car M2-W ES2.0.Signed-off-by: Geert Uytterhoeven
Acked-by: Fabrizio Castro
Reviewed-by: Guenter Roeck
Reviewed-by: Simon Horman
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.Signed-off-by: Wolfram Sang
Acked-by: Michal Simek
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
15 May, 2018
2 commits
-
When the watchdog was configured for nowayout, and after the
userspace watchdog daemon closed the dev node without sending the
magic character, unloading this module stopped the watchdog
hardware, which was clearly a problem.Besides, unloading the module is not possible when the userspace
watchdog daemon is running, so it's safe to assume that we don't
need to stop the watchdog hardware in the jz4740_wdt_remove()
function.For this reason, the jz4740_wdt_remove() function can then be
dropped alltogether.Signed-off-by: Paul Cercueil
Reviewed-by: Guenter Roeck
Cc: Wim Van Sebroeck
Cc: Mathieu Malaterre
Cc: linux-watchdog@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: James Hogan -
The watchdog driver can restart the system by simply configuring the
hardware for a timeout of 0 seconds.Signed-off-by: Paul Cercueil
Reviewed-by: Guenter Roeck
Cc: Wim Van Sebroeck
Cc: Mathieu Malaterre
Cc: linux-watchdog@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: James Hogan