16 Aug, 2019
1 commit
-
The only thing that prevents building this driver on other
platforms is the mach/hardware.h include, which is not actually
used here at all, so remove the line and allow CONFIG_COMPILE_TEST.Link: https://lore.kernel.org/r/20190809144043.476786-4-arnd@arndb.de
Acked-by: Sylvain Lemieux
Reviewed-by: Guenter Roeck
Signed-off-by: Arnd Bergmann
09 Jul, 2019
1 commit
-
This gets rid of the unnecessary license boilerplate, and avoids
having to deal with individual patches one by one.No functional changes.
Reviewed-by: Jerry Hoemann
Acked-by: Sylvain Lemieux
Reviewed-by: Matthias Brugger
Acked-by: William Breathitt Gray
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
08 Jul, 2019
1 commit
-
The core will print out details now.
Signed-off-by: Wolfram Sang
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
06 May, 2019
3 commits
-
Readout the enabled state so it is possible to get the pre-userspace
handler working. Also, avoid disabling the watchdog to ensure it continues
working and triggers if there is an issue later in the boot or if userspace
fails to start.Signed-off-by: Alexandre Belloni
Tested-by: Gregory CLEMENT
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Use device managed functions to simplify error handling, reduce
source code size, improve readability, and reduce the likelyhood of bugs.
Other improvements as listed below.The conversion was done automatically with coccinelle using the
following semantic patches. The semantic patches and the scripts
used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches- Drop empty remove function
- Use devm_add_action_or_reset() for calls to clk_disable_unprepare
- Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatedly
- Use devm_watchdog_register_driver() to register watchdog deviceCc: Vladimir Zapolskiy
Cc: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Use devm_platform_ioremap_resource to reduce source code size,
improve readability, and reduce the likelyhood of bugs.The conversion was done automatically with coccinelle using the
following semantic patch.@r@
identifier res, pdev;
expression a;
expression index;
expression e;
@@@depends on r@
identifier r.res;
@@
- struct resource *res;
... when != res@@
identifier res, pdev;
expression index;
expression a;
@@
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index);
- a = devm_ioremap_resource(&pdev->dev, res);
+ a = devm_platform_ioremap_resource(pdev, index);Cc: Joel Stanley
Cc: Nicolas Ferre
Cc: Alexandre Belloni
Cc: Florian Fainelli
Cc: Linus Walleij
Cc: Baruch Siach
Cc: Keguang Zhang
Cc: Vladimir Zapolskiy
Cc: Kevin Hilman
Cc: Matthias Brugger
Cc: Avi Fishman
Cc: Nancy Yuen
Cc: Brendan Higgins
Cc: Wan ZongShun
Cc: Michal Simek
Cc: Sylvain Lemieux
Cc: Kukjin Kim
Cc: Barry Song
Cc: Orson Zhai
Cc: Patrice Chotard
Cc: Maxime Coquelin
Cc: Maxime Ripard
Cc: Chen-Yu Tsai
Cc: Marc Gonzalez
Cc: Thierry Reding
Cc: Shawn Guo
Signed-off-by: Guenter Roeck
Acked-by: Alexandre Belloni
Tested-by: Alexandre Belloni
Acked-by: Joel Stanley
Reviewed-by: Linus Walleij
Acked-by: Maxime Ripard
Acked-by: Michal Simek (cadence/xilinx wdts)
Acked-by: Thierry Reding
Reviewed-by: Florian Fainelli
Acked-by: Patrice Chotard
Acked-by: Vladimir Zapolskiy
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
04 Mar, 2018
1 commit
-
watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.Signed-off-by: Marcus Folkesson
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
17 Mar, 2016
4 commits
-
Added support to verify if a "cmd" is passed from the userspace program rebooting the system;
- if a valid "cmd" is available, handle it;
- If the received "cmd" is not supported, use the default reboot mode.Signed-off-by: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Add support for explicit soft reset using the reboot mode.
The default reboot mode behavior is unchanged;
you can overwrite the default reboot type in the board specific file
"DT_MACHINE_START" definition using the "reboot_mode" parameter.Signed-off-by: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Add restart handler capability to the driver;
the restart handler implementation was taken from
"mach-lpc32xx" ("lpc23xx_restart" function).Signed-off-by: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
There is no need to add the driver name in the text to display
on the console during the power-on:
pnx4008-watchdog 4003c000.watchdog: PNX4008 Watchdog Timer: heartbeat 19 secSigned-off-by: Sylvain Lemieux
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
23 Nov, 2015
2 commits
-
Silences sparse warning:
drivers/watchdog/pnx4008_wdt.c:83:25:
warning: symbol 'wdt_clk' was not declared. Should it be static?Signed-off-by: Vladimir Zapolskiy
Reviewed-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
If common clock framework is configured, the driver generates a warning,
which is fixed by this change:WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.3.0-rc2+ #171
Hardware name: LPC32XX SoC (Flattened Device Tree)
Backtrace:
[<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c)
[<>] (show_stack) from [<>] (dump_stack+0x20/0x28)
[<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8)
[<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c)
[<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xa4)
[<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38)
[<>] (clk_enable) from [<>] (pnx4008_wdt_probe+0x78/0x11c)
[<>] (pnx4008_wdt_probe) from [<>] (platform_drv_probe+0x50/0xa0)
[<>] (platform_drv_probe) from [<>] (driver_probe_device+0x18c/0x408)
[<>] (driver_probe_device) from [<>] (__driver_attach+0x70/0x94)
[<>] (__driver_attach) from [<>] (bus_for_each_dev+0x74/0x98)
[<>] (bus_for_each_dev) from [<>] (driver_attach+0x20/0x28)
[<>] (driver_attach) from [<>] (bus_add_driver+0x11c/0x248)
[<>] (bus_add_driver) from [<>] (driver_register+0xa4/0xe8)
[<>] (driver_register) from [<>] (__platform_driver_register+0x50/0x64)
[<>] (__platform_driver_register) from [<>] (platform_wdt_driver_init+0x18/0x20)
[<>] (platform_wdt_driver_init) from [<>] (do_one_initcall+0x11c/0x1dc)
[<>] (do_one_initcall) from [<>] (kernel_init_freeable+0x10c/0x1d4)
[<>] (kernel_init_freeable) from [<>] (kernel_init+0x10/0xec)
[<>] (kernel_init) from [<>] (ret_from_fork+0x14/0x24)Signed-off-by: Vladimir Zapolskiy
Reviewed-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
10 Sep, 2015
1 commit
-
/sys/class/watchdog/watchdogn/device/modalias can help to identify the
driver/module for a given watchdog node. However, many wdt devices do not
set their parent and so, we do not see an entry for device in sysfs for
such devices.This patch fixes parent of watchdog_device so that
/sys/class/watchdog/watchdogn/device is populated.Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not
have any parent. Not sure, how we can identify driver for these devices.Signed-off-by: Pratyush Anand
Reviewed-by: Johannes Thumshirn
Acked-by: Guenter Roeck
Acked-by: H Hartley Sweeten
Acked-by: Lee Jones
Acked-by: Lubomir Rintel
Acked-by: Maxime Coquelin
Acked-by: Thierry Reding
Acked-by: Viresh Kumar
Acked-by: Linus Walleij
Signed-off-by: Wim Van Sebroeck
22 Apr, 2015
1 commit
-
My Pengutronix address is not valid anymore, redirect people to the Pengutronix
kernel team.Reported-by: Harald Geyer
Signed-off-by: Wolfram Sang
Acked-by: Robert Schwebel
Signed-off-by: Wim Van Sebroeck
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
31 Mar, 2014
1 commit
-
None of these files are actually using any __init type directives
and hence don't need to include . Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.Signed-off-by: Paul Gortmaker
Reviewed-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
Cc: linux-watchdog@vger.kernel.org
10 Dec, 2013
1 commit
-
After commit 487722cf2 (watchdog: Get rid of MODULE_ALIAS_MISCDEV
statements) the affected drivers no longer need to include miscdevice.h.
Only exception is rt2880_wdt.c which never needed it.Signed-off-by: Guenter Roeck
Reviewed-by: Jean Delvare
Signed-off-by: Wim Van Sebroeck
18 Nov, 2013
1 commit
-
I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR)
and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements.Either the device is enumerated and the driver already has a module
alias (e.g. PCI, USB etc.) that will get the right driver loaded
automatically.Or the device is not enumerated and loading its driver will lead to
more or less intrusive hardware poking. Such hardware poking should be
limited to a bare minimum, so the user should really decide which
drivers should be tried and in what order. Trying them all in
arbitrary order can't do any good.On top of that, loading that many drivers at once bloats the kernel
log. Also many drivers will stay loaded afterward, bloating the output
of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets
loaded as a dependency) can't even be unloaded!If defining char-major-10-130 is needed then it should happen in
user-space.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
Cc: Stephen Warren
Cc: Mike Frysinger
Cc: Wan ZongShun
Cc: Ben Dooks
Cc: Kukjin Kim
Cc: Zwane Mwaikambo
Cc: Jim Cromie
12 Jul, 2013
1 commit
-
Use devm_clk_get() to make cleanup paths more simple.
Signed-off-by: Jingoo Han
Reviewed-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
01 Mar, 2013
1 commit
-
this patchset add the timeout-sec property to the following drivers:
orion_wdt, pnx4008_wdt, s3c2410_wdt and at91sam9_wdt.The at91sam9_wdt is tested on evk-pr3,
the other drivers are compile tested only.Signed-off-by: Fabio Porcedda
Cc: Andrew Lunn
Cc: Jason Cooper
Cc: Wolfram Sang
Cc: Masanari Iida
Cc: Ben Dooks
Cc: Kukjin Kim
Cc: Andrew Victor
Cc: Jean-Christophe PLAGNIOL-VILLARD
Cc: Nicolas Ferre
Signed-off-by: Wim Van Sebroeck
26 Jan, 2013
1 commit
-
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.Signed-off-by: Thierry Reding
Cc: Wim Van Sebroeck
Signed-off-by: Greg Kroah-Hartman
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Wim Van Sebroeck
Cc: Wan ZongShun
Cc: Ben Dooks
Cc: Kukjin Kim
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Wim Van Sebroeck
Cc: Wan ZongShun
Cc: Ben Dooks
Cc: Kukjin Kim
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Wim Van Sebroeck
Cc: Wan ZongShun
Cc: Ben Dooks
Cc: Kukjin Kim
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
23 May, 2012
1 commit
-
This patch adds device tree support to pnx4008-wdt.c
Signed-off-by: Roland Stigge
Reviewed-by: Arnd Bergmann
Signed-off-by: Wim Van Sebroeck
28 Mar, 2012
6 commits
-
Since we changed the behaviour of the set_timeout operation in the
watchdog API, we need to change the allready converted drivers so
that they update the timeout field at the end of the set_timeout
operation.Signed-off-by: Wim Van Sebroeck
-
Make this driver a user of the watchdog framework and remove parts now handled
by the core. Tested on a custom lpc32xx-board.[wim@iguana.be: Added set_timeout operation]
Signed-off-by: Wolfram Sang
Signed-off-by: Wim Van Sebroeck -
nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.Signed-off-by: Wim Van Sebroeck
-
Use the current logging styles.
Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines.
Coalesce formats.Signed-off-by: Joe Perches
Signed-off-by: Wim Van Sebroeck -
__raw_readl/__raw_writel are not meant for drivers [1].
[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/117626
Signed-off-by: Wolfram Sang
Signed-off-by: Wim Van Sebroeck -
The resource handling in this driver was flaky: IO_ADDRESS instead of
ioremap (and no unmapping), an unneeded static resource, no central exit
path for error cases. Fix this by converting the driver to use managed
resources. Also use dev_*-messages instead of pr_* while we are here.Signed-off-by: Wolfram Sang
Signed-off-by: Wim Van Sebroeck
29 Feb, 2012
1 commit
-
Correct spelling "resouce" to "resource" in
drivers/watchdog/pnx4008_wdt.cSigned-off-by: Masanari Iida
Signed-off-by: Jiri Kosina
Signed-off-by: Wim Van Sebroeck
27 Jan, 2012
1 commit
-
Correct typo "unexpectdly" to "unexpectedly" in pnx4008_wdt.c
and stmp3xxx_wdt.cSigned-off-by: Masanari Iida
Signed-off-by: Wim Van Sebroeck
06 Jan, 2012
1 commit
-
This patch converts the drivers in drivers/watchdog/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.Signed-off-by: Axel Lin
Cc: Nicolas Thill
Cc: Florian Fainelli
Cc: "David S. Miller"
Cc: Paul Cercueil
Cc: Marc Zyngier
Cc: Wan ZongShun
Cc: Alejandro Cabrera
Cc: "George G. Davis"
Cc: Sylver Bruneau
Cc: Vitaly Wool
Cc: Mika Westerberg
Cc: Timo Kokkonen
Signed-off-by: Wim Van Sebroeck
29 Mar, 2011
1 commit
-
Request_mem_region should be used with release_mem_region, not
release_resource.In pnx4008_wdt.c, a missing clk_put is added as well.
The semantic match that finds the first problem is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression x,E;
@@
*x = request_mem_region(...)
... when != release_mem_region(x)
when != x = E
* release_resource(x);
//Signed-off-by: Julia Lawall
Signed-off-by: Wim Van Sebroeck
Cc: stable
16 Mar, 2011
1 commit
-
cleanup spaces before tabs in drivers/watchdog/
Signed-off-by: Wim Van Sebroeck
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
13 Feb, 2010
2 commits
-
clk_set_rate() is not supposed to be used to turn clocks on and off.
That's what clk_enable/clk_disable is for.Acked-by: Wim Van Sebroeck
Acked-by: Vitaly Wool
Signed-off-by: Russell King -
Acked-by: Wim Van Sebroeck
Acked-by: Vitaly Wool
Signed-off-by: Russell King