crimebus.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* $OpenBSD: crimebus.h,v 1.9 2012/04/21 19:17:50 miod Exp $ */
  2. /*
  3. * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se).
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  15. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  17. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  18. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  19. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  20. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  21. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  22. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  23. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  24. * SUCH DAMAGE.
  25. *
  26. */
  27. #ifndef _CRIMEBUS_H_
  28. #define _CRIMEBUS_H_
  29. #include <machine/bus.h>
  30. #define CRIMEBUS_BASE 0x14000000
  31. #define CRIME_REVISION 0x0000
  32. #define CRIME_CONTROL 0x0008
  33. #define CRIME_CTRL_TRITON_SYSADC 0x2000
  34. #define CRIME_CTRL_CRIME_SYSADC 0x1000
  35. #define CRIME_CTRL_HARD_RESET 0x0800
  36. #define CRIME_CTRL_SOFT_RESET 0x0400
  37. #define CRIME_CTRL_DOG_ENABLE 0x0200
  38. #define CRIME_CTRL_ENDIAN_BIG 0x0100
  39. #define CRIME_INT_STAT 0x0010
  40. #define CRIME_INT_MASK 0x0018
  41. #define CRIME_INT_SOFT 0x0020
  42. #define CRIME_INT_HARD 0x0028
  43. /*
  44. * CRIME_INT_STAT and CRIME_INT_MASK mapping.
  45. */
  46. #define CRIME_INT_VIDEO_IN_1 0x00000001 /* Video in 1 */
  47. #define CRIME_INT_VIDEO_IN_2 0x00000002 /* Video in 2 */
  48. #define CRIME_INT_VIDEO_OUT 0x00000004 /* Video out */
  49. #define CRIME_INT_MACE_ETHER 0x00000008 /* Mace Ethernet NIC */
  50. #define CRIME_INT_SUPER_IO 0x00000010 /* Super I/O sub interrupt */
  51. #define CRIME_INT_SUB_MISC 0x00000020 /* Miscellaneous sub interrupt */
  52. #define CRIME_INT_SUB_AUDIO 0x00000040 /* Audio sub interrupt */
  53. #define CRIME_INT_PCI_BRIDGE 0x00000080 /* PCI bridge errors */
  54. #define CRIME_INT_PCI_SCSI_0 0x00000100 /* AIC SCSI controller 0 */
  55. #define CRIME_INT_PCI_SCSI_1 0x00000200 /* AIC SCSI controller 1 */
  56. #define CRIME_INT_PCI_SLOT_0 0x00000400 /* PCI expansion slot 0 */
  57. #define CRIME_INT_PCI_SLOT_1 0x00000800 /* PCI expansion slot 1 */
  58. #define CRIME_INT_PCI_SLOT_2 0x00001000 /* PCI expansion slot 2 */
  59. #define CRIME_INT_PCI_SHARE_0 0x00002000 /* PCI shared 0 */
  60. #define CRIME_INT_PCI_SHARE_1 0x00004000 /* PCI shared 1 */
  61. #define CRIME_INT_PCI_SHARE_2 0x00008000 /* PCI shared 2 */
  62. #define CRIME_INT_GBE_0 0x00010000 /* GBE0 (E) */
  63. #define CRIME_INT_GBE_1 0x00020000 /* GBE1 (E) */
  64. #define CRIME_INT_GBE_2 0x00040000 /* GBE2 (E) */
  65. #define CRIME_INT_GBE_3 0x00080000 /* GBE3 (E) */
  66. #define CRIME_INT_CPU_ERR 0x00100000 /* CPU Errors */
  67. #define CRIME_INT_MEM_ERR 0x00200000 /* Memory Errors */
  68. #define CRIME_INT_RE_EDGE_EMPTY 0x00400000 /* RE */
  69. #define CRIME_INT_RE_EDGE_FULL 0x00800000 /* RE */
  70. #define CRIME_INT_RE_EDGE_IDLE 0x01000000 /* RE */
  71. #define CRIME_INT_RE_LEVL_EMPTY 0x02000000 /* RE */
  72. #define CRIME_INT_RE_LEVL_FULL 0x04000000 /* RE */
  73. #define CRIME_INT_RE_LEVL_IDLE 0x08000000 /* RE */
  74. #define CRIME_INT_SOFT_0 0x10000000 /* ??? */
  75. #define CRIME_INT_SOFT_1 0x20000000 /* ??? */
  76. #define CRIME_INT_SOFT_2 0x40000000 /* ??? */
  77. #define CRIME_INT_VICE 0x80000000 /* Video Image Compression Engine */
  78. #define CRIME_NINTS 32
  79. /*
  80. * Watchdog?
  81. */
  82. #define CRIME_KICK_DOG 0x0030
  83. #define CRIME_TIMER 0x0038
  84. #define CRIME_CPU_ERROR_ADDR 0x0040
  85. #define CRIME_CPU_ERROR_STAT 0x0048
  86. #define CRIME_CPU_ERROR_ENAB 0x0050
  87. #define CRIME_MEM_BANK0_CONTROL 0x0208
  88. #define CRIME_MEM_BANK_ADDR 0x01f
  89. #define CRIME_MEM_BANK_128MB 0x100
  90. #define CRIME_MAX_BANKS 8
  91. #define CRIME_MEMORY_OFFSET 0x40000000 /* 1GB */
  92. #define CRIME_MEMORY_MASK 0x3fffffff
  93. #define CRIME_MEM_ERROR_STAT 0x0250
  94. #define CRIME_MEM_ERROR_ADDR 0x0258
  95. extern bus_space_t crimebus_tag;
  96. #endif /* _CRIMEBUS_H_ */