intreg.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* $OpenBSD: intreg.h,v 1.2 2012/04/15 20:44:52 miod Exp $ */
  2. /* $NetBSD: int2reg.h,v 1.5 2009/02/12 06:33:57 rumble Exp $ */
  3. /*
  4. * Copyright (c) 2004 Christopher SEKIYA
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. The name of the author may not be used to endorse or promote products
  16. * derived from this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  19. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  20. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  21. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  23. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  27. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. */
  29. /* The INT has known locations on all SGI machines */
  30. #define INT2_IP20 0x1fb801c0
  31. #define INT2_IP22 0x1fbd9000
  32. #define INT2_IP24 0x1fbd9880
  33. /* The following registers are all 8 bit. */
  34. #define INT2_LOCAL0_STATUS 0x03
  35. #define INT2_LOCAL0_STATUS_FIFO 0x01
  36. #define INT2_LOCAL0_MASK 0x07
  37. #define INT2_LOCAL1_STATUS 0x0b
  38. #define INT2_LOCAL1_MASK 0x0f
  39. #define INT2_IP22_MAP_STATUS 0x13
  40. #define INT2_IP22_MAP_MASK0 0x17
  41. #define INT2_IP22_MAP_MASK1 0x1b
  42. #define INT2_IP22_MAP_POL 0x1f
  43. #define INT2_IP20_LED 0x1f
  44. #define INT2_TIMER_CLEAR 0x23
  45. #define INT2_ERROR_STATUS 0x27
  46. #define INT2_TIMER_0 0x33
  47. #define INT2_TIMER_1 0x37
  48. #define INT2_TIMER_2 0x3b
  49. #define INT2_TIMER_CONTROL 0x3f
  50. /* LOCAL0 bits */
  51. #define INT2_L0_FIFO 0
  52. #define INT2_L0_GIO_SLOT0 0 /* IP24 */
  53. #define INT2_L0_GIO_LVL0 0 /* IP20/IP22 */
  54. #define INT2_L0_IP20_PARALLEL 1
  55. #define INT2_L0_IP22_SCSI0 1
  56. #define INT2_L0_SCSI1 2
  57. #define INT2_L0_ENET 3
  58. #define INT2_L0_GFX_DMA 4
  59. #define INT2_L0_IP20_SERIAL 5
  60. #define INT2_L0_IP22_PARALLEL 5
  61. #define INT2_L0_GIO_LVL1 6 /* IP20/IP22 */
  62. #define INT2_L0_IP20_VME0 7
  63. #define INT2_L0_IP22_MAP0 7
  64. /* LOCAL1 bits */
  65. #define INT2_L1_IP24_ISDN_ISAC 0
  66. #define INT2_L1_IP20_GR1MODE 1 /* not an interrupt but a status bit */
  67. #define INT2_L1_IP22_PANEL 1
  68. #define INT2_L1_IP24_ISDN_HSCX 2
  69. #define INT2_L1_IP20_VME1 3
  70. #define INT2_L1_IP22_MAP1 3
  71. #define INT2_L1_IP20_DSP 4
  72. #define INT2_L1_IP22_HPC_DMA 4
  73. #define INT2_L1_ACFAIL 5
  74. #define INT2_L1_VIDEO 6
  75. #define INT2_L1_RETRACE 7
  76. #define INT2_L1_GIO_LVL2 7 /* IP20/IP22 */
  77. /* MAP bits */
  78. #define INT2_MAP_NEWPORT 0 /* IP24 */
  79. #define INT2_MAP_PASSWD 1
  80. #define INT2_MAP_ISDN_POWER 2 /* IP24 */
  81. #define INT2_MAP_EISA 3 /* IP22 */
  82. #define INT2_MAP_PCKBC 4
  83. #define INT2_MAP_SERIAL 5
  84. #define INT2_MAP_GFX0_DRAIN 6 /* IP22 */
  85. #define INT2_MAP_GIO_SLOT0 6 /* IP24 */
  86. #define INT2_MAP_GFX1_DRAIN 7 /* IP22 */
  87. #define INT2_MAP_GIO_SLOT1 7 /* IP24 */
  88. #define INT2_L0_INTR(x) ((x) + 0)
  89. #define INT2_L1_INTR(x) ((x) + 8)
  90. #define INT2_MAP0_INTR(x) ((x) + 16)
  91. #define INT2_MAP1_INTR(x) ((x) + 24)