sp5100_tco.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * sp5100_tco: TCO timer driver for sp5100 chipsets.
  3. *
  4. * (c) Copyright 2009 Google Inc., All Rights Reserved.
  5. *
  6. * TCO timer driver for sp5100 chipsets
  7. */
  8. /*
  9. * Some address definitions for the Watchdog
  10. */
  11. #define SP5100_WDT_MEM_MAP_SIZE 0x08
  12. #define SP5100_WDT_CONTROL(base) ((base) + 0x00) /* Watchdog Control */
  13. #define SP5100_WDT_COUNT(base) ((base) + 0x04) /* Watchdog Count */
  14. #define SP5100_WDT_START_STOP_BIT (1 << 0)
  15. #define SP5100_WDT_TRIGGER_BIT (1 << 7)
  16. #define SP5100_PM_IOPORTS_SIZE 0x02
  17. /*
  18. * These two IO registers are hardcoded and there doesn't seem to be a way to
  19. * read them from a register.
  20. */
  21. /* For SP5100/SB7x0 chipset */
  22. #define SP5100_IO_PM_INDEX_REG 0xCD6
  23. #define SP5100_IO_PM_DATA_REG 0xCD7
  24. #define SP5100_SB_RESOURCE_MMIO_BASE 0x9C
  25. #define SP5100_PM_WATCHDOG_CONTROL 0x69
  26. #define SP5100_PM_WATCHDOG_BASE 0x6C
  27. #define SP5100_PM_WATCHDOG_FIRED (1 << 1)
  28. #define SP5100_PM_WATCHDOG_ACTION_RESET (1 << 2)
  29. #define SP5100_PCI_WATCHDOG_MISC_REG 0x41
  30. #define SP5100_PCI_WATCHDOG_DECODE_EN (1 << 3)
  31. #define SP5100_PM_WATCHDOG_DISABLE (1 << 0)
  32. #define SP5100_PM_WATCHDOG_SECOND_RES (3 << 1)
  33. #define SP5100_DEVNAME "SP5100 TCO"
  34. /* For SB8x0(or later) chipset */
  35. #define SB800_IO_PM_INDEX_REG 0xCD6
  36. #define SB800_IO_PM_DATA_REG 0xCD7
  37. #define SB800_PM_ACPI_MMIO_EN 0x24
  38. #define SB800_PM_WATCHDOG_CONTROL 0x48
  39. #define SB800_PM_WATCHDOG_BASE 0x48
  40. #define SB800_PM_WATCHDOG_CONFIG 0x4C
  41. #define SB800_PCI_WATCHDOG_DECODE_EN (1 << 0)
  42. #define SB800_PM_WATCHDOG_DISABLE (1 << 1)
  43. #define SB800_PM_WATCHDOG_SECOND_RES (3 << 0)
  44. #define SB800_ACPI_MMIO_DECODE_EN (1 << 0)
  45. #define SB800_ACPI_MMIO_SEL (1 << 1)
  46. #define SB800_PM_WDT_MMIO_OFFSET 0xB00
  47. #define SB800_DEVNAME "SB800 TCO"