watchdog.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0
  2. *
  3. * include/asm-sh/cpu-sh4/watchdog.h
  4. *
  5. * Copyright (C) 2002, 2003 Paul Mundt
  6. * Copyright (C) 2009 Siemens AG
  7. * Copyright (C) 2009 Sitdikov Valentin
  8. */
  9. #ifndef __ASM_CPU_SH4_WATCHDOG_H
  10. #define __ASM_CPU_SH4_WATCHDOG_H
  11. #if defined(CONFIG_CPU_SUBTYPE_SH7785) || defined(CONFIG_CPU_SUBTYPE_SH7780)
  12. /* Prefix definition */
  13. #define WTBST_HIGH 0x55
  14. /* Register definitions */
  15. #define WTCNT_R 0xffcc0010 /*WDTCNT*/
  16. #define WTCSR 0xffcc0004 /*WDTCSR*/
  17. #define WTCNT 0xffcc0000 /*WDTST*/
  18. #define WTST WTCNT
  19. #define WTBST 0xffcc0008 /*WDTBST*/
  20. /* Register definitions */
  21. #elif defined(CONFIG_CPU_SUBTYPE_SH7722) || \
  22. defined(CONFIG_CPU_SUBTYPE_SH7723) || \
  23. defined(CONFIG_CPU_SUBTYPE_SH7724)
  24. #define WTCNT 0xa4520000
  25. #define WTCSR 0xa4520004
  26. #else
  27. /* Register definitions */
  28. #define WTCNT 0xffc00008
  29. #define WTCSR 0xffc0000c
  30. #endif
  31. /* Bit definitions */
  32. #define WTCSR_TME 0x80
  33. #define WTCSR_WT 0x40
  34. #define WTCSR_RSTS 0x20
  35. #define WTCSR_WOVF 0x10
  36. #define WTCSR_IOVF 0x08
  37. #endif /* __ASM_CPU_SH4_WATCHDOG_H */