epca.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #define XEMPORTS 0xC02
  2. #define XEPORTS 0xC22
  3. #define MAX_ALLOC 0x100
  4. #define MAXBOARDS 12
  5. #define FEPCODESEG 0x0200L
  6. #define FEPCODE 0x2000L
  7. #define BIOSCODE 0xf800L
  8. #define MISCGLOBAL 0x0C00L
  9. #define NPORT 0x0C22L
  10. #define MBOX 0x0C40L
  11. #define PORTBASE 0x0C90L
  12. /* Begin code defines used for epca_setup */
  13. #define INVALID_BOARD_TYPE 0x1
  14. #define INVALID_NUM_PORTS 0x2
  15. #define INVALID_MEM_BASE 0x4
  16. #define INVALID_PORT_BASE 0x8
  17. #define INVALID_BOARD_STATUS 0x10
  18. #define INVALID_ALTPIN 0x20
  19. /* End code defines used for epca_setup */
  20. #define FEPCLR 0x00
  21. #define FEPMEM 0x02
  22. #define FEPRST 0x04
  23. #define FEPINT 0x08
  24. #define FEPMASK 0x0e
  25. #define FEPWIN 0x80
  26. #define PCXE 0
  27. #define PCXEVE 1
  28. #define PCXEM 2
  29. #define EISAXEM 3
  30. #define PC64XE 4
  31. #define PCXI 5
  32. #define PCIXEM 7
  33. #define PCICX 8
  34. #define PCIXR 9
  35. #define PCIXRJ 10
  36. #define EPCA_NUM_TYPES 6
  37. static char *board_desc[] =
  38. {
  39. "PC/Xe",
  40. "PC/Xeve",
  41. "PC/Xem",
  42. "EISA/Xem",
  43. "PC/64Xe",
  44. "PC/Xi",
  45. "unknown",
  46. "PCI/Xem",
  47. "PCI/CX",
  48. "PCI/Xr",
  49. "PCI/Xrj",
  50. };
  51. #define STARTC 021
  52. #define STOPC 023
  53. #define IAIXON 0x2000
  54. #define TXSTOPPED 0x1
  55. #define LOWWAIT 0x2
  56. #define EMPTYWAIT 0x4
  57. #define RXSTOPPED 0x8
  58. #define TXBUSY 0x10
  59. #define DISABLED 0
  60. #define ENABLED 1
  61. #define OFF 0
  62. #define ON 1
  63. #define FEPTIMEOUT 200000
  64. #define SERIAL_TYPE_INFO 3
  65. #define EPCA_EVENT_HANGUP 1
  66. #define EPCA_MAGIC 0x5c6df104L
  67. struct channel
  68. {
  69. long magic;
  70. struct tty_port port;
  71. unsigned char boardnum;
  72. unsigned char channelnum;
  73. unsigned char omodem; /* FEP output modem status */
  74. unsigned char imodem; /* FEP input modem status */
  75. unsigned char modemfake; /* Modem values to be forced */
  76. unsigned char modem; /* Force values */
  77. unsigned char hflow;
  78. unsigned char dsr;
  79. unsigned char dcd;
  80. unsigned char m_rts ; /* The bits used in whatever FEP */
  81. unsigned char m_dcd ; /* is indiginous to this board to */
  82. unsigned char m_dsr ; /* represent each of the physical */
  83. unsigned char m_cts ; /* handshake lines */
  84. unsigned char m_ri ;
  85. unsigned char m_dtr ;
  86. unsigned char stopc;
  87. unsigned char startc;
  88. unsigned char stopca;
  89. unsigned char startca;
  90. unsigned char fepstopc;
  91. unsigned char fepstartc;
  92. unsigned char fepstopca;
  93. unsigned char fepstartca;
  94. unsigned char txwin;
  95. unsigned char rxwin;
  96. unsigned short fepiflag;
  97. unsigned short fepcflag;
  98. unsigned short fepoflag;
  99. unsigned short txbufhead;
  100. unsigned short txbufsize;
  101. unsigned short rxbufhead;
  102. unsigned short rxbufsize;
  103. int close_delay;
  104. unsigned long event;
  105. uint dev;
  106. unsigned long statusflags;
  107. unsigned long c_iflag;
  108. unsigned long c_cflag;
  109. unsigned long c_lflag;
  110. unsigned long c_oflag;
  111. unsigned char __iomem *txptr;
  112. unsigned char __iomem *rxptr;
  113. struct board_info *board;
  114. struct board_chan __iomem *brdchan;
  115. struct digi_struct digiext;
  116. struct work_struct tqueue;
  117. struct global_data __iomem *mailbox;
  118. };
  119. struct board_info
  120. {
  121. unsigned char status;
  122. unsigned char type;
  123. unsigned char altpin;
  124. unsigned short numports;
  125. unsigned long port;
  126. unsigned long membase;
  127. void __iomem *re_map_port;
  128. void __iomem *re_map_membase;
  129. unsigned long memory_seg;
  130. void ( * memwinon ) (struct board_info *, unsigned int) ;
  131. void ( * memwinoff ) (struct board_info *, unsigned int) ;
  132. void ( * globalwinon ) (struct channel *) ;
  133. void ( * txwinon ) (struct channel *) ;
  134. void ( * rxwinon ) (struct channel *) ;
  135. void ( * memoff ) (struct channel *) ;
  136. void ( * assertgwinon ) (struct channel *) ;
  137. void ( * assertmemoff ) (struct channel *) ;
  138. unsigned char poller_inhibited ;
  139. };