wdt.h 1.1 KB

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