01 Apr, 2020
1 commit
-
If the heartbeat module param is not specified we would get an error
messagewatchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
watchdog: f1020300.watchdog: falling back to default timeout (171)This is because we were initialising heartbeat to -1. By removing the
initialisation (thus letting the C run time initialise it to 0) we
silence the warning message and the default timeout is still used.Signed-off-by: Chris Packham
Reviewed-by: Guenter Roeck
Link: https://lore.kernel.org/r/20200313031312.1485-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
30 Dec, 2019
1 commit
-
Fix:
orion_wdt f1020300.watchdog: IRQ index 1 not found
which is caused by platform_get_irq() now complaining when optional
IRQs are not found. Neither interrupt for orion is required, so
make them both optional.Signed-off-by: Russell King
Reviewed-by: Guenter Roeck
Link: https://lore.kernel.org/r/E1iahcN-0000AT-Co@rmk-PC.armlinux.org.uk
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
17 Sep, 2019
1 commit
-
The orion watchdog can either reset the CPU or generate an interrupt.
The interrupt would be useful for debugging as it provides panic()
output about the watchdog expiry, however if the interrupt is used the
watchdog can't reset the CPU in the event of being stuck in a loop with
interrupts disabled or if the CPU is prevented from accessing memory
(e.g. an unterminated DMA).The Armada SoCs have spare timers that aren't currently used by the
Linux kernel. We can use timer1 to provide a pre-timeout ahead of the
watchdog timer and provide the possibility of gathering debug before the
reset triggers.Signed-off-by: Chris Packham
Reviewed-by: Guenter Roeck
Link: https://lore.kernel.org/r/20190829215224.27956-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
06 May, 2019
2 commits
-
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 -
The watchdog core will do the same thing if no set_timeout
is supplied so we can safely remove orion_wdt_set_timeout.Signed-off-by: Chris Packham
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
02 Aug, 2018
1 commit
-
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
29 Dec, 2017
1 commit
-
Correct typo in comment "insterted" -> "inserted".
Signed-off-by: Chris Packham
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
06 Jun, 2017
1 commit
-
The header says: This file is licensed under the terms of the GNU
General Public License version 2. The right identifier for
MODULE_LICENSE is "GPL v2" then.Signed-off-by: Uwe Kleine-König
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
25 Feb, 2017
1 commit
-
Trivial fix to spelling mistake in WARN message
Signed-off-by: Colin Ian King
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
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
15 Dec, 2014
1 commit
-
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev__once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
26 Nov, 2014
1 commit
-
The 25 MHz reference clock has better stability so its use is prefered over the
core clock. Change the Armada 375 clock initialization to use this reference
clock. To ensure the driver is compatible with an old devicetree, also provide
a fallback path which will silently return to the previous behavior.While here, add the clock specification to the binding documentation.
Acked-by: Jason Cooper
Acked-by: Gregory CLEMENT
Acked-by: Wim Van Sebroeck
Reviewed-by: Thomas Petazzoni
Tested-by: Thomas Petazzoni
Signed-off-by: Ezequiel Garcia
Signed-off-by: Daniel Lezcano
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
11 Jun, 2014
6 commits
-
This commit adds support for the Armada 375 and Armada 380 SoCs.
This SoC variant has a second RSTOUT register, in addition to the already
existent, which is shared with the system-controller. To handle this RSTOUT,
we introduce a new MMIO register 'rstout_mask' to be required on
'armada-{375,380}-watchdog' new compatible string.Signed-off-by: Ezequiel Garcia
Reviewed-by: Guenter Roeck
Acked-by: Jason Cooper
Tested-by: Jason Gunthorpe
Tested-by: Sebastian Hesselbarth
Signed-off-by: Wim Van Sebroeck -
In order to support other SoCs, it's needed to have a different enabled()
implementation for each SoC. This commit adds no functionality, and it
consists of preparation work.Signed-off-by: Ezequiel Garcia
Reviewed-by: Guenter Roeck
Acked-by: Jason Cooper
Tested-by: Jason Gunthorpe
Tested-by: Sebastian Hesselbarth
Signed-off-by: Wim Van Sebroeck -
In order to support other SoCs, it's needed to have a different stop()
implementation for each SoC. This commit adds no functionality, and it
consists of preparation work.Signed-off-by: Ezequiel Garcia
Reviewed-by: Guenter Roeck
Acked-by: Jason Cooper
Tested-by: Jason Gunthorpe
Tested-by: Sebastian Hesselbarth
Signed-off-by: Wim Van Sebroeck -
The RSTOUT register on the Armada 370 SoC variant is a dedicated register
(not shared across orthogonal subsystems) and so it's not needed to write
it atomically.Signed-off-by: Ezequiel Garcia
Reviewed-by: Guenter Roeck
Acked-by: Jason Cooper
Tested-by: Jason Gunthorpe
Tested-by: Sebastian Hesselbarth
Signed-off-by: Wim Van Sebroeck -
Separate the RSTOUT register mapping for the different compatible strings
supported by the driver. This allows to use devm_ioremap on SoC variants that
share the RSTOUT register, and devm_ioremap_resource (which requests the MMIO
region) on SoCs that have a dedicated RSTOUT register.Signed-off-by: Ezequiel Garcia
Reviewed-by: Guenter Roeck
Acked-by: Jason Cooper
Tested-by: Jason Gunthorpe
Tested-by: Sebastian Hesselbarth
Signed-off-by: Wim Van Sebroeck -
Follow-up patches will extend the registers ioremap and request
to handle SoC-specific quirks on the RSTOUT register. Therefore,
in order to keep the code readable, this commit introduces a special
function for this.Signed-off-by: Ezequiel Garcia
Reviewed-by: Guenter Roeck
Acked-by: Jason Cooper
Tested-by: Sebastian Hesselbarth
Signed-off-by: Wim Van Sebroeck
06 Apr, 2014
1 commit
-
Pull ARM SoC driver changes from Arnd Bergmann:
"These changes are mostly for ARM specific device drivers that either
don't have an upstream maintainer, or that had the maintainer ask us
to pick up the changes to avoid conflicts.A large chunk of this are clock drivers (bcm281xx, exynos, versatile,
shmobile), aside from that, reset controllers for STi as well as a
large rework of the Marvell Orion/EBU watchdog driver are notable"* tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
Revert "dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac."
Revert "net: stmmac: Add SOCFPGA glue driver"
ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks
ARM: STi: Add reset controller support to mach-sti Kconfig
drivers: reset: stih416: add softreset controller
drivers: reset: stih415: add softreset controller
drivers: reset: Reset controller driver for STiH416
drivers: reset: Reset controller driver for STiH415
drivers: reset: STi SoC system configuration reset controller support
dts: socfpga: Add sysmgr node so the gmac can use to reference
dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
reset: Add optional resets and stubs
ARM: shmobile: r7s72100: fix bus clock calculation
Power: Reset: Generalize qnap-poweroff to work on Synology devices.
dts: socfpga: Update clock entry to support multiple parents
ARM: socfpga: Update socfpga_defconfig
dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
net: stmmac: Add SOCFPGA glue driver
watchdog: orion_wdt: Use %pa to print 'phys_addr_t'
drivers: cci: Export CCI PMU revision
...
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
26 Feb, 2014
1 commit
-
When building an ARM multi_v7_defconfig with LPAE option selected we get the
following build warning:drivers/watchdog/orion_wdt.c:272:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'phys_addr_t' [-Wformat=]
Fix it by using %pa to print 'phys_addr_t'.
Reported-by: Olof's autobuilder
Reviewed-by: Guenter Roeck
Acked-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Signed-off-by: Fabio Estevam
Signed-off-by: Jason Cooper
22 Feb, 2014
12 commits
-
Using the added infrastructure for handling SoC differences,
this commit adds support for the watchdog controller available
in Armada 370 and Armada XP SoCs.Also, and because the AXP clock initialization uses of_clk_get_by_name,
this commit changes the orion clock initialization to use clk_get() and
adds a proper clk_put() on the common exit/error paths.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
To handle differences between SoCs this commit adds per-compatible
string start() function for the watchdog kick-off. This is preparation
work and makes no functionality changes to the current driver.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
Following the introduction of the compatible-data field,
it's now possible to further abstract the clock initialization.
This will allow to support SoC with a different clock setup.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
This commit adds an orion_watchdog_data structure to hold compatible-data
information. This allows to remove the driver-wide definition and to
be able to add support for multiple compatible-strings in the future.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
In order to prepare to support multiple compatible-strings, this
commit adds a device structure to hold the driver's state.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
After adding the IRQ request, the BRIDGE_CAUSE bit should be cleared by the
bridge interrupt controller. There's no longer a need to do it in the watchdog
driver, so we can simply remove it.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
In order to support other SoC, it's required to distinguish
the 'control' timer register, from the 'rstout' register
that enables system reset on watchdog expiration.To prevent a compatibility break, this commit adds a fallback
to a hardcoded RSTOUT address.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
DT-enabled plaforms, where the irqchip driver for the brigde interrupt
controller is available, can handle the watchdog IRQ properly. Therefore,
request the interrupt and add a dummy handler that merely calls panic().This is done in order to have an initial 'ack' of the interruption,
which clears the watchdog state.Furthermore, since some platforms don't have such IRQ, this commit
makes the interrupt specification optional.Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
Having the watchdog initially fully stopped is important to avoid
any spurious watchdog triggers, in case the registers are not in
its reset state.If the watchdog rstout is enabled and the watchdog counter running,
this initial stop is not performed, to comply with the 'nowayout'
parameter.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
These are not used anywhere so it's safe to remove them.
Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
Since the timer control register is shared with the clocksource driver,
use the recently introduced atomic_io_clear_set() to access such register.
Given the watchdog core already provides serialization for all the
watchdog ops, this commit allows to remove the spinlock entirely.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper -
This commit adds a check for clk_prepare_enable success and introduces
an error path to disable the clock properly.Reviewed-by: Guenter Roeck
Tested-by: Sebastian Hesselbarth
Tested-by: Willy Tarreau
Signed-off-by: Ezequiel Garcia
Acked-by: Wim Van Sebroeck
Tested-By: Jason Gunthorpe
Signed-off-by: Jason Cooper
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
2 commits
-
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 -
of_match_ptr() is a macro used to avoid undefined reference error if
CONFIG_OF is used to selectively compile in or out the
data structure. It is defined as follows:#ifdef CONFIG_OF
#define of_match_ptr(ptr) ptr
#else
#define of_match_ptr(ptr) NULL
#endifIn the case of this series, none of the drivers use CONFIG_OF macro to
compile out the data structure (i.e., the data structure is always
defined).
Hence the use of of_match_ptr() does not make any sense. Thus removing
it to make the code look simpler for readability.Signed-off-by: Sachin Kamat
Acked-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
12 Jul, 2013
2 commits
-
The bits in BRIDGE_CAUSE are documented as RW0C - read, write 0 to
clear. If we read the register, mask off the watchdog bit, and
write it back, we're actually clearing every interrupt which wasn't
pending at the time we read the register - and that is racy.Fix this to only write ~WATCHDOG_BIT to the register, which means
we write as zero only the watchdog bit.Signed-off-by: Russell King
Acked-by: Jason Cooper
Tested-by: Andrew Lunn
Signed-off-by: Wim Van Sebroeck -
The watchdog infrastructure in Dove is no different from that in
Orion5x or Kirkwood, so let's enable it for Dove. The only things
missing are a few register settings in Dove's bridge-regs.h.Rather than duplicating the same register bit masks for the RSTOUTn_MASK
and BRIDGE_CAUSE registers, move the definitions into the watchdog
driver itself.Signed-off-by: Russell King
Acked-by: Jason Cooper
Tested-by: Andrew Lunn
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