Commit Graph

187 Commits

Author SHA1 Message Date
Wim Van Sebroeck
5eb82498e3 [WATCHDOG] Coding style - Indentation - part 1
This brings the watchdog drivers into line with coding style.
This patch takes cares of the indentation as described in chapter 1:
  The preferred way to ease multiple indentation levels in a switch
  statement is to align the "switch" and its subordinate "case"
  labels in the same column instead of "double-indenting" the "case"
  labels.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-08-06 13:21:05 +00:00
Anton Vorontsov
0d7b101404 [WATCHDOG] mpc8xxx_wdt: add support for MPC8xx watchdogs
The mpc8xxx_wdt driver is using two registers: SWSRR to push magic
numbers, and SWCRR to control the watchdog.  Both registers are available
on the MPC8xx, and seem to have the same offsets and semantics as in
MPC83xx/MPC86xx watchdogs.  The only difference is prescale value.  So
this driver simply works on the MPC8xx CPUs.

One quirk is needed for the MPC8xx, though.  It has small prescale value
and slow CPU, so the watchdog resets board prior to the driver has time to
load.  To solve this we should split initialization in two steps: start
ping the watchdog early, and register the watchdog userspace interface
later.

MPC823 seem to be the first CPU in MPC8xx line, so we use fsl,mpc823-wdt
compatible matching.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Tested-by: Jochen Friedrich <jochen@scram.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:08:47 +00:00
Anton Vorontsov
cb55d282a0 [WATCHDOG] mpc8xxx_wdt: fix build
CC      drivers/watchdog/mpc8xxx_wdt.o
drivers/watchdog/mpc8xxx_wdt.c: In function 'mpc8xxx_wdt_ioctl':
drivers/watchdog/mpc8xxx_wdt.c:156: error: 'cmd' undeclared (first use in this function)
drivers/watchdog/mpc8xxx_wdt.c:156: error: (Each undeclared identifier is reported only once
drivers/watchdog/mpc8xxx_wdt.c:156: error: for each function it appears in.)
drivers/watchdog/mpc8xxx_wdt.c: At top level:
drivers/watchdog/mpc8xxx_wdt.c:176: warning: initialization from incompatible pointer type

