summaryrefslogtreecommitdiff
path: root/drivers/watchdog/meson_wdt.c
AgeCommit message (Collapse)Author
2018-03-03watchdog: meson: allow setting timeout in devicetreeMarcus Folkesson
watchdog_init_timeout() will allways pick timeout_param since it defaults to a valid timeout. By following best practice described in Documentation/watchdog/watchdog-kernel-api.txt, it also let us to set timout-sec property in devicetree. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2017-09-09watchdog: meson-wdt: add support for the watchdog on Meson8 and Meson8m2Martin Blumenstingl
The watchdog IP block on Meson8 and Meson8m2 is already supported by the existing meson-wdt driver. Meson8 uses the same register bits as Meson6, while the newer Meson8m2 SoC uses the same register bits as Meson8b. Currently watchdog support on Meson8 SoC already works because meson8.dtsi simply uses the "amlogic,meson6-wdt" compatible. Adding a separate compatible for Meson8 makes this more explicit though. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2017-02-24watchdog: meson_wdt: Convert to use device managed functions and other ↵Guenter Roeck
improvements Use device managed functions to simplify error handling, reduce source code size, improve readability, and reduce the likelyhood of bugs. Other improvements as listed below. The conversion was done automatically with coccinelle using the following semantic patches. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches - Drop assignments to otherwise unused variables - Drop remove function - Drop platform_set_drvdata() - Use devm_watchdog_register_driver() to register watchdog device - Replace shutdown function with call to watchdog_stop_on_reboot() Cc: Carlo Caione <carlo@caione.org> Acked-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-01watchdog: Add 'action' and 'data' parameters to restart handler callbackGuenter Roeck
The 'action' (or restart mode) and data parameters may be used by restart handlers, so they should be passed to the restart callback functions. Cc: Sylvain Lemieux <slemieux@tycoint.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-28watchdog: meson: Add meson8b SoC specific dataCarlo Caione
Add SoC specific data in the watchdog driver for the meson8b SoC. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-28watchdog: meson: Enable meson SoC specific dataCarlo Caione
With this patch we refactor the driver code to enable watchdog support for all platforms based on Amlogic meson SoCs. The new default timeout is also now chosen considering the maximum timeout allowed by the SoC. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-13watchdog: meson_wdt: use core restart handlerDamien Riegel
Get rid of the custom restart handler by using the one provided by the watchdog core. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-01-21watchdog: drop owner assignment from platform_driversWolfram Sang
This 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> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-10-20watchdog: meson: remove magic value for rebootCarlo Caione
This patch removes the magic value used for rebooting the board. This value is useless and leads to a static checker warning as reported by Dan Carpenter. Signed-off-by: Carlo Caione <carlo@caione.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-10-20ARM: meson: add watchdog driverCarlo Caione
This patch adds the watchdog driver for the Amlogic Meson SoCs used also to reboot the device. Signed-off-by: Carlo Caione <carlo@caione.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>