History log of /linux-master/drivers/watchdog/octeon-wdt-main.c
Revision Date Author Comments
# 4700df05 22-Mar-2021 Lukas Bulwahn <lukas.bulwahn@gmail.com>

watchdog: fix syntactic kernel-doc issues

The command 'find drivers/watchdog | xargs ./scripts/kernel-doc -none'
reports a number of kernel-doc warnings in the watchdog subsystem.

Address the kernel-doc warnings that were purely syntactic issues with
kernel-doc comments.

The remaining kernel-doc warnings are of type "Excess function parameter"
and "Function parameter or member not described". These warnings would
need to be addressed in a second pass with a bit more insight into the
APIs and purpose of the functions in the watchdog subsystem.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210322065337.617-1-lukas.bulwahn@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>


# bc9a454a 13-Sep-2018 Marc Zyngier <maz@kernel.org>

watchdog/octeon-wdt: Directly include linux/irqdomain.h

This drivers currently obtains linux/irqdomain.h by luck and
a chain of bizarre inclusions, which we're about to fix.

Let's include the required file directly.

Signed-off-by: Marc Zyngier <maz@kernel.org>


# d0173278 20-Jun-2019 Guenter Roeck <linux@roeck-us.net>

watchdog: convert remaining drivers to use SPDX license identifier

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 <jerry.hoemann@hpe.com>
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>


# 1d1821b2 29-Aug-2017 Carlos Munoz <carlos.munoz@caviumnetworks.com>

watchdog: octeon-wdt: Add support for 78XX SOCs.

Signed-off-by: Carlos Munoz <carlos.munoz@caviumnetworks.com>
Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mips@linux-mips.org
Cc: linux-watchdog@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17214/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 0cd4e7a9 29-Aug-2017 David Daney <david.daney@cavium.com>

watchdog: octeon-wdt: Add support for cn68XX SOCs.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Carlos Munoz <cmunoz@caviumnetworks.com>
Signed-off-by: Chandrakala Chavva <cchavva@caviumnetworks.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mips@linux-mips.org
Cc: linux-watchdog@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17213/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 381cec02 29-Aug-2017 Steven J. Hill <Steven.Hill@cavium.com>

watchdog: octeon-wdt: File cleaning.

* Update copyright and company name.
* Remove unused headers.
* Fix variable spelling and data type.
* Use octal values for module parameters.

Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mips@linux-mips.org
Cc: linux-watchdog@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17212/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 49d148b4 29-Aug-2017 Steven J. Hill <steven.hill@cavium.com>

watchdog: octeon-wdt: Remove old boot vector code.

Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: linux-mips@linux-mips.org
Cc: linux-watchdog@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17209/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 724284a3 15-Dec-2016 Corentin Labbe <clabbe.montjoie@gmail.com>

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 <clabbe.montjoie@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>


# 948b9c60 17-Nov-2016 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

watchdog/octeon: Convert to hotplug state machine

Install the callbacks via the state machine and let the core invoke
the callbacks on the already online CPUs.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: rt@linuxtronix.de
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
Link: http://lkml.kernel.org/r/20161117183541.8588-12-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# ebbf677a 18-Mar-2016 Richard Cochran <rcochran@linutronix.de>

watchdog: octeon: Handle the FROZEN hot plug notifier actions.

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.

Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# 3a30c07e 28-Mar-2015 Aaro Koskinen <aaro.koskinen@iki.fi>

watchdog: octeon: use fixed length string for register names

Use fixed length string for register names. This saves 416 bytes
in text size.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# 8692cf0a 28-Mar-2015 Aaro Koskinen <aaro.koskinen@iki.fi>

watchdog: octeon: fix some trivial coding style issues

Fix some trivial coding style issues to reduce noise from static analyzers.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# 3d588c93 28-Mar-2015 Aaro Koskinen <aaro.koskinen@iki.fi>

watchdog: octeon: convert to WATCHDOG_CORE API

