summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
AgeCommit message (Collapse)AuthorFilesLines
2014-03-31watchdog: acquirewdt: Use platform_driver_probeJean Delvare1-12/+9
Using platform_driver_probe instead of platform_driver_register has two benefits: * The driver will fail to load if device probing fails. * The probe function can be marked __init. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: iTCO_wdt: Fix the parent deviceJean Delvare1-1/+1
The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich (the PCI device.) Setting the parent right makes it much easier for the user to figure out which driver/module is handling the watchdog device node. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: it87_wdt: Work around non-working CIR interruptsMarc van der Wal1-10/+31
On some hardware platforms, the it87_wdt watchdog resets the machine despite the watchdog daemon running and writing to /dev/watchdog. This is due to Consumer IR buffer underrun interrupts being used as triggers to reset the timer. On some buggy hardware implementations such as the iEi AFL-12A-N270 single-board computer, this method does not work. However, resetting the timer by writing its original timeout value in its configuration register over and over again suppresses the unwanted reboots. Add a module option (nocir), 0 by default in order not to break existing setups. Setting it to 1 enables the workaround. Fixes bug #42801 <https://bugzilla.kernel.org/show_bug.cgi?id=42801>. Tested primarily on Linux 3.5.7, applies cleanly on Linux 3.13.5. Signed-off-by: Marc van der Wal <x0r+kernel@x0r.fr> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: bcm281xx: Fix Kconfig dependencyMarkus Mayer1-1/+1
Use more the applicable ARCH_BCM_MOBILE option instead of ARCH_BCM as dependency for bcm_kona_wdt.c. Signed-off-by: Markus Mayer <markus.mayer@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: s3c2410_wdt: Check return value of clk_prepare_enableSachin Kamat1-1/+5
clk_prepare_enable can fail. Check its return value. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: s3c2410_wdt: Remove unneeded initializationSachin Kamat1-2/+0
Initializing clk to NULL as a reset/error condition does not help as NULL is not an invalid condition w.r.t clk. Remove this initialization altogether as there is no state retention. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: sunxi: Change compatiblesMaxime Ripard1-1/+1
The Allwinner A10 and A31 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Change the compatibles to match the other pattern in the watchdog controller driver for consistency. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: orion: prepare new Dove DT Kconfig variableSebastian Hesselbarth1-1/+1
DT-enabled Dove will move over from ARCH_DOVE in mach-dove to MACH_DOVE in mach-mvebu. As non-DT ARCH_DOVE will stay to rot for a while, add a new DT-only MACH_DOVE Kconfig. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: fix checkpatch warnings and errorJingoo Han6-14/+13
Fix the following checkpatch warnings and error: WARNING: quoted string split across lines WARNING: braces {} are not necessary for single statement blocks WARNING: __initdata should be placed after ibmasr_id_table[] WARNING: please, no space before tabs ERROR: do not initialise statics to 0 or NULL 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>
2014-03-31watchdog: Add tegra watchdogAndrew Chew3-0/+314
Add a driver for the hardware watchdogs in NVIDIA Tegra SoCs (Tegra30 and later). This driver will configure one watchdog timer that will reset the system in the case of a watchdog timeout. This driver binds to the nvidia,tegra30-timer device node and gets its register base from there. Signed-off-by: Andrew Chew <achew@nvidia.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Remove no_timeout variableMichal Simek1-9/+4
Remove no_timeout variable and check variables directly. Suggested-by: Rob Herring <robherring2@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Enable this driver for ZynqMichal Simek1-13/+9
Enable this driver for Zynq. Move it to architecture independent Kconfig part. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Use correct comment indentationMichal Simek1-4/+4
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Use of_property_read_u32Michal Simek1-17/+12
Use of_property_read_u32 functions to clean probe function. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Fix all printk messagesMichal Simek1-8/+8
Use dev_ functions for printk messages. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Allocate private structure per deviceMichal Simek1-42/+55
Only one watchdog could be used by this driver. Create driver private data structure and move there all variables for one instance. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Move no_timeout to probe functionMichal Simek1-5/+3
no_timeout should be local variable because it is used only in probe function. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Simplify probe and remove functionsMichal Simek1-32/+9
Use devm_ helper function to simplify probe and error path. Move ioremap to the beginning of probe function. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Move control_status_reg to functionsMichal Simek1-1/+6
control_status_reg is temp variables and should be used locally by specific function. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: xilinx: Convert driver to the watchdog frameworkMichal Simek2-172/+33
- Remove uneeded headers, fops functions - Use xilinx_wdt prefix in start/stop/keepalive functions and in new structures Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: wdt285: Fix variable typeAlexander Shiyan1-2/+1
Variable "new_margin" is checked in the function watchdog_ioctl() to be non-negative, so change its type to "int". 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>
2014-03-31watchdog: shwdt: Remove unused variableAlexander Shiyan1-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>
2014-03-31watchdog: sc520_wdt: Remove unused variableAlexander Shiyan1-2/+1
Variable "dummy" is not used anywhere in the function wdt_config(). 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>
2014-03-31watchdog: intel_scu_watchdog: Remove unused variableAlexander Shiyan1-3/+1
Variable "hw_pre_value" is not used anywhere in the function intel_scu_set_heartbeat(). 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>
2014-03-31watchdog: indydog: Simplify indydog_{start,stop}Alexander Shiyan1-11/+2
This patch simplify functions indydog_start() and indydog_stop() a bit and removes excess intermediate 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>
2014-03-31watchdog: bcm63xx_wdt: Remove unused field from bcm63xx_wdt_deviceAlexander Shiyan1-1/+0
Field "default_ticks" is not used anywhere in the driver code. This patch removes this field. 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>
2014-03-31watchdog: sp805_wdt: Use devm_ioremap_resource()Jingoo Han1-14/+3
Use devm_ioremap_resource() in order to make the code simpler. 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>
2014-03-31watchdog: omap_wdt: Use devm_ioremap_resource()Jingoo Han1-16/+6
Use devm_ioremap_resource() in order to make the code simpler, and remove 'struct resource *mem' from 'struct omap_wdt_dev' and omap_wdt_probe(), resplectively. because the 'mem' variables are not used anymore. Also the redundant return value check of platform_get_resource() is removed, because the value is checked by devm_ioremap_resource(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: ep93xx_wdt: Use devm_ioremap_resource()Jingoo Han1-10/+3
Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource(). 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>
2014-03-31watchdog: ts72xx_wdt: make 'ts72xx_wdt_pdev' staticJingoo Han1-1/+1
Make 'ts72xx_wdt_pdev' static, because it is used only in this file. It also fixes the following sparse warning. warning: symbol 'ts72xx_wdt_pdev' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: Remove unnecessary OOM messagesJingoo Han8-18/+5
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. For example, k.alloc and v.alloc failures use dump_stack(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> [for at32ap700x] Acked-by: Lubomir Rintel <lkundrak@v3.sk> [for bcm2835] Acked-by: Viresh Kumar <viresh.kumar@linaro.org> [for sp805_wdt] Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> [for ts72xx_wdt] Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-31watchdog: delete non-required instances of include <linux/init.h>Paul Gortmaker24-24/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: linux-watchdog@vger.kernel.org
2014-03-31watchdog: mpc8xxx_wdt: MPC8xx is HW enabledChristophe Leroy1-0/+1
MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-03-20octeon, watchdog: Fix CPU hotplug callback registrationSrivatsa S. Bhat1-2/+9
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu); register_cpu_notifier(&foobar_cpu_notifier); put_online_cpus(); This is wrong, since it is prone to ABBA deadlocks involving the cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently with CPU hotplug operations). Instead, the correct and race-free way of performing the callback registration is: cpu_notifier_register_begin(); for_each_online_cpu(cpu) init_cpu(cpu); /* Note the use of the double underscored version of the API */ __register_cpu_notifier(&foobar_cpu_notifier); cpu_notifier_register_done(); Fix the watchdog code in octeon by using this latter form of callback registration. Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-03-19Revert "powerpc/watchdog: Don't enable interrupt on PPC64 BookE"Scott Wood1-8/+0
This reverts commit 3978bdb4ed653342b0be66c031bf61b72cc55d60, now that critical interrupts are properly supported on ppc64 booke. Signed-off-by: Scott Wood <scottwood@freescale.com> Cc: Laurentiu Tudor <Laurentiu.Tudor@freescale.com> Cc: Wim Van Sebroeck <wim@iguana.be>
2014-03-19watchdog: iTCO_wdt: Add support for v3 siliconPeter Tyser1-55/+82
Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO functionality: - The watchdog timer ticks at 1 second instead of .6 seconds - Some 8 and 16-bit registers were combined into 32-bit registers - Some registers were removed (DAT_IN, DAT_OUT, MESSAGE) - The BOOT_STS field in TCO_STS was removed - The NO_REBOOT bit is in the PMC area instead of GCS Update the driver to support the above changes and bump the version to 1.11. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Tested-by: Rajat Jain <rajatjain@juniper.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-08Merge tag 'mvebu-watchdog-3.15-2' of git://git.infradead.org/linux-mvebu ↵Olof Johansson1-1/+1
into next/drivers mvebu watchdog driver changes for v3.15 (incremental #2) - remove warnings by using %pa for phys_addr_t * tag 'mvebu-watchdog-3.15-2' of git://git.infradead.org/linux-mvebu: watchdog: orion_wdt: Use %pa to print 'phys_addr_t' Signed-off-by: Olof Johansson <olof@lixom.net>
2014-02-25watchdog: orion_wdt: Use %pa to print 'phys_addr_t'Fabio Estevam1-1/+1
When building an ARM multi_v7_defconfig with LPAE option selected we get the following build warning: drivers/watchdog/orion_wdt.c:272:2: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'phys_addr_t' [-Wformat=] Fix it by using %pa to print 'phys_addr_t'. Reported-by: Olof's autobuilder <build@lixom.net> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-25Merge tag 'mvebu-watchdog-3.15' of git://git.infradead.org/linux-mvebu into ↵Arnd Bergmann2-80/+303
next/drivers mvebu watchdog driver changes for v3.15 - orion watchdog - cleanup and extend driver to support Armada 370 and Armada XP Depends: - tags/irqchip-mvebu-fixes-3.14 (already pulled by tglx) - both are based on v3.14-rc1 * tag 'mvebu-watchdog-3.15' of git://git.infradead.org/linux-mvebu: watchdog: orion: Enable the build on ARCH_MVEBU watchdog: orion: Add support for Armada 370 and Armada XP SoC watchdog: orion: Add per-compatible watchdog start implementation watchdog: orion: Add per-compatible clock initialization watchdog: orion: Introduce per-compatible of_device_id data watchdog: orion: Introduce an orion_watchdog device structure watchdog: orion: Remove unneeded BRIDGE_CAUSE clear watchdog: orion: Make RSTOUT register a separate resource watchdog: orion: Handle the interrupt so it's properly acked watchdog: orion: Make sure the watchdog is initially stopped watchdog: orion: Remove unused macros watchdog: orion: Use atomic access for shared registers watchdog: orion: Add clock error handling Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2014-02-22watchdog: orion: Enable the build on ARCH_MVEBUEzequiel Garcia1-1/+1
After adding support for Armada 370/XP SoC let's enable the build on these platforms. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add support for Armada 370 and Armada XP SoCEzequiel Garcia1-2/+104
Using the added infrastructure for handling SoC differences, this commit adds support for the watchdog controller available in Armada 370 and Armada XP SoCs. Also, and because the AXP clock initialization uses of_clk_get_by_name, this commit changes the orion clock initialization to use clk_get() and adds a proper clk_put() on the common exit/error paths. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add per-compatible watchdog start implementationEzequiel Garcia1-1/+11
To handle differences between SoCs this commit adds per-compatible string start() function for the watchdog kick-off. This is preparation work and makes no functionality changes to the current driver. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Add per-compatible clock initializationEzequiel Garcia1-21/+32
Following the introduction of the compatible-data field, it's now possible to further abstract the clock initialization. This will allow to support SoC with a different clock setup. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Introduce per-compatible of_device_id dataEzequiel Garcia1-19/+43
This commit adds an orion_watchdog_data structure to hold compatible-data information. This allows to remove the driver-wide definition and to be able to add support for multiple compatible-strings in the future. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Introduce an orion_watchdog device structureEzequiel Garcia1-45/+69
In order to prepare to support multiple compatible-strings, this commit adds a device structure to hold the driver's state. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Remove unneeded BRIDGE_CAUSE clearEzequiel Garcia1-5/+0
After adding the IRQ request, the BRIDGE_CAUSE bit should be cleared by the bridge interrupt controller. There's no longer a need to do it in the watchdog driver, so we can simply remove it. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Make RSTOUT register a separate resourceEzequiel Garcia1-3/+44
In order to support other SoC, it's required to distinguish the 'control' timer register, from the 'rstout' register that enables system reset on watchdog expiration. To prevent a compatibility break, this commit adds a fallback to a hardcoded RSTOUT address. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Handle the interrupt so it's properly ackedEzequiel Garcia1-1/+23
DT-enabled plaforms, where the irqchip driver for the brigde interrupt controller is available, can handle the watchdog IRQ properly. Therefore, request the interrupt and add a dummy handler that merely calls panic(). This is done in order to have an initial 'ack' of the interruption, which clears the watchdog state. Furthermore, since some platforms don't have such IRQ, this commit makes the interrupt specification optional. Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Make sure the watchdog is initially stoppedEzequiel Garcia1-0/+19
Having the watchdog initially fully stopped is important to avoid any spurious watchdog triggers, in case the registers are not in its reset state. If the watchdog rstout is enabled and the watchdog counter running, this initial stop is not performed, to comply with the 'nowayout' parameter. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-02-22watchdog: orion: Remove unused macrosEzequiel Garcia1-2/+0
These are not used anywhere so it's safe to remove them. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>