Commit Graph

169 Commits (73d98ff0fa8d9074792b7273f57d9f92810104c6)

Author SHA1 Message Date
Akinobu Mita 150ed8ed63 [WATCHDOG] sc1200wdt.c pnp unregister fix.
If no devices found or invalid parameter is specified,
scl200wdt_pnp_driver is left unregistered.
It breaks global list of pnp drivers.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-29 22:09:32 +01:00
Linus Torvalds 6d03a68e6d Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (33 commits)
  [WATCHDOG] remove experimental on iTCO_wdt.c
  [WATCHDOG] Atmel AT91RM9200 rename.
  [WATCHDOG] includes for sample watchdog program.
  [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
  [WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2)
  [WATCHDOG] add ich8 support to iTCO_wdt.c
  [WATCHDOG] ioremap balanced with iounmap for drivers/char/watchdog/s3c2410_wdt.c
  [WATCHDOG] w83697hf/hg WDT driver - Kconfig patch
  [WATCHDOG] w83697hf/hg WDT driver - autodetect patch
  [WATCHDOG] w83697hf/hg WDT driver - patch 16
  [WATCHDOG] w83697hf/hg WDT driver - patch 15
  [WATCHDOG] w83697hf/hg WDT driver - patch 14
  [WATCHDOG] w83697hf/hg WDT driver - patch 13
  [WATCHDOG] w83697hf/hg WDT driver - patch 12
  [WATCHDOG] w83697hf/hg WDT driver - patch 11
  [WATCHDOG] w83697hf/hg WDT driver - patch 10
  [WATCHDOG] w83697hf/hg WDT driver - patch 9
  [WATCHDOG] w83697hf/hg WDT driver - patch 8
  [WATCHDOG] w83697hf/hg WDT driver - patch 7
  [WATCHDOG] w83697hf/hg WDT driver - patch 6
  ...
2006-10-23 15:56:26 -07:00
Ben Collins 5cacb9f8bc [alim7101] Add pci dev table for auto module loading.
Also fixes comment for nowayout module param.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:24:30 -04:00
Wim Van Sebroeck cbf40d3f04 [WATCHDOG] remove experimental on iTCO_wdt.c
The iTCO_wdt.c driver has been tested enough. So we can
remove the experimental classification.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-14 20:18:47 +02:00
Andrew Victor bdcff3458f [WATCHDOG] Atmel AT91RM9200 rename.
The new Atmel AT91SAM9261 and AT91SAM9260 processors use a different
internal watchdog peripheral.  This watchdog driver is therefore
AT91RM9200-specific.

This patch renames at91_wdt.c to at91rm9200_wdt.c, and changes the name
of the configuration option.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-13 23:10:39 +02:00
Jeff Garzik 80060362aa [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
gcc emits the following warning:

drivers/char/watchdog/iTCO_wdt.c: In function ‘iTCO_wdt_ioctl’:
drivers/char/watchdog/iTCO_wdt.c:429: warning: ‘time_left’ may be used uninitialized in this function

This indicates a condition near enough to a bug, to want to fix.
iTCO_wdt_get_timeleft() stores a value in 'time_left' iff
iTCO_version==(1 or 2).  This driver only supports versions
1 or 2, so this is ok.  However, since (a) the return value of
iTCO_wdt_get_timeleft() is handled anyway, (b) it fixes the warning,
and (c) it future-proofs the driver, we go ahead and add the obvious
return value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-11 23:12:31 +02:00
Wim Van Sebroeck a8edd74e44 [WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2)
Add ICH8 support to the iTCO_wdt driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-08 21:05:21 +02:00
Arnaud Patard (Rtp) bcbf25bd0d [WATCHDOG] add ich8 support to iTCO_wdt.c
Add ICH8 support to the iTCO_wdt driver.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-08 20:44:04 +02:00
Amol Lad e34477e990 [WATCHDOG] ioremap balanced with iounmap for drivers/char/watchdog/s3c2410_wdt.c
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-07 22:43:56 +02:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Samuel Tardieu ff02cfc76a [WATCHDOG] w83697hf/hg WDT driver - Kconfig patch
Update Kconfig for the w83697hf/hg watchdog driver.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:54:26 +02:00
Wim Van Sebroeck e223f01a82 [WATCHDOG] w83697hf/hg WDT driver - autodetect patch
Change the autodetect code so that it is more generic.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:35 +02:00
Samuel Tardieu 3fdee8db01 [WATCHDOG] w83697hf/hg WDT driver - patch 16
This is patch 16 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Add copyright notice for Samuel Tardieu also.

This is the last patch in this series. 

The original description for Samuel's driver was:
driver for the Winbond W83697HF/W83697HG watchdog timer

The Winbond SuperIO W83697HF/HG includes a watchdog that can count from
1 to 255 seconds (or minutes). This drivers allows the seconds mode to
be used. It exposes a standard /dev/watchdog interface. This chip is
currently being used on some motherboards designed by VIA.

By default, the module looks for a chip at I/O port 0x2e. The chip can
be configured to be at 0x4e on some motherboards, the address can be
chosen using the wdt_io module parameter. Using 0 will try to autodetect
the address.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:22 +02:00
Samuel Tardieu b7b9868ba6 [WATCHDOG] w83697hf/hg WDT driver - patch 15
This is patch 15 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Clean-up initialization code - part 2: 
   * the line reading "set second mode & disable keyboard ..."
     is plain wrong, the register being manipulated (CRF4) is
     the counter itself, not the control byte (CRF3) -- looks
     like it has been copied from another driver.
   * I think garbage is being written in CRF3 (the control word)
     as the timeout value is being stored in this register (such
     as 60 for 60 seconds).
   * We only want to set pin 119 to WDTO# mode and leave the rest
     of CR29 like it is.
   * Set count mode to seconds and not minutes.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:11 +02:00
Samuel Tardieu fa69afd3c2 [WATCHDOG] w83697hf/hg WDT driver - patch 14
This is patch 14 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Clean-up initialization code (part 1: remove
   w83697hf_select_wd_register() and
   w83697hf_unselect_wd_register() functions).
 - Make sure that the watchdog device is stopped
   as soon as we found it.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:00 +02:00
Samuel Tardieu 089d8139f4 [WATCHDOG] w83697hf/hg WDT driver - patch 13
This is patch 13 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Remove wdt_ctrl (it has been replaced with the
   w83697hf_write_timeout() function) and redo/clean-up
   the start/stop/ping code.
 - Make sure that the watchdog is enabled or disabled
   When starting or stoping the device (with a call
   to w83697hf_set_reg(0x30, ?); ).

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:42 +02:00
Samuel Tardieu d46ab596e2 [WATCHDOG] w83697hf/hg WDT driver - patch 12
This is patch 12 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Add w83697hf_write_timeout() to set the
   watchdog's timeout value.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:30 +02:00
Samuel Tardieu a7933e05d4 [WATCHDOG] w83697hf/hg WDT driver - patch 11
This is patch 11 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Add w83697hf_select_wdt() and w83697hf_deselect_wdt()
   so that the start/stop/ping code can directly talk to
   the watchdog.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:21 +02:00
Samuel Tardieu c81b299625 [WATCHDOG] w83697hf/hg WDT driver - patch 10
This is patch 10 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - check whether the device is really present
   (we *can* probe for the device now).

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:11 +02:00
Samuel Tardieu 0cd544763b [WATCHDOG] w83697hf/hg WDT driver - patch 9
This is patch 9 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - add w83697hf_get_reg() and w83697hf_set_reg()
   functions.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:59 +02:00
Samuel Tardieu fe851ebade [WATCHDOG] w83697hf/hg WDT driver - patch 8
This is patch 8 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - add w83697hf_lock function to leave the
   chipsets extended function mode.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:47 +02:00
Samuel Tardieu f7be3328b6 [WATCHDOG] w83697hf/hg WDT driver - patch 7
This is patch 7 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - add w83697hf_unlock function to enter the
   chipsets extended function mode.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:33 +02:00
Samuel Tardieu de710d6871 [WATCHDOG] w83697hf/hg WDT driver - patch 6
This is patch 6 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - The driver works for both the w83697hf
   and the w83697hg chipset's.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:21 +02:00
Samuel Tardieu 44d7d3282b [WATCHDOG] w83697hf/hg WDT driver - patch 5
This is patch 5 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Rename the Extended Function Registers to the names
   used in the data-sheet.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:08 +02:00
Samuel Tardieu eb64419e39 [WATCHDOG] w83697hf/hg WDT driver - patch 4
This is patch 4 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - limits the watchdog timeout to 1-63 while this
   device accepts 1-255.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:39 +02:00
Samuel Tardieu db16525e63 [WATCHDOG] w83697hf/hg WDT driver - patch 3
This is patch 3 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Fix identation.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:23 +02:00
Samuel Tardieu b41a9f59d1 [WATCHDOG] w83697hf/hg WDT driver - patch 2
This is patch 2 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - wdt_io is 2 bytes long. We should do a
   request_region for 2 bytes instead of 1.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:13 +02:00
Samuel Tardieu 8de6fc1e20 [WATCHDOG] w83697hf/hg WDT driver - patch 1
This is patch 1 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - the note concerning tyan motherboards has been copied from
   another driver, This doesn't apply here.
 - the comments concerning CRF6 are wrong as CRF3 is manipulated
   and CRF6 is never read nor written.
 - the comments concerning CRF5 are wrong as CRF4 is manipulated
   and CRF5 is never read nor written.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:03 +02:00
Wim Van Sebroeck 196f29c8e8 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-04 22:42:19 +02:00
Wim Van Sebroeck c310e2b950 [WATCHDOG] Kconfig clean up
fixed some more trailing spaces.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:42:07 +02:00
Wim Van Sebroeck ab9d441425 [WATCHDOG] w836?7hf_wdt spinlock fixes.
Add io spinlocks to prevent possible race
conditions between start and stop operations
that are issued from different child processes
where the master process opened /dev/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:41:48 +02:00
Wim Van Sebroeck e0845bf4e1 [WATCHDOG] Kconfig clean-up
* fix typo's according to spellings checker
* Fix some leading and trailing spaces

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:41:37 +02:00
Marcus Junker f9a8c8913a [WATCHDOG] w83697hf WDT driver
New watchdog driver for the Winbond W83697HF chipset.
 
Signed-off-by: Marcus Junker <junker@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:41:07 +02:00
Wim Van Sebroeck aa1fd4d7c3 [WATCHDOG] Winbond SMsC37B787 watchdog fixes
* Added io spinlocking
* Deleted WATCHDOG_MINOR (it's in the miscdevice include
* Changed timer_enabled to use set_bit functions
* WDIOC_GETSUPPORT should return -EFAULT or 0
* timeout should be correct before we initialize the watchdog
* we should initialize the watchdog before we give access
  to userspace
* Third parameter of module_param is not the default or
  initial value

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:36:42 +02:00
Wim Van Sebroeck 8386c8cfb2 [WATCHDOG] Winbond SMsC37B787 - remove trailing whitespace
Remove trailing whitespace.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:36:30 +02:00
Sven Anders 485ae77dc7 [WATCHDOG] Winbond SMsC37B787 watchdog driver
New watchdog driver for the Winbond SMsC37B787 chipset.
 
Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:36:02 +02:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Linus Torvalds 708e16892e Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (39 commits)
  Add missing maintainer countries in CREDITS
  Fix bytes <-> kilobytes  typo in Kconfig for ramdisk
  fix a typo in Documentation/pi-futex.txt
  BUG_ON conversion for fs/xfs/
  BUG_ON() conversion in fs/nfsd/
  BUG_ON conversion for fs/reiserfs
  BUG_ON cleanups in arch/i386
  BUG_ON cleanup in drivers/net/tokenring/
  BUG_ON cleanup for drivers/md/
  kerneldoc-typo in led-class.c
  debugfs: spelling fix
  rcutorture: Fix incorrect description of default for nreaders parameter
  parport: Remove space in function calls
  Michal Wronski: update contact info
  Spelling fix: "control" instead of "cotrol"
  reboot parameter in Documentation/kernel-parameters.txt
  Fix copy&waste bug in comment in scripts/kernel-doc
  remove duplicate "until" from kernel/workqueue.c
  ite_gpio fix tabbage
  fix file specification in comments
  ...

Fixed trivial path conflicts due to removed files:
   arch/mips/dec/boot/decstation.c, drivers/char/ite_gpio.c
2006-10-03 16:35:11 -07:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Wim Van Sebroeck f311896a99 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-03 22:51:18 +02:00
Wim Van Sebroeck 1bef84bea2 [WATCHDOG] iTCO_wdt.c shutdown patch
Since we are using the device driver model,
we don't need to arrange the shutdown via a
reboot_notifier.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:35:09 +02:00
Wim Van Sebroeck 4802c6533a [WATCHDOG] iTCO_wdt.c - pci_dev_put fix
for_each_pci_dev calls pci_get_device (and thus
it calls pci_dev_get). So we need to do a pci_dev_put
to keep the refcounting correct.
(Thanks to Jiri Slaby <jirislaby@gmail.com>)

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:34:56 +02:00
Wim Van Sebroeck 3836cc0ff8 [WATCHDOG] iTCO_wdt (Intel TCO Timer) driver
Convert the iTCO_wdt driver to a platform device
driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:34:46 +02:00
Wim Van Sebroeck 9e0ea345ff [WATCHDOG] iTCO_wdt (Intel TCO Timer) driver
Hardware driver for the intel TCO timer based watchdog devices.
These drivers are included in the Intel 82801 I/O Controller
Hub family (from ICH0 up to ICH7) and in the Intel 6300ESB
controller hub.

This driver will replace the i8xx_tco.c driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:34:29 +02:00
Dave Jones 11dc10195a [WATCHDOG] improve machzwd detection
On a machine with no machzwd, loading the module prints out..

machzwd: MachZ ZF-Logic Watchdog driver initializing.
0xffff
machzwd: Watchdog using action = RESET

- the 0xffff printk is unnecessary
- 0xffff seems to be 'hardware not present'
- fix CodingStyle. (This driver could use some more work here)

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-02 23:14:38 +02:00
Samuel Tardieu 795b89d207 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-02 23:08:34 +02:00
Ben Dooks 25ff3780d4 [WATCHDOG] s3c24XX nowayout
If the driver is not configured for `no way out`,
then the open method should not automatically allow
the setting of allow_close to CLOSE_STATE_ALLOW.

The setting of allow_close nullifies the use of
the magic close via the write path. It means that
in the default state, the watchdog will shut-down
even if the magic close has not been issued.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2006-10-02 23:07:18 +02:00
Vitaly Wool 65a64ec3b4 [WATCHDOG] pnx4008: add cpu_relax()
Added cpu_relax as suggested by Alan Cox.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:38 +02:00
Wim Van Sebroeck 99d2853ac9 [WATCHDOG] pnx4008_wdt.c - spinlock fixes.
Add io spinlocks to prevent possible race
conditions between start and stop operations
that are issued from different child processes
where the master process opened /dev/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:28 +02:00
Wim Van Sebroeck f676449785 [WATCHDOG] pnx4008_wdt.c - remove patch
Change remove code so that we first detach
the driver from userspace, then clean up the
clock and then clean up the memory we allocated.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:16 +02:00