Convert OCTEON watchdog to WATCHDOG_CORE API. This enables support
for multiple watchdogs on OCTEON boards.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# f64988f1 27-Jun-2014 Aaro Koskinen <aaro.koskinen@iki.fi>

MIPS: OCTEON: watchdog: don't jump to bootloader without entry address

If CONFIG_HOTPLUG_CPU is set, the driver thinks bootloader entry
address is configured and we should jump there. However, this is
not necessarily true if the kernel is booted on a system
with older/incompatible bootloader.

Add dynamic checks for the bootloader entry address.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-watchdog@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: linux-watchdog@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7201/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# 99c3bf36 10-Mar-2014 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

octeon, watchdog: Fix CPU hotplug callback registration

Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:

get_online_cpus();

for_each_online_cpu(cpu)
init_cpu(cpu);

register_cpu_notifier(&foobar_cpu_notifier);

put_online_cpus();

This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).

Instead, the correct and race-free way of performing the callback
registration is:

cpu_notifier_register_begin();

for_each_online_cpu(cpu)
init_cpu(cpu);

/* Note the use of the double underscored version of the API */
__register_cpu_notifier(&foobar_cpu_notifier);

cpu_notifier_register_done();

Fix the watchdog code in octeon by using this latter form of callback
registration.

Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 86a1e189 05-Mar-2012 Wim Van Sebroeck <wim@iguana.be>

watchdog: nowayout is bool

nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# 27c766aa 15-Feb-2012 Joe Perches <joe@perches.com>

watchdog: Use pr_<fmt> and pr_<level>

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 <joe@perches.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# 47bfd058 03-Oct-2011 Venkat Subbiah <venkat.subbiah@cavium.com>

watchdog: Octeon: Mark octeon_wdt interrupt as IRQF_NO_THREAD

This is to exclude it from force threading to allow RT patch set to work.

The watchdog timers are per-CPU and the addresses of register that reset
the timer are calculated based on the current CPU. Therefore we cannot
allow it to run on a thread on a different CPU. Also we only do a
single register write, which is much faster than scheduling a handler
thread.

And while on this line remove IRQF_DISABLED as this flag is a NOP.

Signed-off-by: Venkat Subbiah<venkat.subbiah@cavium.com>
Acked-by: David Daney<david.daney@cavium.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>


# 468ffde4 07-Oct-2010 David Daney <ddaney@caviumnetworks.com>

WATCHDOG: octeon-wdt: Use I/O clock rate for timing calculations.

The creation of the I/O clock domain requires some adjustments. Since
the watchdog counters are clocked by the I/O clock, use its rate for
timing calculations.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org
Patchwork: http://patchwork.linux-mips.org/patch/1659/
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>


# ca4d3e67 07-Oct-2010 David Howells <dhowells@redhat.com>

MIPS: Add missing #inclusions of <linux/irq.h>

Add missing #inclusions of <linux/irq.h> to a whole bunch of files that should
really include it. Note that this can replace #inclusions of <asm/irq.h>.

This is required for the patch to sort out irqflags handling function naming to
compile on MIPS.

The problem is that these files require access to things like setup_irq() -
which isn't available by #including <linux/interrupt.h>

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>


# 4c076fb4 24-Jul-2010 David Daney <ddaney@caviumnetworks.com>

WATCHDOG: Add watchdog driver for OCTEON SOCs

The OCTEON is a MIPS64 based SOC family with an on chip watchdog unit.

The driver is split into two source files one for the C code and one
for assembly. Assembly is needed to handle the NMI and then print the
machine state before the reboot is triggered.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Marc Zyngier <maz@misterjones.org>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
To: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org,
Patchwork: https://patchwork.linux-mips.org/patch/1503/
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

create mode 100644 drivers/watchdog/octeon-wdt-main.c
create mode 100644 drivers/watchdog/octeon-wdt-nmi.S