This patch ought to be folded into
mpc8xxx_wdt-various-renames-mostly-s-mpc83xx-mpc8xxx-g.patch

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:07:32 +00:00
Anton Vorontsov
59ca1b0d14 [WATCHDOG] mpc8xxx_wdt: various renames, mostly s/mpc83xx/mpc8xxx/g
mpc83xx_wdt.c renamed to mpc8xxx_wdt.c, now we can do various renames in
the file itself.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:07:06 +00:00
Anton Vorontsov
28acd02f9f [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt
Rename the driver because now we support some MPC86xx processors.

There are no changes to the mpc83xx_wdt.c file, yet.  When possible, we do
file renames and changes separately (because Linus once asked so, because
it helps git to track the renamed files).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:06:25 +00:00
Anton Vorontsov
500c919e3d [WATCHDOG] mpc83xx_wdt: add support for MPC86xx CPUs
On MPC86xx the watchdog could be enabled only at power-on-reset, and could
not be disabled afterwards.  We must ping the watchdog from the kernel
until the userspace handles it.

MPC83xx CPUs are only differ in a way that watchdog could be disabled
once, but after it was enabled via software it becomes just the same as
MPC86xx.

Thus, to support MPC86xx I added the kernel timer which pings the watchdog
until the userspace opens it.

Since we implemented the timer, now we're able to implement proper
handling for the CONFIG_WATCHDOG_NOWAYOUT case, for MPC83xx and MPC86xx.

Also move the probe code into subsys_initcall, because we want start
pinging the watchdog ASAP, and misc devices are available in
subsys_initcall.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:05:12 +00:00
Anton Vorontsov
ef8ab12ec2 [WATCHDOG] mpc83xx_wdt: convert to the OF platform driver
This patch simply converts mpc83xx_wdt to the OF platform driver so we can
directly work with the device tree without passing various stuff through
platform data.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:04:26 +00:00
Alan Cox
c948852051 [WATCHDOG] pcwd: a couple of watchdogs escaped conversion
Fix them up.  Once we know the long term plan the watchdogs can all get
shrunk massively anyway

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-06 13:03:11 +00:00
Wim Van Sebroeck
089ab0791d [WATCHDOG] Clean-up includes
Use #include <linux/io.h> instead of <asm/io.h>
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Clean-up includes.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-08-06 13:02:16 +00:00
Wim Van Sebroeck
9e74114d96 [WATCHDOG] hpwdt.c - fix double includes
The last clean-up created 2 times the same include. delete the doubles.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-08-06 12:31:52 +00:00
Wim Van Sebroeck
96e2e6fafa [WATCHDOG] Merge code clean-up's from Alan Cox.
Merge branch 'alan' of ../linux-2.6-watchdog-mm
Fixed Conflicts in the following files:
	drivers/watchdog/booke_wdt.c
	drivers/watchdog/mpc5200_wdt.c
	drivers/watchdog/sc1200wdt.c

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-08-06 11:58:26 +00:00
Eric Miao
214c6a7ed1 [ARM] sa1100_wdt: use reset_status to remember watchdog reset status
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-08-05 09:26:06 +08:00
Alan Cox
103a1d5c57 sc1200 watchdog driver: Fix locking, sems and coding style
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:08 -07:00
Andrew Morton
81830061bb alpha: Fix breakage in wdt_pci
drivers/watchdog/wdt_pci.c: In function 'wdtpci_ctr_mode':
drivers/watchdog/wdt_pci.c:120: error: implicit declaration of function 'udelay'
{standard input}: Assembler messages:

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:07 -07:00
Alan Cox
9f2d1f0da7 wdt: Cleanup and sort out locking and inb_p
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:07 -07:00
Alan Cox
41dc8b72e3 s3c2410_wdt watchdog driver: Locking and coding style
Kill off use of semaphores.
Fix ioctl races and locking holes.

From: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:07 -07:00
Alan Cox
d6547378df it8712f_wdt: Locking and coding style
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:07 -07:00
Alan Cox
670d59c0ae ar7_wdt watchdog driver: Fix locking
Use unlocked_ioctl
Remove semaphores

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 17:12:07 -07:00
Alexey Dobriyan
d667b6ddbc hpwdt: don't use static flags
Static (read: global) is potential problem.  Two threads can corrupt each
other's interrupt status, better avoid this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-30 09:41:45 -07:00
Adrian Bunk
f606ddf42f remove the v850 port
Trying to compile the v850 port brings many compile errors, one of them exists
since at least kernel 2.6.19.

There also seems to be noone willing to bring this port back into a usable
state.

This patch therefore removes the v850 port.

If anyone ever decides to revive the v850 port the code will still be
available from older kernels, and it wouldn't be impossible for the port to
reenter the kernel if it would become actively maintained again.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:24 -07:00
Benjamin Herrenschmidt
84c3d4aaec Merge commit 'origin/master'
Manual merge of:

	arch/powerpc/Kconfig
	arch/powerpc/kernel/stacktrace.c
	arch/powerpc/mm/slice.c
	arch/ppc/kernel/smp.c
2008-07-16 11:07:59 +10:00
Ingo Molnar
f6f88e9bfb generic-ipi: more merge fallout
fix more API change fallout in recently merged upstream changes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-15 22:08:52 +02:00
Stephen Rothwell
75195dabce powerpc/mpc5200_wdt: use linux/of_platform.h instead of asm
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-07-12 12:10:53 -06:00
Wim Van Sebroeck
63842cccb2 Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working"
After Linus fixed the inline assembly, the CFLAGS option is not
needed anymore.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-24 13:09:26 +00:00
Alan Cox
7c4be5aa8d [WATCHDOG 57/57] wdt501/pci: Clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 20:09:22 +00:00
Alan Cox
f2b79c6ede [WATCHDOG 56/57] wdt977: clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 20:07:12 +00:00
Alan Cox
d0e58eed05 [WATCHDOG 55/57] wdt285: switch to unlocked_ioctl and tidy up oddments of coding style
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 20:04:09 +00:00
Alan Cox
dae67a2835 [WATCHDOG 54/57] wdrtas: clean up, coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 20:02:25 +00:00
Alan Cox
694b16b2bd [WATCHDOG 53/57] wafer5823wdt: Clean up, coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 19:59:31 +00:00
Alan Cox
84af401af8 [WATCHDOG 52/57] w83977f_wdt: clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 19:57:08 +00:00
Alan Cox
c1cfd1a2ff [WATCHDOG 51/57] w83877f_wdt: clean up code, coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 19:55:51 +00:00
Alan Cox
c1c8dd39f5 [WATCHDOG 50/57] w83697hf_wdt: cleanup, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 19:53:43 +00:00
Alan Cox
46a3949ddc [WATCHDOG 49/57] w83627hf: coding style, clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 16:17:43 +00:00
Alan Cox
8dc244f7de [WATCHDOG 48/57] txx9: Fix locking, switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 16:15:57 +00:00
Alan Cox
f92d3749d7 [WATCHDOG 47/57] softdog: clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 15:40:42 +00:00
Alan Cox
598467938d [WATCHDOG 46/57] smsc37b787_wdt: coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 15:39:12 +00:00
Alan Cox
70b814ec1a [WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 15:37:26 +00:00
Alan Cox
9b748ed03c [WATCHDOG 44/57] scx200_wdt: clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 15:35:02 +00:00
Alan Cox
ff94806057 [WATCHDOG 43/57] sc520_wdt: Clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 15:30:57 +00:00
Alan Cox
d14bccaada [WATCHDOG 42/57] sc1200_wdt: clean up, fix locking and use unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 15:08:00 +00:00
Alan Cox
df3c9de3de [WATCHDOG 41/57] sb_wdog: Clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:57:12 +00:00
Alan Cox
f4f6f65a55 [WATCHDOG 40/57] sbc_epx_c3_wdt: switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:46:05 +00:00
Alan Cox
9f53c8de1a [WATCHDOG 39/57] sbc8360: clean up
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:42:05 +00:00
Alan Cox
619a8a2bb1 [WATCHDOG 38/57] stg7240_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:39:38 +00:00
Alan Cox
1780de4140 [WATCHDOG 37/57] sbc60xxwdt: clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:24:34 +00:00
Alan Cox
f19e031265 [WATCHDOG 36/57] sa1100_wdt: Switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:22:30 +00:00
Alan Cox
edef7a93f9 [WATCHDOG 35/57] s3c2410: watchdog cleanup and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:10:15 +00:00
Alan Cox
72d5c0505b [WATCHDOG 34/57] rm9k_wdt: clean up
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 14:01:31 +00:00
Alan Cox
84ca995c25 [WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setup
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-21 12:19:03 +00:00
Linus Torvalds
1f6ef23429 [watchdog] hpwdt: fix use of inline assembly
The inline assembly in drivers/watchdog/hpwdt.c was incredibly broken,
and included all the function prologue and epilogue stuff, even though
it was itself then inside a C function where the compiler would add its
own prologue and epilogue on top of it all.

This then just _happened_ to work if you had exactly the right compiler
version and exactly the right compiler flags, so that gcc just happened
to not create any prologue at all (the gcc-generated epilogue wouldn't
matter, since it would never be reached).

But the more proper way to fix it is to simply not do this.  Move the
inline asm to the top level, with no surrounding function at all (the
better alternative would be to remove the prologue and make it actually
use proper description of the arguments to the inline asm, but that's a
bigger change than the one I'm willing to make right now).

Tested-by: S.Çağlar Onur <caglar@pardus.org.tr>
Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-20 12:25:34 -07:00
Wim Van Sebroeck
fdf7be6f13 Revert "[WATCHDOG] hpwdt: Fix NMI handling."
The old setup works better.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-18 16:22:48 +00:00
Thomas Mingarelli
4dc7347a3b [WATCHDOG] hpwdt: Add CFLAGS to get driver working
To get this driver working we need the CFLAGS_hpwdt.o += -O in the Makefile.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-17 20:58:03 +00:00
Thomas Mingarelli
58c2709c2b Revert "[WATCHDOG] make watchdog/hpwdt.c:asminline_call() static"
The driver needs the asmlinkage tag and the CFLAGS line in the Makefile.
Without it the driver doesn't work.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-17 20:43:48 +00:00
Alan Cox
261dcc70aa [WATCHDOG 32/57] pcwd: clean up, unlocked_ioctl usage
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 20:21:19 +00:00
Alan Cox
aee334c23c [WATCHDOG 31/57] pc87413_wdt: clean up, coding style, unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 20:14:03 +00:00
Alan Cox
12b9df7d21 [WATCHDOG 30/57] omap_wdt: locking, unlocked_ioctl, tidy
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 20:07:20 +00:00
Alan Cox
a86b849868 [WATCHDOG 29/57] mv64x60_wdt: clean up and locking checks
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 20:02:51 +00:00
Alan Cox
ed78c2da14 [WATCHDOG 28/57] mtx-1_wdt: clean up, coding style, unlocked ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:58:05 +00:00
Alan Cox
83ab1a53f2 [WATCHDOG 27/57] mpcore watchdog: unlocked_ioctl and BKl work
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:51:55 +00:00
Alan Cox
f26ef3dc69 [WATCHDOG 26/57] mpc watchdog: clean up and locking
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:44:39 +00:00
Alan Cox
3930964532 [WATCHDOG 25/57] mixcomwd: coding style locking, unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:35:42 +00:00
Alan Cox
325ea4d3a8 [WATCHDOG 24/57] machzwd: clean up, coding style, unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:25:38 +00:00
Alan Cox
f4fabce15b [WATCHDOG 23/57] ks8695_wdt: clean up, coding style, unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:14:19 +00:00
Alan Cox
20d35f3e50 [WATCHDOG 22/57] ixp4xx_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 19:09:26 +00:00
Alan Cox
640b4f6857 [WATCHDOG 21/57] ixp2000_wdt: clean up and unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 18:57:01 +00:00
Alan Cox
00e9c2059a [WATCHDOG 20/57] booke watchdog: clean up and unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-13 18:49:29 +00:00
Alan Cox
9a5f50d34b [WATCHDOG 19/57] bfin: watchdog cleanup and unlocked_ioctl
Scan, tidy and check for unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-07 07:50:37 +00:00
Ingo Molnar
57f50ca127 drivers/watchdog/geodewdt.c: build fix
* Wim Van Sebroeck <wim@iguana.be> wrote:

> Author: Jordan Crouse <jordan.crouse@amd.com>
> Date:   Mon Jan 21 10:07:00 2008 -0700
>
>     [WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers

-tip testing found the following build failure on latest -git:

  drivers/watchdog/geodewdt.c: In function 'geodewdt_probe':
  drivers/watchdog/geodewdt.c:225: error: too many arguments to function 'geode_mfgpt_alloc_timer'
  make[1]: *** [drivers/watchdog/geodewdt.o] Error 1
  make: *** [drivers/watchdog/geodewdt.o] Error 2

with this config:

  http://redhat.com/~mingo/misc/config-Fri_May_30_15_19_52_CEST_2008.bad

find the fix below.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30 10:16:58 -07:00
Alan Cox
0e6fa3fb38 [WATCHDOG 18/57] iTCO: unlocked_ioctl, coding style and cleanup
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-28 11:51:32 +00:00
Alan Cox
30abcec145 [WATCHDOG 17/57] it8712f: unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 20:32:56 +00:00
Alan Cox
02e3814e19 [WATCHDOG 16/57] iop: watchdog switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 20:26:17 +00:00
Alan Cox
9b9dbcca3f [WATCHDOG 15/57] indydog: Clean up and tidy
Switch to unlocked_ioctl as well

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 20:22:29 +00:00
Alan Cox
02355c329a [WATCHDOG 14/57] ibmasr: coding style, locking verify
There is a new #if 0 section here which is a suggested fix for the horrible
PCI hack in the existing code. Would be good if someone with a box that uses
this device could test it.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 20:18:14 +00:00
Alan Cox
0829291ea4 [WATCHDOG 13/57] i6300esb: Style, unlocked_ioctl, cleanup
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 18:46:59 +00:00
Alan Cox
2e43ba73d4 [WATCHDOG 12/57] ib700wdt: clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 18:34:00 +00:00
Alan Cox
6513e2a038 [WATCHDOG 11/57] hpwdt: couple of include cleanups
clean-up includes

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 18:28:38 +00:00
Alan Cox
89ea242987 [WATCHDOG 10/57] eurotechwdt: unlocked_ioctl, code lock check and tidy
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:31:40 +00:00
Alan Cox
f339e2ac9d [WATCHDOG 09/57] ep93xx_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:26:54 +00:00
Alan Cox
f78b0a8f27 [WATCHDOG 08/57] davinci_wdt: unlocked_ioctl and check locking
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:26:52 +00:00
Alan Cox
6f932f18de [WATCHDOG 07/57] cpu5_wdt: switch to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:26:47 +00:00
Alan Cox
2760600da2 [WATCHDOG 06/57] at91: watchdog to unlocked_ioctl
Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:26:44 +00:00
Alan Cox
a6be8e5ff9 [WATCHDOG 05/57] atp watchdog
Switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:26:40 +00:00
Alan Cox
fbd4714907 [WATCHDOG 04/57] AR7 watchdog
Fix locking
Use unlocked_ioctl
Remove semaphores

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:26:36 +00:00
Alan Cox
173d95bc2e [WATCHDOG 03/57] ali: watchdog locking and style
Clean up and check locking

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:22:43 +00:00
Alan Cox
b6b4d9b8d0 [WATCHDOG 02/57] clean up and check advantech watchdog
Clean up the advantech watchdog code and inspect for BKL problems

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:22:40 +00:00
Alan Cox
94da1e2eff [WATCHDOG 01/57] Clean acquirewdt and check for BKL dependancies
This brings the file into line with coding style.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-27 15:22:12 +00:00
Gabriel C
a49056da03 [WATCHDOG] Add ICH9DO into the iTCO_wdt.c driver
Add the Intel ICH9DO controller ID's for the iTCO_wdt kernel driver and bump
the driver version.

Tested on an P5E-VM DO ASUS motherboard.

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-05-25 09:45:39 +00:00
Chen Gong
f172ddc61a [WATCHDOG] Fix booke_wdt.c on MPC85xx SMP system's
On Book-E SMP systems each core has its own private watchdog.  If only one
watchdog is enabled, when the core that doesn't enable the watchdog is hung,
system can't reset because no watchdog is running on it.  That's bad.  It
means we must enable watchdogs on both cores.

We can use smp_call_function() to send appropriate messages to all the other
cores to enable and update the watchdog.

Signed-off-by: Chen Gong <g.chen@freescale.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-05-25 09:43:06 +00:00
Jordan Crouse
0b36086b5d [WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers
Add a watchdog timer based on the MFGPT timers in the CS5535/CS5536
companion chips to the AMD Geode GX and LX processors.  Only caveat
is that the BIOS must provide at least a one free timer, and most
do not.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-25 09:02:17 +00:00
Mingarelli, Thomas
7f7f894c6d [WATCHDOG] hpwdt: Fix NMI handling.
I need to just return in case it's not my NMI so someone else can take a look
at it (and reset die_nmi_called to 0 in case I actually do get one that's mine
to handle).

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-25 09:01:48 +00:00
Mike Frysinger
93539b1946 [WATCHDOG] Blackfin Watchdog Driver: split platform device/driver
- split platform device/driver registering from actual watchdog device/driver
   registering so that we can cleanly load/unload
 - fixup __initdata with __initconst and __devinitdata with __devinitconst

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-25 09:01:36 +00:00
Samuel Tardieu
6fd656012b [WATCHDOG] Add w83697h_wdt early_disable option
Pádraig Brady requested the possibility of not disabling the watchdog
at module load time or kernel boot time if it had been previously enabled
in the bios. It may help rebooting the machine if it freezes before the
userland daemon kicks in.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Cc: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-25 09:00:51 +00:00
Samuel Tardieu
5794a9f412 [WATCHDOG] Make w83697h_wdt timeout option string similar to others
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-25 09:00:49 +00:00
Samuel Tardieu
03315adca7 [WATCHDOG] Make w83697h_wdt void-like functions void
Some non-exported functions always returned 0. Mark them void instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-05-25 09:00:47 +00:00
Matthew Wilcox
6188e10d38 Convert asm/semaphore.h users to linux/semaphore.h
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:22:54 -04:00
Kay Sievers
f37d193c7c watchdog: fix platform driver hotplug/coldplug
Since 43cc71eed1, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable watchdog
drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-11 08:06:44 -07:00
Andrew Paprocki
cc1020f15a [WATCHDOG] it8712f_wdt Zero MSB timeout byte when disabling watchdog
I noticed this while testing the latest code. I'm not sure if it is required,
but the normal (or LSB) timeout value is set to zero, so the MSB should
be as well to stay consistent.

If the chip revision is >= 8, set MSB of the 16-bit timeout value to zero
when disabling the watchdog in it8712f_wdt_disable().

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-04-06 19:12:22 +00:00
Oliver Schuster
0e45adb8f5 [WATCHDOG] Fix it8712f_wdt.c wrong byte order accessing WDT_TIMEOUT
This patch corrects an error in the driver it8712f_wdt.  You cannot set
the 16-bit WDT_TIMEOUT access as a 16-bit outw, because the byte
ordering will be wrong.  So just do the high 8 bits as a separate
access.

Signed-off-by: Oliver Schuster <olivers137@aol.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-01 11:31:05 -07:00
Adrian Bunk
8b1266f43d [WATCHDOG] make watchdog/hpwdt.c:asminline_call() static
This patch makes the needlessly global asminline_call() static and 
removes the not required "asmlinkage".

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@linux-foundation.org>
2008-03-06 21:32:21 +00:00
Florian Fainelli
996d62d449 [WATCHDOG] Remove volatiles from watchdog device structures
Remove the volatile since those are useless in such a structure.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-03-06 11:30:32 +00:00