v2.6.27-rc patches
Subsystems (8)
Hi Linus,
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
This will update the following files:
drivers/watchdog/Kconfig | 16 - drivers/watchdog/Makefile | 4 drivers/watchdog/acquirewdt.c | 130 ++++----- drivers/watchdog/advantechwdt.c | 162 +++++------ drivers/watchdog/alim1535_wdt.c | 189 ++++++------- drivers/watchdog/alim7101_wdt.c | 228 ++++++++-------- drivers/watchdog/ar7_wdt.c | 8 drivers/watchdog/at32ap700x_wdt.c | 43 +-- drivers/watchdog/at91rm9200_wdt.c | 108 +++---- drivers/watchdog/bfin_wdt.c | 147 +++++----- drivers/watchdog/booke_wdt.c | 44 +-- drivers/watchdog/cpu5wdt.c | 144 +++++----- drivers/watchdog/davinci_wdt.c | 19 - drivers/watchdog/ep93xx_wdt.c | 27 + drivers/watchdog/eurotechwdt.c | 95 +++--- drivers/watchdog/geodewdt.c | 96 +++---- drivers/watchdog/hpwdt.c | 6 drivers/watchdog/i6300esb.c | 366 +++++++++++++------------- drivers/watchdog/iTCO_vendor.h | 15 + drivers/watchdog/iTCO_vendor_support.c | 62 ++-- drivers/watchdog/iTCO_wdt.c | 310 +++++++++++----------- drivers/watchdog/ib700wdt.c | 123 ++++----- drivers/watchdog/ibmasr.c | 151 ++++++----- drivers/watchdog/indydog.c | 114 ++++---- drivers/watchdog/iop_wdt.c | 62 ++-- drivers/watchdog/it8712f_wdt.c | 6 drivers/watchdog/ixp2000_wdt.c | 60 ++-- drivers/watchdog/ixp4xx_wdt.c | 66 ++-- drivers/watchdog/ks8695_wdt.c | 119 ++++---- drivers/watchdog/machzwd.c | 108 ++----- drivers/watchdog/mixcomwd.c | 133 ++++----- drivers/watchdog/mpc5200_wdt.c | 24 + drivers/watchdog/mpc83xx_wdt.c | 230 ---------------- drivers/watchdog/mpc8xx_wdt.c | 37 +- drivers/watchdog/mpc8xxx_wdt.c | 316 +++++++++++++++++++++++ drivers/watchdog/mpcore_wdt.c | 73 +++-- drivers/watchdog/mtx-1_wdt.c | 111 +++----- drivers/watchdog/mv64x60_wdt.c | 21 - drivers/watchdog/omap_wdt.c | 42 +-- drivers/watchdog/pc87413_wdt.c | 249 +++++++----------- drivers/watchdog/pcwd.c | 191 +++++++------- drivers/watchdog/pcwd_pci.c | 161 +++++------ drivers/watchdog/pcwd_usb.c | 168 ++++++------ drivers/watchdog/pnx4008_wdt.c | 28 -- drivers/watchdog/rm9k_wdt.c | 34 +- drivers/watchdog/s3c2410_wdt.c | 4 drivers/watchdog/sa1100_wdt.c | 42 +-- drivers/watchdog/sb_wdog.c | 92 +++--- drivers/watchdog/sbc60xxwdt.c | 223 ++++++++-------- drivers/watchdog/sbc7240_wdt.c | 70 ++--- drivers/watchdog/sbc8360.c | 46 +-- drivers/watchdog/sbc_epx_c3.c | 22 - drivers/watchdog/sc1200wdt.c | 39 +- drivers/watchdog/sc520_wdt.c | 162 ++++++----- drivers/watchdog/scx200_wdt.c | 65 ++-- drivers/watchdog/shwdt.c | 139 ++++++---- drivers/watchdog/smsc37b787_wdt.c | 448 ++++++++++++++++----------------- drivers/watchdog/softdog.c | 87 +++--- drivers/watchdog/txx9wdt.c | 37 +- drivers/watchdog/w83627hf_wdt.c | 190 ++++++------- drivers/watchdog/w83697hf_wdt.c | 189 ++++++------- drivers/watchdog/w83877f_wdt.c | 199 +++++++------- drivers/watchdog/w83977f_wdt.c | 239 ++++++++--------- drivers/watchdog/wafer5823wdt.c | 132 +++++---- drivers/watchdog/wd501p.h | 2 drivers/watchdog/wdrtas.c | 105 +++---- drivers/watchdog/wdt.c | 4 drivers/watchdog/wdt285.c | 31 +- drivers/watchdog/wdt977.c | 162 +++++------ drivers/watchdog/wdt_pci.c | 8 70 files changed, 3837 insertions(+), 3746 deletions(-)
with these Changes:
Author: Wim Van Sebroeck <[email protected]> Date: Wed Aug 6 20:19:41 2008 +0000
[WATCHDOG] more coding style clean-up's
More coding style clean-up's.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 18 19:59:48 2008 +0000
[WATCHDOG] sbc8360.c - move stop code into a function
Move the sbc8360.c watchdog stop code into a seperate function.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 18 11:41:17 2008 +0000
[WATCHDOG] Coding style - Indentation - part 2
This brings the watchdog drivers into line with coding style. This patch takes cares of the indentation as described in chapter 1. Main changes:
* Re-structure the ioctl switch call for all drivers as follows:
switch (cmd) {
case WDIOC_GETSUPPORT:
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
case WDIOC_GETTEMP:
case WDIOC_SETOPTIONS:
case WDIOC_KEEPALIVE:
case WDIOC_SETTIMEOUT:
case WDIOC_GETTIMEOUT:
case WDIOC_GETTIMELEFT:
default:
}
This to make the migration from the drivers to the uniform watchdog device driver easier in the future.
Author: Wim Van Sebroeck <[email protected]> Date: Thu Jul 17 18:08:47 2008 +0000
[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.
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:36 2008 -0700
[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.
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:36 2008 -0700
[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
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:35 2008 -0700
[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.
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:34 2008 -0700
[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).
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:34 2008 -0700
[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.
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:32 2008 -0700
[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.
Author: Alan Cox <[email protected]> Date: Thu Jul 3 23:51:32 2008 -0700
[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
Author: Wim Van Sebroeck <[email protected]> Date: Tue Jul 15 11:46:11 2008 +0000
[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.
Author: Wim Van Sebroeck <[email protected]> Date: Tue Jul 15 11:18:04 2008 +0000
[WATCHDOG] hpwdt.c - fix double includes
The last clean-up created 2 times the same include. delete the doubles.
Merge: 0967d61... 7c4be5a...
Author: Wim Van Sebroeck <[email protected]>
Date: Wed Aug 6 11:58:26 2008 +0000
[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
Author: Alan Cox <[email protected]> Date: Mon May 19 14:10:02 2008 +0100
[WATCHDOG 57/57] wdt501/pci: Clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:57 2008 +0100
[WATCHDOG 56/57] wdt977: clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:51 2008 +0100
[WATCHDOG 55/57] wdt285: switch to unlocked_ioctl and tidy up oddments of coding style
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:45 2008 +0100
[WATCHDOG 54/57] wdrtas: clean up, coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:40 2008 +0100
[WATCHDOG 53/57] wafer5823wdt: Clean up, coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:34 2008 +0100
[WATCHDOG 52/57] w83977f_wdt: clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:29 2008 +0100
[WATCHDOG 51/57] w83877f_wdt: clean up code, coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:23 2008 +0100
[WATCHDOG 50/57] w83697hf_wdt: cleanup, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:18 2008 +0100
[WATCHDOG 49/57] w83627hf: coding style, clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:12 2008 +0100
[WATCHDOG 48/57] txx9: Fix locking, switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:06 2008 +0100
[WATCHDOG 47/57] softdog: clean up, coding style and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:09:00 2008 +0100
[WATCHDOG 46/57] smsc37b787_wdt: coding style, switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:55 2008 +0100
[WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:49 2008 +0100
[WATCHDOG 44/57] scx200_wdt: clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:44 2008 +0100
[WATCHDOG 43/57] sc520_wdt: Clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:38 2008 +0100
[WATCHDOG 42/57] sc1200_wdt: clean up, fix locking and use unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:33 2008 +0100
[WATCHDOG 41/57] sb_wdog: Clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:27 2008 +0100
[WATCHDOG 40/57] sbc_epx_c3_wdt: switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:22 2008 +0100
[WATCHDOG 39/57] sbc8360: clean up
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:16 2008 +0100
[WATCHDOG 38/57] stg7240_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:11 2008 +0100
[WATCHDOG 37/57] sbc60xxwdt: clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:05 2008 +0100
[WATCHDOG 36/57] sa1100_wdt: Switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:08:00 2008 +0100
[WATCHDOG 35/57] s3c2410: watchdog cleanup and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:54 2008 +0100
[WATCHDOG 34/57] rm9k_wdt: clean up
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:48 2008 +0100
[WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setup
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:43 2008 +0100
[WATCHDOG 32/57] pcwd: clean up, unlocked_ioctl usage
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:37 2008 +0100
[WATCHDOG 31/57] pc87413_wdt: clean up, coding style, unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:32 2008 +0100
[WATCHDOG 30/57] omap_wdt: locking, unlocked_ioctl, tidy
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:26 2008 +0100
[WATCHDOG 29/57] mv64x60_wdt: clean up and locking checks
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:21 2008 +0100
[WATCHDOG 28/57] mtx-1_wdt: clean up, coding style, unlocked ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:15 2008 +0100
[WATCHDOG 27/57] mpcore watchdog: unlocked_ioctl and BKl work
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:09 2008 +0100
[WATCHDOG 26/57] mpc watchdog: clean up and locking
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:07:04 2008 +0100
[WATCHDOG 25/57] mixcomwd: coding style locking, unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:59 2008 +0100
[WATCHDOG 24/57] machzwd: clean up, coding style, unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:53 2008 +0100
[WATCHDOG 23/57] ks8695_wdt: clean up, coding style, unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:48 2008 +0100
[WATCHDOG 22/57] ixp4xx_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:42 2008 +0100
[WATCHDOG 21/57] ixp2000_wdt: clean up and unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:36 2008 +0100
[WATCHDOG 20/57] booke watchdog: clean up and unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:30 2008 +0100
[WATCHDOG 19/57] bfin: watchdog cleanup and unlocked_ioctl
Scan, tidy and check for unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:25 2008 +0100
[WATCHDOG 18/57] iTCO: unlocked_ioctl, coding style and cleanup
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:19 2008 +0100
[WATCHDOG 17/57] it8712f: unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:14 2008 +0100
[WATCHDOG 16/57] iop: watchdog switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:08 2008 +0100
[WATCHDOG 15/57] indydog: Clean up and tidy
Switch to unlocked_ioctl as well
Author: Alan Cox <[email protected]> Date: Mon May 19 14:06:03 2008 +0100
[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.
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:57 2008 +0100
[WATCHDOG 13/57] i6300esb: Style, unlocked_ioctl, cleanup
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:52 2008 +0100
[WATCHDOG 12/57] ib700wdt: clean up and switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:46 2008 +0100
[WATCHDOG 11/57] hpwdt: couple of include cleanups
clean-up includes
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:41 2008 +0100
[WATCHDOG 10/57] eurotechwdt: unlocked_ioctl, code lock check and tidy
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:35 2008 +0100
[WATCHDOG 09/57] ep93xx_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:30 2008 +0100
[WATCHDOG 08/57] davinci_wdt: unlocked_ioctl and check locking
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:24 2008 +0100
[WATCHDOG 07/57] cpu5_wdt: switch to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:19 2008 +0100
[WATCHDOG 06/57] at91: watchdog to unlocked_ioctl
Review and switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:13 2008 +0100
[WATCHDOG 05/57] atp watchdog
Switch to unlocked_ioctl
Author: Alan Cox <[email protected]> Date: Mon May 19 14:05:07 2008 +0100
[WATCHDOG 04/57] AR7 watchdog
Fix locking
Use unlocked_ioctl
Remove semaphores
Author: Alan Cox <[email protected]> Date: Mon May 19 14:04:57 2008 +0100
[WATCHDOG 03/57] ali: watchdog locking and style
Clean up and check locking
Author: Alan Cox <[email protected]> Date: Mon May 19 14:04:51 2008 +0100
[WATCHDOG 02/57] clean up and check advantech watchdog
Clean up the advantech watchdog code and inspect for BKL problems
Author: Alan Cox <[email protected]> Date: Mon May 19 14:04:46 2008 +0100
[WATCHDOG 01/57] Clean acquirewdt and check for BKL dependancies
This brings the file into line with coding style.
The Changes can also be looked at on:
http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-2.6-watchdog.git;a=summary
For completeness, I added the overal diff below.
Greetings,
Wim.
================================================================================
drivers/watchdog/Kconfig +12 -4
@@ -463,7 +463,7 @@ config PC87413_WDT module will be called pc87413_wdt. Most people will say N. - + config 60XX_WDT tristate "SBC-60XX Watchdog Timer" depends on X86
@@ -695,9 +695,17 @@ config 8xx_WDT tristate "MPC8xx Watchdog Timer" depends on 8xx -config 83xx_WDT - tristate "MPC83xx Watchdog Timer" - depends on PPC_83xx +config 8xxx_WDT + tristate "MPC8xxx Platform Watchdog Timer" + depends on PPC_8xx || PPC_83xx || PPC_86xx + help + This driver is for a SoC level watchdog that exists on some + Freescale PowerPC processors. So far this driver supports: + - MPC8xx watchdogs + - MPC83xx watchdogs + - MPC86xx watchdogs + + For BookE processors (MPC85xx) use the BOOKE_WDT driver instead. config MV64X60_WDT tristate "MV64X60 (Marvell Discovery) Watchdog Timer"
drivers/watchdog/Makefile +2 -2
@@ -92,7 +92,7 @@ obj-$(CONFIG_SBC_EPX_C3_WATCHDOG) += sbc_epx_c3.o # MIPS Architecture obj-$(CONFIG_INDYDOG) += indydog.o -obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o +obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o obj-$(CONFIG_WDT_RM9K_GPI) += rm9k_wdt.o obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
@@ -103,7 +103,7 @@ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o # POWERPC Architecture obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o -obj-$(CONFIG_83xx_WDT) += mpc83xx_wdt.o +obj-$(CONFIG_8xxx_WDT) += mpc8xxx_wdt.o obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
drivers/watchdog/acquirewdt.c +63 -67
257 lines not on this page · raw message
drivers/watchdog/advantechwdt.c +76 -86
316 lines not on this page · raw message
drivers/watchdog/alim1535_wdt.c +92 -97
310 lines not on this page · raw message
drivers/watchdog/alim7101_wdt.c +120 -108
378 lines not on this page · raw message
drivers/watchdog/ar7_wdt.c +4 -4
@@ -213,7 +213,7 @@ static int ar7_wdt_notify_sys(struct notifier_block *this, }static struct notifier_block ar7_wdt_notifier = { - .notifier_call = ar7_wdt_notify_sys + .notifier_call = ar7_wdt_notify_sys, }; static ssize_t ar7_wdt_write(struct file *file, const char *data,
@@ -230,7 +230,7 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data, expect_close =0 ;for (i =0 ; i < len; ++i) {char c; -if (get_user (c, data+i)) +if (get_user (c, data + i))return -EFAULT ;if (c =='V' ) expect_close =1 ;
@@ -251,8 +251,6 @@ static long ar7_wdt_ioctl(struct file *file,int new_margin;switch (cmd) { -default : -return -ENOTTY ;case WDIOC_GETSUPPORT :if (copy_to_user ((struct watchdog_info *)arg, &ident,sizeof (ident)))
@@ -281,6 +279,8 @@ static long ar7_wdt_ioctl(struct file *file,if (put_user (margin, (int *)arg))return -EFAULT ;return 0 ; +default : +return -ENOTTY ; } }
drivers/watchdog/at32ap700x_wdt.c +21 -22
83 lines not on this page · raw message
drivers/watchdog/at91rm9200_wdt.c +54 -54
191 lines not on this page · raw message
drivers/watchdog/bfin_wdt.c +71 -76
232 lines not on this page · raw message
drivers/watchdog/booke_wdt.c +23 -21
100 lines not on this page · raw message
drivers/watchdog/cpu5wdt.c +70 -74
256 lines not on this page · raw message
drivers/watchdog/davinci_wdt.c +9 -10
@@ -22,10 +22,10 @@#include <linux/bitops.h> #include <linux/platform_device.h> #include <linux/spinlock.h> +#include <linux/uaccess.h> +#include <linux/io.h> #include <asm/hardware.h> -#include <asm/uaccess.h> -#include <asm/io.h> #define MODULE_NAME "DAVINCI-WDT: "
@@ -143,9 +143,8 @@ static struct watchdog_info ident = { .identity = "DaVinci Watchdog", }; -static int -davinci_wdt_ioctl (struct inode *inode,struct file *file,unsigned int cmd, -unsigned long arg) +static long davinci_wdt_ioctl (struct file *file, +unsigned int cmd,unsigned long arg) {int ret = -ENOTTY ;
@@ -160,14 +159,14 @@ davinci_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ret =put_user (0 , (int *)arg);break ; -case WDIOC_GETTIMEOUT : - ret =put_user (heartbeat, (int *)arg); -break ; -case WDIOC_KEEPALIVE :wdt_service (); ret =0 ;break ; + +case WDIOC_GETTIMEOUT : + ret =put_user (heartbeat, (int *)arg); +break ; }return ret; }
@@ -184,7 +183,7 @@ static const struct file_operations davinci_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = davinci_wdt_write, - .ioctl = davinci_wdt_ioctl, + .unlocked_ioctl = davinci_wdt_ioctl, .open = davinci_wdt_open, .release = davinci_wdt_release, };
drivers/watchdog/ep93xx_wdt.c +14 -13
@@ -28,9 +28,9 @@#include <linux/miscdevice.h> #include <linux/watchdog.h> #include <linux/timer.h> +#include <linux/uaccess.h> #include <asm/hardware.h> -#include <asm/uaccess.h> #define WDT_VERSION "0.3"#define PFX "ep93xx_wdt: "
@@ -136,9 +136,8 @@ static struct watchdog_info ident = { .identity = "EP93xx Watchdog", }; -static int -ep93xx_wdt_ioctl (struct inode *inode,struct file *file,unsigned int cmd, -unsigned long arg) +static long ep93xx_wdt_ioctl (struct file *file, +unsigned int cmd,unsigned long arg) {int ret = -ENOTTY ;
@@ -156,15 +155,15 @@ ep93xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ret =put_user (boot_status, (int __user *)arg);break ; -case WDIOC_GETTIMEOUT : -/* actually, it is 0.250 seconds.... */ - ret =put_user (1 , (int __user *)arg); -break ; -case WDIOC_KEEPALIVE :wdt_keepalive (); ret =0 ;break ; + +case WDIOC_GETTIMEOUT : +/* actually, it is 0.250 seconds.... */ + ret =put_user (1 , (int __user *)arg); +break ; }return ret; }
@@ -174,8 +173,8 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)if (test_bit (WDT_OK_TO_CLOSE , &wdt_status))wdt_shutdown ();else - printk(KERN_CRIT PFX "Device closed unexpectedly - " -"timer will not stop\n" ); + printk(KERN_CRIT PFX +"Device closed unexpectedly - timer will not stop\n" );clear_bit (WDT_IN_USE , &wdt_status);clear_bit (WDT_OK_TO_CLOSE , &wdt_status);
@@ -186,7 +185,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)static const struct file_operations ep93xx_wdt_fops = { .owner =THIS_MODULE , .write = ep93xx_wdt_write, - .ioctl = ep93xx_wdt_ioctl, + .unlocked_ioctl = ep93xx_wdt_ioctl, .open = ep93xx_wdt_open, .release = ep93xx_wdt_release, };
@@ -243,7 +242,9 @@ module_param(nowayout, int, 0);MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started" );module_param (timeout, int,0 ); -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); +MODULE_PARM_DESC (timeout, + "Watchdog timeout in seconds. (1<=timeout<=3600, default=" + __MODULE_STRING(WATCHDOG_TIMEOUT) ")");MODULE_AUTHOR ("Ray Lehtiniemi <[email protected]>," "Alessandro Zummo <[email protected]>" );
drivers/watchdog/eurotechwdt.c +54 -41
208 lines not on this page · raw message
drivers/watchdog/geodewdt.c +42 -54
187 lines not on this page · raw message
drivers/watchdog/hpwdt.c +2 -4
@@ -39,9 +39,7 @@#include <linux/string.h> #include <linux/bootmem.h> #include <linux/slab.h> -#include <asm/dmi.h> #include <asm/desc.h> -#include <asm/kdebug.h> #define PCI_BIOS32_SD_VALUE 0x5F32335F/* "_32_" */ #define CRU_BIOS_SIGNATURE_VALUE 0x55524324
@@ -407,7 +405,7 @@ static int __devinit detect_cru_service(void)dmi_walk (dmi_find_cru);/* if cru_rom_addr has been set then we found a CRU service */ -return ((cru_rom_addr !=NULL )?0 : -ENODEV ); +return ((cru_rom_addr !=NULL ) ?0 : -ENODEV ); }/* ------------------------------------------------------------------------- */
@@ -535,7 +533,7 @@ static ssize_t hpwdt_write(struct file *file, const char __user *data,/* scan to see whether or not we got the magic char. */ for (i =0 ; i != len; i++) {char c; -if (get_user (c, data+i)) +if (get_user (c, data + i))return -EFAULT ;if (c =='V' ) expect_release =42 ;
drivers/watchdog/i6300esb.c +179 -187
263 lines not on this page · raw message
drivers/watchdog/iTCO_vendor.h new file +15 -0
Lines of this file are not shown. View the raw message.
drivers/watchdog/iTCO_vendor_support.c +33 -29
62 lines not on this page · raw message
drivers/watchdog/iTCO_wdt.c +152 -158
310 lines not on this page · raw message
drivers/watchdog/ib700wdt.c +60 -63
123 lines not on this page · raw message
drivers/watchdog/ibmasr.c +88 -63
151 lines not on this page · raw message
drivers/watchdog/indydog.c +62 -52
114 lines not on this page · raw message
drivers/watchdog/iop_wdt.c +32 -30
62 lines not on this page · raw message
drivers/watchdog/ixp2000_wdt.c +28 -32
60 lines not on this page · raw message
drivers/watchdog/ixp4xx_wdt.c +29 -37
66 lines not on this page · raw message
drivers/watchdog/ks8695_wdt.c +62 -57
119 lines not on this page · raw message
drivers/watchdog/machzwd.c +40 -68
108 lines not on this page · raw message
drivers/watchdog/mixcomwd.c +63 -70
133 lines not on this page · raw message
drivers/watchdog/mpc83xx_wdt.c deleted +0 -230
230 lines not on this page · raw message
drivers/watchdog/mpc8xxx_wdt.c new file +316 -0
316 lines not on this page · raw message
drivers/watchdog/mpcore_wdt.c +42 -31
73 lines not on this page · raw message
drivers/watchdog/mtx-1_wdt.c +54 -57
111 lines not on this page · raw message
drivers/watchdog/omap_wdt.c +24 -18
42 lines not on this page · raw message
drivers/watchdog/pc87413_wdt.c +106 -143
249 lines not on this page · raw message
drivers/watchdog/pcwd.c +106 -85
191 lines not on this page · raw message
drivers/watchdog/pcwd_pci.c +77 -84
161 lines not on this page · raw message
drivers/watchdog/pcwd_usb.c +82 -86
168 lines not on this page · raw message
drivers/watchdog/sa1100_wdt.c +20 -22
42 lines not on this page · raw message
drivers/watchdog/sb_wdog.c +47 -45
92 lines not on this page · raw message
drivers/watchdog/sbc60xxwdt.c +110 -113
223 lines not on this page · raw message
drivers/watchdog/sbc7240_wdt.c +35 -35
70 lines not on this page · raw message
drivers/watchdog/sbc8360.c +23 -23
46 lines not on this page · raw message
drivers/watchdog/sc520_wdt.c +86 -76
162 lines not on this page · raw message
drivers/watchdog/scx200_wdt.c +33 -32
65 lines not on this page · raw message
drivers/watchdog/shwdt.c +82 -57
139 lines not on this page · raw message
drivers/watchdog/smsc37b787_wdt.c +225 -223
448 lines not on this page · raw message
drivers/watchdog/softdog.c +46 -41
87 lines not on this page · raw message
drivers/watchdog/w83627hf_wdt.c +90 -100
190 lines not on this page · raw message
drivers/watchdog/w83697hf_wdt.c +93 -96
189 lines not on this page · raw message
drivers/watchdog/w83877f_wdt.c +101 -98
199 lines not on this page · raw message
drivers/watchdog/w83977f_wdt.c +118 -121
239 lines not on this page · raw message
drivers/watchdog/wafer5823wdt.c +71 -61
132 lines not on this page · raw message
drivers/watchdog/wdrtas.c +42 -63
105 lines not on this page · raw message
drivers/watchdog/wdt977.c +81 -81
162 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 6 lines · Wim Van Sebroeck
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.gitThis will update the following files:
Wim, is there any reason why the new Orion driver is not included in this pull request? Or was the driver not submitted to you?
http://git.marvell.com/?p=orion.git;a=commitdiff;h=c64ce41834e774179b9769ae53eaede18e029943
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Hi Martin,
Quoted 9 lines
Quoted 6 lines
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.gitThis will update the following files:
Wim, is there any reason why the new Orion driver is not included in this pull request? Or was the driver not submitted to you?
First priority was to get the clean-up/coding style patches out. Second priority is the new drivers. That will be another patch-set.
Kind regards,
Wim.
Quoted 10 lines · Martin Michlmayr
Quoted 6 lines · Wim Van Sebroeck
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.gitThis will update the following files:
Wim, is there any reason why the new Orion driver is not included in this pull request? Or was the driver not submitted to you?
These look like fixes and cleanups, so new drivers shouldn't have been included in here.
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
Hi Wim,
Le Wednesday 06 August 2008 22:29:18 Wim Van Sebroeck, vous avez écrit :
Quoted 6 lines
Hi Linus,
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
I am not seeing the rc32434_wdt nor the rdc321x_wdt drivers, is that normal ? Do you want me to update those ?
Thanks for your answer.
Hi Florian,
Quoted 7 lines
Quoted 4 lines
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.gitI am not seeing the
rc32434_wdtnor therdc321x_wdtdrivers, is that normal ? Do you want me to update those ?
I'm putting those in the watchdog tree tonight.
I'll contact you when it's done to see if I have everything that has been discussed in the past. I'll also check for coding style on these new drivers.
Kind regards,
Wim.
Quoted 7 lines · Wim Van Sebroeck
Hi Linus,
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
Quoted 6 lines
This will update the following files:
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:36 2008 -0700[WATCHDOG]
mpc8xxx_wdt: add support for MPC8xx watchdogs
This is broken when built modular because this...
drivers/watchdog/mpc8xxx_wdt.c line 298
Quoted 2 lines
drivers/watchdog/mpc8xxx_wdt.c new file +2
-0+} +module_init (mpc8xxx_wdt_init_late);
and this ..
Quoted 1 line
+arch_initcall(mpc8xxx_wdt_init);
Can't be mixed. You end up with two init_module invocations
drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of '__inittest' drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of '__inittest' was here drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of 'init_module' drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of 'init_module' was here
Given they both call different routines though, I'm not sure the right fix here.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
PATCH 1/1 mpc8xxx_wdt: fix modular build
This patch fixes following build error when mpc8xxx_wdt is selected to build as a module:
drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of '__inittest' drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of '__inittest' was here drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of 'init_module' drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of 'init_module' was here
---
Quoted 24 lines · Dave Jones
Quoted 7 lines · Wim Van Sebroeck
Hi Linus,
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.gitQuoted 6 lines
This will update the following files:
Author: Anton Vorontsov <[email protected]> Date: Thu Jul 3 23:51:36 2008 -0700[WATCHDOG]
mpc8xxx_wdt: add support for MPC8xx watchdogsThis is broken when built modular because this...
Review
Quoted 2 lines
(quoted diff) +2
-0+} +module_init(mpc8xxx_wdt_init_late);and this ..
Quoted 1 line
+arch_initcall(mpc8xxx_wdt_init);
Quoted 8 lines
Can't be mixed. You end up with two
init_moduleinvocations
drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of '__inittest'drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of '__inittest' was heredrivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of 'init_module'drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of 'init_module' was hereGiven they both call different routines though, I'm not sure the right fix here.
Thanks for noticing!
Unfortunately I don't see any elegant way to fix this. In the long term, it would be great if we could work with misc (thus watchdog) subsystem at arch_initcall() time (yes, we need this early on 8xx). Until this happen, I think this patch is the best fix we can do.
drivers/watchdog/mpc8xxx_wdt.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
drivers/watchdog/mpc8xxx_wdt.c +10 -1
@@ -48,6 +48,7 @@ struct mpc8xxx_wdt_type { };static struct mpc8xxx_wdt __iomem *wd_base; +static int mpc8xxx_wdt_init_late (void );static u16 timeout =0xffff ;module_param (timeout, ushort,0 );
@@ -213,6 +214,12 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,else timeout_sec = timeout / freq; +#ifdef CONFIG_8xxx_WDT_MODULE + ret =mpc8xxx_wdt_init_late (); +if (ret) + goto err_unmap; +#endif +pr_info ("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " "(%d seconds)\n" , reset ?"reset" :"interrupt" , timeout, timeout_sec);
@@ -280,7 +287,7 @@ static struct of_platform_driver mpc8xxx_wdt_driver = {* very early to start pinging the watchdog (misc devices are not yet * available), and later module_init() just registers the misc device. */ -static int __init mpc8xxx_wdt_init_late (void ) +static int mpc8xxx_wdt_init_late (void ) {int ret;
@@ -295,7 +302,9 @@ static int __init mpc8xxx_wdt_init_late(void) }return 0 ; } +#ifndef CONFIG_8xxx_WDT_MODULEmodule_init (mpc8xxx_wdt_init_late); +#endif static int __init mpc8xxx_wdt_init (void ) {
Signature · 1 line
1.5.6.3
Re: [PATCH] [WATCHDOG] mpc8xxx_wdt: fix modular build
Quoted 12 lines · Anton Vorontsov
...
drivers/watchdog/mpc8xxx_wdt.c +1
-0@@ -48,6 +48,7 @@ struct mpc8xxx_wdt_type { };static struct mpc8xxx_wdt __iomem *wd_base; +static int mpc8xxx_wdt_init_late (void );static u16 timeout =0xffff ;module_param (timeout, ushort,0 );
drivers/watchdog/mpc8xxx_wdt.c static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev, · line 221
Quoted 8 lines
drivers/watchdog/mpc8xxx_wdt.c +5
-0@@ -213,6 +214,12 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,else timeout_sec = timeout / freq; +#ifdef CONFIG_8xxx_WDT_MODULE + ret =mpc8xxx_wdt_init_late (); +if (ret) + goto err_unmap; +#endif
In mpc8xxx_wdt_probe()?
Isn't mpc8xxx_wdt_init() the correct place?
Quoted 13 lines
drivers/watchdog/mpc8xxx_wdt.c +1
-1pr_info ("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " "(%d seconds)\n" , reset ?"reset" :"interrupt" , timeout, timeout_sec);@@ -280,7 +287,7 @@ static struct of_platform_driver mpc8xxx_wdt_driver = {* very early to start pinging the watchdog (misc devices are not yet * available), and later module_init() just registers the misc device. */ -static int __init mpc8xxx_wdt_init_late (void ) +static int mpc8xxx_wdt_init_late (void ) {int ret;
drivers/watchdog/mpc8xxx_wdt.c static int __init mpc8xxx_wdt_init_late(void) · line 305
Quoted 4 lines
drivers/watchdog/mpc8xxx_wdt.c +1
-0@@ -295,7 +302,9 @@ static int __init mpc8xxx_wdt_init_late(void) }return 0 ; } +#ifndef CONFIG_8xxx_WDT_MODULE
Your #ifdef is correct, but "#ifdef MODULE" would express this better.
drivers/watchdog/mpc8xxx_wdt.c static int __init mpc8xxx_wdt_init_late(void) · line 310
Quoted 5 lines
drivers/watchdog/mpc8xxx_wdt.c +1
-0module_init (mpc8xxx_wdt_init_late); +#endif static int __init mpc8xxx_wdt_init (void ) {
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [PATCH] [WATCHDOG] mpc8xxx_wdt: fix modular build
Quoted 16 lines · Adrian Bunk
Quoted 15 lines · Anton Vorontsov
...
drivers/watchdog/mpc8xxx_wdt.c +1
-0@@ -48,6 +48,7 @@ struct mpc8xxx_wdt_type { };static struct mpc8xxx_wdt __iomem *wd_base; +static int mpc8xxx_wdt_init_late (void );static u16 timeout =0xffff ;module_param (timeout, ushort,0 );@@ -213,6 +214,12 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,else timeout_sec = timeout / freq;
Quoted 7 lines
drivers/watchdog/mpc8xxx_wdt.c static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev, · line 221
Quoted 5 lines
drivers/watchdog/mpc8xxx_wdt.c +5
-0+#ifdef CONFIG_8xxx_WDT_MODULE + ret =mpc8xxx_wdt_init_late (); +if (ret) + goto err_unmap; +#endif In
mpc8xxx_wdt_probe()?
Yes.
Quoted 1 line
Isn't
mpc8xxx_wdt_init()the correct place?
Not exactly. In case of non-modular build we rely on the fact that OF devices are populated before module_init(), so _probe is executed before _init_late.
But with modules, we can do the right thing: just register the driver and await for the usual probe, then probe the wdt, and then register userspace interface. Yes, kind of complicated, but we really need this on 8xx.
Quoted 12 lines
Quoted 12 lines
drivers/watchdog/mpc8xxx_wdt.c +1
-1pr_info ("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " "(%d seconds)\n" , reset ?"reset" :"interrupt" , timeout, timeout_sec);@@ -280,7 +287,7 @@ static struct of_platform_driver mpc8xxx_wdt_driver = {* very early to start pinging the watchdog (misc devices are not yet * available), and later module_init() just registers the misc device. */ -static int __init mpc8xxx_wdt_init_late (void ) +static int mpc8xxx_wdt_init_late (void ) {int ret;
Quoted 7 lines
drivers/watchdog/mpc8xxx_wdt.c static int __init mpc8xxx_wdt_init_late(void) · line 305
Quoted 5 lines
drivers/watchdog/mpc8xxx_wdt.c +1
-0@@ -295,7 +302,9 @@ static int __init mpc8xxx_wdt_init_late(void) }return 0 ; } +#ifndef CONFIG_8xxx_WDT_MODULEYour #ifdef is correct, but "#ifdef MODULE" would express this better.
Thanks, will repost soon.
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
PATCH v2 1/1 mpc8xxx_wdt: fix modular build
In reply to Dave JonesThis patch fixes following build error when mpc8xxx_wdt is selected to build as a module:
drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of '__inittest' drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of '__inittest' was here drivers/watchdog/mpc8xxx_wdt.c:304: error: redefinition of 'init_module' drivers/watchdog/mpc8xxx_wdt.c:298: error: previous definition of 'init_module' was here
---
CONFIG_8xxx_WDT_MODULE -> MODULE, per Adrian Bunk's comment.
drivers/watchdog/mpc8xxx_wdt.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
drivers/watchdog/mpc8xxx_wdt.c +10 -1
@@ -48,6 +48,7 @@ struct mpc8xxx_wdt_type { };static struct mpc8xxx_wdt __iomem *wd_base; +static int mpc8xxx_wdt_init_late (void );static u16 timeout =0xffff ;module_param (timeout, ushort,0 );
@@ -213,6 +214,12 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,else timeout_sec = timeout / freq; +#ifdef MODULE + ret =mpc8xxx_wdt_init_late (); +if (ret) + goto err_unmap; +#endif +pr_info ("WDT driver for MPC8xxx initialized. mode:%s timeout=%d " "(%d seconds)\n" , reset ?"reset" :"interrupt" , timeout, timeout_sec);
@@ -280,7 +287,7 @@ static struct of_platform_driver mpc8xxx_wdt_driver = {* very early to start pinging the watchdog (misc devices are not yet * available), and later module_init() just registers the misc device. */ -static int __init mpc8xxx_wdt_init_late (void ) +static int mpc8xxx_wdt_init_late (void ) {int ret;
@@ -295,7 +302,9 @@ static int __init mpc8xxx_wdt_init_late(void) }return 0 ; } +#ifndef MODULE module_init (mpc8xxx_wdt_init_late); +#endif static int __init mpc8xxx_wdt_init (void ) {
Signature · 1 line
1.5.6.3