hfc_2bds0.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /* $Id: hfc_2bds0.h,v 1.6.2.2 2004/01/12 22:52:26 keil Exp $
  2. *
  3. * specific defines for CCD's HFC 2BDS0
  4. *
  5. * Author Karsten Keil
  6. * Copyright by Karsten Keil <keil@isdn4linux.de>
  7. *
  8. * This software may be used and distributed according to the terms
  9. * of the GNU General Public License, incorporated herein by reference.
  10. *
  11. */
  12. #define HFCD_CIRM 0x18
  13. #define HFCD_CTMT 0x19
  14. #define HFCD_INT_M1 0x1A
  15. #define HFCD_INT_M2 0x1B
  16. #define HFCD_INT_S1 0x1E
  17. #define HFCD_STAT 0x1C
  18. #define HFCD_STAT_DISB 0x1D
  19. #define HFCD_STATES 0x30
  20. #define HFCD_SCTRL 0x31
  21. #define HFCD_TEST 0x32
  22. #define HFCD_SQ 0x34
  23. #define HFCD_CLKDEL 0x37
  24. #define HFCD_MST_MODE 0x2E
  25. #define HFCD_CONN 0x2F
  26. #define HFCD_FIFO 0x80
  27. #define HFCD_Z1 0x10
  28. #define HFCD_Z2 0x18
  29. #define HFCD_Z_LOW 0x00
  30. #define HFCD_Z_HIGH 0x04
  31. #define HFCD_F1_INC 0x12
  32. #define HFCD_FIFO_IN 0x16
  33. #define HFCD_F1 0x1a
  34. #define HFCD_F2 0x1e
  35. #define HFCD_F2_INC 0x22
  36. #define HFCD_FIFO_OUT 0x26
  37. #define HFCD_REC 0x01
  38. #define HFCD_SEND 0x00
  39. #define HFCB_FIFO 0x80
  40. #define HFCB_Z1 0x00
  41. #define HFCB_Z2 0x08
  42. #define HFCB_Z_LOW 0x00
  43. #define HFCB_Z_HIGH 0x04
  44. #define HFCB_F1_INC 0x28
  45. #define HFCB_FIFO_IN 0x2c
  46. #define HFCB_F1 0x30
  47. #define HFCB_F2 0x34
  48. #define HFCB_F2_INC 0x38
  49. #define HFCB_FIFO_OUT 0x3c
  50. #define HFCB_REC 0x01
  51. #define HFCB_SEND 0x00
  52. #define HFCB_B1 0x00
  53. #define HFCB_B2 0x02
  54. #define HFCB_CHANNEL(ch) (ch ? HFCB_B2 : HFCB_B1)
  55. #define HFCD_STATUS 0
  56. #define HFCD_DATA 1
  57. #define HFCD_DATA_NODEB 2
  58. /* Status (READ) */
  59. #define HFCD_BUSY 0x01
  60. #define HFCD_BUSY_NBUSY 0x04
  61. #define HFCD_TIMER_ELAP 0x10
  62. #define HFCD_STATINT 0x20
  63. #define HFCD_FRAMEINT 0x40
  64. #define HFCD_ANYINT 0x80
  65. /* CTMT (Write) */
  66. #define HFCD_CLTIMER 0x80
  67. #define HFCD_TIM25 0x00
  68. #define HFCD_TIM50 0x08
  69. #define HFCD_TIM400 0x10
  70. #define HFCD_TIM800 0x18
  71. #define HFCD_AUTO_TIMER 0x20
  72. #define HFCD_TRANSB2 0x02
  73. #define HFCD_TRANSB1 0x01
  74. /* CIRM (Write) */
  75. #define HFCD_RESET 0x08
  76. #define HFCD_MEM8K 0x10
  77. #define HFCD_INTA 0x01
  78. #define HFCD_INTB 0x02
  79. #define HFCD_INTC 0x03
  80. #define HFCD_INTD 0x04
  81. #define HFCD_INTE 0x05
  82. #define HFCD_INTF 0x06
  83. /* INT_M1;INT_S1 */
  84. #define HFCD_INTS_B1TRANS 0x01
  85. #define HFCD_INTS_B2TRANS 0x02
  86. #define HFCD_INTS_DTRANS 0x04
  87. #define HFCD_INTS_B1REC 0x08
  88. #define HFCD_INTS_B2REC 0x10
  89. #define HFCD_INTS_DREC 0x20
  90. #define HFCD_INTS_L1STATE 0x40
  91. #define HFCD_INTS_TIMER 0x80
  92. /* INT_M2 */
  93. #define HFCD_IRQ_ENABLE 0x08
  94. /* STATES */
  95. #define HFCD_LOAD_STATE 0x10
  96. #define HFCD_ACTIVATE 0x20
  97. #define HFCD_DO_ACTION 0x40
  98. /* HFCD_MST_MODE */
  99. #define HFCD_MASTER 0x01
  100. /* HFCD_SCTRL */
  101. #define SCTRL_B1_ENA 0x01
  102. #define SCTRL_B2_ENA 0x02
  103. #define SCTRL_LOW_PRIO 0x08
  104. #define SCTRL_SQ_ENA 0x10
  105. #define SCTRL_TEST 0x20
  106. #define SCTRL_NONE_CAP 0x40
  107. #define SCTRL_PWR_DOWN 0x80
  108. /* HFCD_TEST */
  109. #define HFCD_AUTO_AWAKE 0x01
  110. extern void main_irq_2bds0(struct BCState *bcs);
  111. extern void init2bds0(struct IsdnCardState *cs);
  112. extern void release2bds0(struct IsdnCardState *cs);
  113. extern void hfc2bds0_interrupt(struct IsdnCardState *cs, u_char val);
  114. extern void set_cs_func(struct IsdnCardState *cs);