wdt.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com>
  4. */
  5. #ifndef _LPC32XX_WDT_H
  6. #define _LPC32XX_WDT_H
  7. #include <asm/types.h>
  8. /* Watchdog Timer Registers */
  9. struct wdt_regs {
  10. u32 isr; /* Interrupt Status Register */
  11. u32 ctrl; /* Control Register */
  12. u32 counter; /* Counter Value Register */
  13. u32 mctrl; /* Match Control Register */
  14. u32 match0; /* Match 0 Register */
  15. u32 emr; /* External Match Control Register */
  16. u32 pulse; /* Reset Pulse Length Register */
  17. u32 res; /* Reset Source Register */
  18. };
  19. /* Watchdog Timer Control Register bits */
  20. #define WDTIM_CTRL_PAUSE_EN (1 << 2)
  21. #define WDTIM_CTRL_RESET_COUNT (1 << 1)
  22. #define WDTIM_CTRL_COUNT_ENAB (1 << 0)
  23. /* Watchdog Timer Match Control Register bits */
  24. #define WDTIM_MCTRL_RESFRC2 (1 << 6)
  25. #define WDTIM_MCTRL_RESFRC1 (1 << 5)
  26. #define WDTIM_MCTRL_M_RES2 (1 << 4)
  27. #define WDTIM_MCTRL_M_RES1 (1 << 3)
  28. #define WDTIM_MCTRL_STOP_COUNT0 (1 << 2)
  29. #define WDTIM_MCTRL_RESET_COUNT0 (1 << 1)
  30. #define WDTIM_MCTRL_MR0_INT (1 << 0)
  31. #endif /* _LPC32XX_WDT_H */