watchdog: s3c2410: Add Exynos850 support
authorSam Protsenko <semen.protsenko@linaro.org>
Sun, 21 Nov 2021 16:56:47 +0000 (18:56 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Tue, 28 Dec 2021 13:08:51 +0000 (14:08 +0100)
commitcd4eadf228dbfc6e81a2730a1fa635e9a593a449
tree3c2f0ca34d9a3a8eff8796246fdba5288fe44459
parent968011a291f3c80afe9446968d21422569f1bc1c
watchdog: s3c2410: Add Exynos850 support

Exynos850 is a bit different from SoCs already supported in WDT driver:
  - AUTOMATIC_WDT_RESET_DISABLE register is removed, so its value is
    always 0; .disable_auto_reset callback is not set for that reason
  - MASK_WDT_RESET_REQUEST register is replaced with
    CLUSTERx_NONCPU_IN_EN register; instead of masking (disabling) WDT
    reset interrupt it's now enabled with the same value; .mask_reset
    callback is reused for that functionality though
  - To make WDT functional, WDT counter needs to be enabled in
    CLUSTERx_NONCPU_OUT register; it's done using .enable_counter
    callback

Also Exynos850 has two CPU clusters, each has its own dedicated WDT
instance. Different PMU registers and bits are used for each cluster. So
driver data is now modified in probe, adding needed info depending on
cluster index passed from device tree.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20211121165647.26706-13-semen.protsenko@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/s3c2410_wdt.c