summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/shwdt.c
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: shwdt: Use setup_timer()Muhammad Falak R Wani2016-05-141-3/+1
| | | | | | | | | | | The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. The multiline code for timer initialization is now replaced with function setup_timer. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Watchdog: Fix parent of watchdog_devicesPratyush Anand2015-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | /sys/class/watchdog/watchdogn/device/modalias can help to identify the driver/module for a given watchdog node. However, many wdt devices do not set their parent and so, we do not see an entry for device in sysfs for such devices. This patch fixes parent of watchdog_device so that /sys/class/watchdog/watchdogn/device is populated. Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not have any parent. Not sure, how we can identify driver for these devices. Signed-off-by: Pratyush Anand <panand@redhat.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* watchdog: shwdt: Remove the unnecessary check of resource after ↵George Cherian2014-08-051-4/+1
| | | | | | | | | | | | platform_get_resource() devm_ioremap_resource check for a valid resource. Remove the unnecessary check. Also group platform_get_resource and devm_ioremap_resource together for better readability. Signed-off-by: George Cherian <george.cherian@ti.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: shwdt: Remove unused platform_set_drvdata()Alexander Shiyan2014-06-101-2/+0
| | | | | | | | | This patch removes platform_set_drvdata() which is not used in the driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: shwdt: Remove unused variableAlexander Shiyan2014-03-311-2/+0
| | | | | | | | | Variable "wdt" is not used anywhere in the function sh_wdt_remove(). This patch removes this variable. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: Drop unnecessary include of miscdevice.hGuenter Roeck2013-12-101-1/+0
| | | | | | | | | | After commit 487722cf2 (watchdog: Get rid of MODULE_ALIAS_MISCDEV statements) the affected drivers no longer need to include miscdevice.h. Only exception is rt2880_wdt.c which never needed it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: Get rid of MODULE_ALIAS_MISCDEV statementsJean Delvare2013-11-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR) and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements. Either the device is enumerated and the driver already has a module alias (e.g. PCI, USB etc.) that will get the right driver loaded automatically. Or the device is not enumerated and loading its driver will lead to more or less intrusive hardware poking. Such hardware poking should be limited to a bare minimum, so the user should really decide which drivers should be tried and in what order. Trying them all in arbitrary order can't do any good. On top of that, loading that many drivers at once bloats the kernel log. Also many drivers will stay loaded afterward, bloating the output of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets loaded as a dependency) can't even be unloaded! If defining char-major-10-130 is needed then it should happen in user-space. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Zwane Mwaikambo <zwane@arm.linux.org.uk> Cc: Jim Cromie <jim.cromie@gmail.com>
* watchdog: shwdt: Remove redundant platform_set_drvdata()Sachin Kamat2013-07-111-2/+0
| | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: shwdt: use devm_clk_get()Jingoo Han2013-07-111-12/+4
| | | | | | | | Use devm_clk_get() to make cleanup paths more simple. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: Convert to devm_ioremap_resource()Sachin Kamat2013-05-091-3/+4
| | | | | | | | | | | | | | Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: remove use of __devexitBill Pemberton2012-11-281-1/+1
| | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* watchdog: remove use of __devinitBill Pemberton2012-11-281-1/+1
| | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* watchdog: remove use of __devexit_pBill Pemberton2012-11-281-1/+1
| | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* watchdog: shwdt: Use finer grained clock control.Paul Mundt2012-05-101-7/+5
| | | | | | | | | 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/+0
| | | | | | | 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/+44
| | | | | | 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/+12
| | | | | | | 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/+2
|/ | | | | | | | 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>
OpenPOWER on IntegriCloud