diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2021-07-26 14:12:14 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2021-08-22 10:28:12 +0200 |
commit | 580b8e2899770cf4768f52e37a1c8bddc46f13e7 (patch) | |
tree | a9a05a7a79e25a1910f9876c705810fcbc15d203 /drivers/watchdog/Kconfig | |
parent | watchdog: Start watchdog in watchdog_set_last_hw_keepalive only if appropriate (diff) | |
download | linux-580b8e2899770cf4768f52e37a1c8bddc46f13e7.tar.xz linux-580b8e2899770cf4768f52e37a1c8bddc46f13e7.zip |
watchdog: ixp4xx: Rewrite driver to use core
This rewrites the IXP4xx watchdog driver as follows:
- Spawn the watchdog driver as a platform device from the timer
driver. It's one device in the hardware, and the fact that
Linux splits the handling into two different devices is
a Linux pecularity, and thus it becomes a Linux pecularity
to spawn a separate watchdog driver.
- Spawn the watchdog driver from the timer driver at probe().
This is well after the timer driver as actually registered and
started and we know the register base is available.
- Instead of looping back callbacks to the timer drivers for all
watchdog calls, pass the register base to the watchdog driver
and manage the registers there. The two drivers aren't even
interested in the same register so the spinlock is totally
surplus, delete it.
- Replace pretty much all of the content in the watchdog driver
with a simple, modern watchdog driver utilizing the watchdog
core instead of registering its own misc device and ioctl()
handling.
- Drop module parameters as the same already exist in the
watchdog core.
What remains is a slim elegant (IMO) watchdog driver using the
watchdog core, spawning from device tree or boardfile alike.
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210726121214.2572836-1-linus.walleij@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/Kconfig')
-rw-r--r-- | drivers/watchdog/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 478544f94df0..b81fe4f7d434 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -475,6 +475,7 @@ config FTWDT010_WATCHDOG config IXP4XX_WATCHDOG tristate "IXP4xx Watchdog" depends on ARCH_IXP4XX + select WATCHDOG_CORE help Say Y here if to include support for the watchdog timer in the Intel IXP4xx network processors. This driver can |