Skip to content

Commit 1bfdc14

Browse files
CharlesWu465randolph-lin
authored andcommitted
watchdog: andes: atcwdt200: Andes support for ATCWDT200 (torvalds#203)
Reformed from the following patches on RISCV-Linux-5.4: - (ff42294) riscv: Porting Watch dog driver - Remove vendor SBI call sbi_andes_set_reset_vector(), directly program SMU reset vector, thus it needs CONFIG_ATCSMU as dependency - Add readl_fixup to work around dts probe when hardware is not present Reformed from the following patches on ast-v5_4_0-branch: - (852a286) watchdog: andes: atcwdt200: Integrate driver with watchdog framework (torvalds#243) - (d50f7ff) watchdog: andes: atcwdt200: Use div64_s64 for 64-bit division to avoid link error with 32-bit toolchain (torvalds#246) - (352d0db) watchdog: andes: atcwdt200: Add support for automatic detection of interrupt timer type (torvalds#248) Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com> Signed-off-by: Randolph <randolph@andestech.com> Co-authored-by: Randolph <randolph@andestech.com> Reviewed-on: https://gitea.andestech.com/RD-SW/linux/pulls/203 Reviewed-by: CL Chin-Long Wang <cl634@andestech.com> Reviewed-by: randolph <randolph@andestech.com>
1 parent e7607d5 commit 1bfdc14

File tree

6 files changed

+525
-0
lines changed

6 files changed

+525
-0
lines changed

arch/riscv/configs/andes-support.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ CONFIG_FFB_MODE_RGB=y
3131
CONFIG_FFB_MODE_16BPP=y
3232

3333
CONFIG_RTC_DRV_ATCRTC100=y
34+
35+
CONFIG_ATCWDT200_WATCHDOG=y

arch/riscv/configs/andes_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ CONFIG_RTC_INTF_SYSFS=y
210210
CONFIG_RTC_INTF_PROC=y
211211
CONFIG_RTC_INTF_DEV=y
212212

213+
CONFIG_WATCHDOG=y
214+
CONFIG_WATCHDOG_CORE=y
215+
213216
CONFIG_ZSMALLOC=y
214217
CONFIG_ZRAM=y
215218
CONFIG_CRYPTO_LZO=y

drivers/watchdog/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ config WATCHDOG_NOWAYOUT
4747
get killed. If you say Y here, the watchdog cannot be stopped once
4848
it has been started.
4949

50+
config WATCHDOG_DEBUG
51+
bool "Hang in watch dog interrupt handler"
52+
help
53+
When system failed, it will hang in watch dog interrupt handler for
54+
debugging.
55+
5056
config WATCHDOG_HANDLE_BOOT_ENABLED
5157
bool "Update boot-enabled watchdog until userspace takes over"
5258
default y
@@ -528,6 +534,13 @@ config FTWDT010_WATCHDOG
528534
To compile this driver as a module, choose M here: the
529535
module will be called ftwdt010_wdt.
530536

537+
config ATCWDT200_WATCHDOG
538+
tristate "ATCWDT200_WATCHDOG"
539+
depends on RISCV && ARCH_ANDES && ANDES_ATCSMU
540+
help
541+
Support for Andes atcwdt200 watchdog. The driver needs SMU to
542+
program reset vector before triggering software reset.
543+
531544
config IXP4XX_WATCHDOG
532545
tristate "IXP4xx Watchdog"
533546
depends on ARCH_IXP4XX || (ARM && COMPILE_TEST)

drivers/watchdog/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ obj-$(CONFIG_TWL4030_WATCHDOG) += twl4030_wdt.o
4949
obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
5050
obj-$(CONFIG_977_WATCHDOG) += wdt977.o
5151
obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o
52+
obj-$(CONFIG_ATCWDT200_WATCHDOG) += atcwdt200_wdt.o
5253
obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
5354
obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
5455
obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o

0 commit comments

Comments
 (0)