[PATCH v2 2/2] watchdog: Add Apple SoC watchdog driver

Janne Grunau j at jannau.net
Tue Nov 30 12:55:28 PST 2021


Hej,

On 2021-11-30 17:18:09 +0100, Sven Peter wrote:
> Add support for the watchdog timer found in Apple SoCs. This driver is
> also required to reboot these machines.
> 
> Signed-off-by: Sven Peter <sven at svenpeter.dev>
> ---
> v1 -> v2:
>  - set the default timeout to 30s and call watchdog_init_timeout
>    to allow the device tree to override it
>  - set WDOG_HW_RUNNING if the watchdog is enabled at boot
>  - check that the clock rate is not zero
>  - use unsigned long instead of u32 for clk_rate
>  - use devm_add_action_or_reset instead of manually calling
>    clk_disable_unprepare
>  - explain the magic number in apple_wdt_restart
> 
>  MAINTAINERS                  |   1 +
>  drivers/watchdog/Kconfig     |  12 ++
>  drivers/watchdog/Makefile    |   1 +
>  drivers/watchdog/apple_wdt.c | 226 +++++++++++++++++++++++++++++++++++
>  4 files changed, 240 insertions(+)
>  create mode 100644 drivers/watchdog/apple_wdt.c

Tested on M1 and M1 Max. Feel free to add
Tested-by: Janne Grunau <j at jannau.net>

best
Janne



More information about the linux-arm-kernel mailing list