vsbchip2.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:6k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* vsbchip2.h - VSBchip2 Interface Controller */
  2. /* Copyright 1994-1996 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,15nov96,dat  fixed SPR 4046, offset for VSBCHIP2_PTR was corrected.
  7. 01a,16feb94,dzb  written.
  8. */
  9. /*
  10. DESCRIPTION
  11. This file contains constants for the VSBchip2 interface controller.
  12. */
  13. #ifdef DOC
  14. #define __INCvsbchip2h
  15. #endif /* DOC */
  16. #ifndef __INCvsbchip2h
  17. #define __INCvsbchip2h
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #ifdef _ASMLANGUAGE
  22. #define CAST
  23. #define CAST_US
  24. #define CAST_UL
  25. #else
  26. #define CAST (char *)
  27. #define CAST_US (unsigned short *)
  28. #define CAST_UL (unsigned long *)
  29. #endif /* _ASMLANGUAGE */
  30. #ifndef VSBCHIP2_BASE_ADRS
  31. #define VSBCHIP2_BASE_ADRS 0xfff41000
  32. #endif /* VSBCHIP2_BASE_ADRS */
  33. #ifndef VSBCHIP2_REG_INTERVAL
  34. #define VSBCHIP2_REG_INTERVAL 1
  35. #endif /* VSBCHIP2_REG_INTERVAL */
  36. #ifndef VSB_ADRS
  37. #define VSB_ADRS(reg) (CAST VSBCHIP2_BASE_ADRS + (reg * VSBCHIP2_REG_INTERVAL))
  38. #endif /* VSB_ADRS */
  39. #ifndef VSB_ADRS_US
  40. #define VSB_ADRS_US(reg) (CAST_US VSB_ADRS(reg))
  41. #endif /* VSB_ADRS_US */
  42. #ifndef VSB_ADRS_UL
  43. #define VSB_ADRS_UL(reg) (CAST_UL VSB_ADRS(reg))
  44. #endif /* VSB_ADRS_UL */
  45. /**********************************/
  46. /* VSBCHIP2 register locations:   */
  47. /**********************************/
  48. #define VSBCHIP2_CCCSR VSB_ADRS_US (0x000) /* Chip Control/Status Reg */
  49. #define VSBCHIP2_LIVBR VSB_ADRS_US (0x002) /* Local Int Vector Base Reg */
  50. #define VSBCHIP2_LISR VSB_ADRS_US (0x004) /* Local Interrupt Status Reg */
  51. #define VSBCHIP2_LIER VSB_ADRS_US (0x006) /* Local Interrupt Enable Reg */
  52. #define VSBCHIP2_LILR VSB_ADRS_UL (0x008) /* Local Interrupt Level Reg */
  53. #define VSBCHIP2_VRCSR VSB_ADRS_US (0x010) /* VSB Req Control/Status Reg */
  54. #define VSBCHIP2_TCR VSB_ADRS_US (0x014) /* Timer Control Register */
  55. #define VSBCHIP2_TCPR VSB_ADRS_US (0x016) /* Timer Clock Prescale Reg */
  56. #define VSBCHIP2_LS1ARR VSB_ADRS_UL (0x018) /* Local Bus Slave Addr Reg 1 */
  57. #define VSBCHIP2_LS1AOR VSB_ADRS_US (0x01c) /* Local Bus Slave Off Reg 1 */
  58. #define VSBCHIP2_LS1AR VSB_ADRS_US (0x01e) /* Local Bus Slave Attr Reg 1 */
  59. #define VSBCHIP2_LS2ARR VSB_ADRS_UL (0x020) /* Local Bus Slave Addr Reg 2 */
  60. #define VSBCHIP2_LS2AOR VSB_ADRS_US (0x024) /* Local Bus Slave Off Reg 2 */
  61. #define VSBCHIP2_LS2AR VSB_ADRS_US (0x026) /* Local Bus Slave Attr Reg 2 */
  62. #define VSBCHIP2_LS3ARR VSB_ADRS_UL (0x028) /* Local Bus Slave Addr Reg 3 */
  63. #define VSBCHIP2_LS3AOR VSB_ADRS_US (0x02c) /* Local Bus Slave Off Reg 3 */
  64. #define VSBCHIP2_LS3AR VSB_ADRS_US (0x02e) /* Local Bus Slave Attr Reg 3 */
  65. #define VSBCHIP2_LS4ARR VSB_ADRS_UL (0x030) /* Local Bus Slave Addr Reg 4 */
  66. #define VSBCHIP2_LS4AOR VSB_ADRS_US (0x034) /* Local Bus Slave Off Reg 4 */
  67. #define VSBCHIP2_LS4AR VSB_ADRS_US (0x036) /* Local Bus Slave Attr Reg 4 */
  68. #define VSBCHIP2_LEAR VSB_ADRS_UL (0x074) /* Local Error Address Reg */
  69. #define VSBCHIP2_PCCR VSB_ADRS_UL (0x078) /* Prescaler Current Cnt Reg */
  70. #define VSBCHIP2_PTR VSB_ADRS_UL (0x07C) /* Prescaler Test Register */
  71. #define VSBCHIP2_EAR VSB_ADRS_UL (0x100) /* EVSB Attention Register */
  72. #define VSBCHIP2_ETASR VSB_ADRS_UL (0x104) /* EVSB Test-And-Set Reg */
  73. #define VSBCHIP2_GPR1 VSB_ADRS_UL (0x108) /* General Purpose Reg 1 */
  74. #define VSBCHIP2_GPR2 VSB_ADRS_UL (0x10c) /* General Purpose Reg 2 */
  75. #define VSBCHIP2_VESR VSB_ADRS_UL (0x110) /* VSB Error Status Register */
  76. #define VSBCHIP2_VICR VSB_ADRS (0x114) /* VSB Interrupt Control Reg */
  77. #define VSBCHIP2_VIVR VSB_ADRS (0x115) /* VSB Interrupt Vector Reg */
  78. #define VSBCHIP2_VIER VSB_ADRS (0x116) /* VSB Interrupt Enable Reg */
  79. #define VSBCHIP2_VISR VSB_ADRS (0x117) /* VSB Interrupt Status Reg */
  80. #define VSBCHIP2_VS1ARR VSB_ADRS_UL (0x118) /* VSB Slave Addr Range Reg 1 */
  81. #define VSBCHIP2_VS1AOR VSB_ADRS_US (0x11c) /* VSB Slave Addr Off Reg 1 */
  82. #define VSBCHIP2_VS1AR VSB_ADRS_US (0x11e) /* VSB Slave Attribute Reg 1 */
  83. #define VSBCHIP2_VS2ARR VSB_ADRS_UL (0x120) /* VSB Slave Addr Range Reg 2 */
  84. #define VSBCHIP2_VS2AOR VSB_ADRS_US (0x124) /* VSB Slave Addr Off Reg 2 */
  85. #define VSBCHIP2_VS2AR VSB_ADRS_US (0x126) /* VSB Slave Attribute Reg 2 */
  86. /**********************************/
  87. /* VSBCHIP2 register definitions: */
  88. /**********************************/
  89. /* VSBCHIP2_VRCSR register definitions: */
  90. #define VRCSR_LVRWD     0x0100  /* release when done */
  91. /* VSBCHIP2_VTCR register definitions: */
  92. #define VTCR_VARBTD     0x1000  /* VSB arbitration timer disable */
  93. #define VTCR_VATS_32MS  0x0800  /* VSB access timer select (32 msecs) */
  94. #define VTCR_VATS_DIS   0x0c00  /* VSB access timer select (32 msecs) */
  95. #define VTCR_VTXS_256US 0x0200  /* VSB transfer timer select (256 usecs) */
  96. #define VTCR_VTXS_DIS   0x0300  /* VSB transfer timer select disabled */
  97. /* VSBCHIP2_LS1AR register definitions: */
  98. #define LS1AR_REN       0x8000  /* read enable (when set, read access) */
  99. #define LS1AR_WEN       0x4000  /* write enable (when set, write access) */
  100. #define LS1AR_WPE       0x0800  /* write post enable */
  101. #define LS1AR_BNCEN     0x0080  /* bounce mode enable */
  102. #define LS1AR_VSP1      0x0020
  103. #define LS1AR_VSP0      0x0010
  104. /* VSBCHIP2_VS1AR register definitions: */
  105. #define VS1AR_REN       0x8000  /* read enable (when set, read access) */
  106. #define VS1AR_WEN       0x4000  /* write enable (when set, write access) */
  107. #define VS1AR_POR       0x2000  /* participate on read */
  108. #define VS1AR_POW       0x1000  /* participate on write */
  109. #define VS1AR_WPE       0x0800  /* write post enable */
  110. #define VS1AR_SAS       0x0400  /* system address space */
  111. #define VS1AR_ALTAS     0x0200  /* alternate address space */
  112. #define VS1AR_IOAS      0x0100  /* I/O address space */
  113. #define VS1AR_LOCK      0x0040  /* lock local bus on block transfers */
  114. #define VS1AR_LBTS1     0x0008
  115. #define VS1AR_LBTS0     0x0004  
  116. #define VS1AR_LBSC1     0x0002
  117. #define VS1AR_LBSC0     0x0001
  118.  
  119. #ifdef __cplusplus
  120. }
  121. #endif
  122.  
  123. #endif /* __INCvsbchip2h */