summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/shwdt.c
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: shwdt: Use finer grained clock control.Paul Mundt2012-05-101-7/+5Star
| | | | | | | | | The clk enable/disable pairs can be pushed down to start/stop rather than probe/remove, along with the runtime PM callsites. This will allow us to keep the block powered off until userspace comes along and decides to do something with it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: shwdt: Preliminary runtime PM support.Paul Mundt2012-05-101-0/+8
| | | | | | | This plugs in some trivial runtime PM support in the probe/remove and start/stop paths. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: shwdt: Basic clock framework support.Paul Mundt2012-05-101-24/+26
| | | | | | | | | | This plugs in basic clock framework support for the watchdog. As it's an optional MSTP bit, we don't particularly care if a platform has provided it or not, though a valid clock will need to be available for the more complex overflow period calculations found on newer parts -- this will be addressed later. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: shwdt: Trim down private data structure.Paul Mundt2012-05-101-3/+0Star
| | | | | | | Now that we're using the generic watchdog core, kill off unused elements from the private data structure. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: shwdt: Migrate to per-device locking.Paul Mundt2012-05-101-15/+19
| | | | | | | | Presently we've been using global locking for everything. Push the locking down to the per-device level in preparation for per-CPU watchdogs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: shwdt: Conversion to watchdog core.Paul Mundt2012-05-101-154/+44Star
| | | | | | Fairly straightforward conversion to utilize watchdog core support. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: shwdt: Migrate from reboot notifier to platform shutdown.Paul Mundt2012-05-101-31/+12Star
| | | | | | | It's possible to do the same work via the platform driver shutdown method, so wire that up and dump the reboot notifier. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* watchdog: nowayout is boolWim Van Sebroeck2012-03-271-2/+2
| | | | | | | nowayout is actually a boolean value. So make it bool for all watchdog device drivers. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: Use pr_<fmt> and pr_<level>Joe Perches2012-03-271-6/+9
| | | | | | | | | | | | Use the current logging styles. Make sure all output has a prefix. Add missing newlines. Remove now unnecessary PFX, NAME, and miscellaneous other #defines. Coalesce formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: shwdt: fix usage of mod_timerDavid Engraf2011-08-021-1/+1
| | | | | | | | | | | | | Fix the usage of mod_timer() and make the driver usable. mod_timer() must be called with an absolute timeout in jiffies. The old implementation used a relative timeout thus the hardware watchdog was never triggered. Signed-off-by: David Engraf <david.engraf@sysgo.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Wim Van sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Merge branches 'sh/wdt', 'sh/pci-express-async' and 'common/serial-rework' ↵Paul Mundt2011-01-261-1/+1
|\ | | | | | | into sh-latest
| * watchdog: fix several MODULE_PARM_DESC stringsRandy Dunlap2010-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix MODULE_PARM_DESC() strings in several watchdog drivers. Some are simple as add a parenthesis. Others are problems from __stringify() being used on a variable name instead of a macro name, so the variable name is produced in the string instead of its build-time value. In these cases, create a macro for the value so that the module param description string is useful. Only pc87413_wdt has been built (due to toolchains). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* | watchdog: shwdt: driver model conversion.Paul Mundt2010-05-251-59/+168
| | | | | | | | | | | | | | | | This is a long overdue driver model conversion for the shwdt watchdog driver. This is the initial conversion, more incremental changes to follow. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | watchdog: shwdt: Kill off mmap stub and superfluous comments.Paul Mundt2010-05-251-136/+2Star
|/ | | | | | | | The wdt mmaping thing was a special-cased hack that nothing in the wild depends on, so just kill it off. While at it, sanitize the superfluous comments in preparation for a driver rewrite and overhauled interface. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [WATCHDOG] Some more general cleanupWim Van Sebroeck2009-06-181-1/+3
| | | | | | | Clean-up the watchdog drivers so that checkpatch.pl get's happy... Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] fix watchdog/shwdt.c compilationAdrian Bunk2008-08-101-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following compile errors caused by commit 70b814ec1a484279a51bf9f7193551b996627247 ([WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_io): <-- snip --> ... CC drivers/watchdog/shwdt.o shwdt.c:64: error: 'WTCSR_CKS_4096' undeclared here (not in a function) shwdt.c: In function 'sh_wdt_start': shwdt.c:92: error: 'wdt_lock' undeclared (first use in this function) shwdt.c:92: error: (Each undeclared identifier is reported only once shwdt.c:92: error: for each function it appears in.) shwdt.c:97: error: implicit declaration of function 'sh_wdt_read_csr' shwdt.c:98: error: 'WTCSR_WT' undeclared (first use in this function) shwdt.c:99: error: implicit declaration of function 'sh_wdt_write_csr' shwdt.c:101: error: implicit declaration of function 'sh_wdt_write_cnt' shwdt.c:112: error: 'WTCSR_TME' undeclared (first use in this function) shwdt.c:113: error: 'WTCSR_RSTS' undeclared (first use in this function) shwdt.c: In function 'sh_wdt_stop': shwdt.c:142: error: 'wdt_lock' undeclared (first use in this function) shwdt.c:147: error: 'WTCSR_TME' undeclared (first use in this function) shwdt.c: In function 'sh_wdt_keepalive': shwdt.c:160: error: 'wdt_lock' undeclared (first use in this function) shwdt.c: In function 'sh_wdt_set_heartbeat': shwdt.c:176: error: 'wdt_lock' undeclared (first use in this function) shwdt.c: In function 'sh_wdt_ping': shwdt.c:192: error: 'wdt_lock' undeclared (first use in this function) shwdt.c:197: error: 'WTCSR_IOVF' undeclared (first use in this function) shwdt.c: At top level: shwdt.c:417: error: conflicting type qualifiers for 'sh_wdt_info' shwdt.c:71: error: previous declaration of 'sh_wdt_info' was here make[3]: *** [drivers/watchdog/shwdt.o] Error 1 <-- snip --> Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] Coding style - Indentation - part 2Wim Van Sebroeck2008-08-061-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_ioctlAlan Cox2008-06-211-57/+82
| | | | | | | | Review and switch to unlocked_ioctl Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-03-061-1/+1
| | | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* drivers/watchdog/: Spelling fixesJoe Perches2008-02-031-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* mv watchdog tree under driversWim Van Sebroeck2007-10-181-0/+485
move watchdog tree from drivers/char/watchdog to drivers/watchdog. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>