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