5 * Copyright (C) 1998/1999 R.E.Wolff@BitWizard.nl
8 * -- Supports SI, XIO and SX host cards.
9 * -- Supports TAs, MTAs and SXDCs.
11 * Version 1.3 -- March, 1999.
16 #define SX_PORTSPERBOARD 32
17 #define SX_NPORTS (SX_NBOARDS * SX_PORTSPERBOARD)
21 #define SX_MAGIC 0x12345678
26 struct tq_struct tqueue;
27 struct tq_struct tqueue_hangup;
29 struct wait_queue
*shutdown_wait
;
32 struct sx_board
*board
;
41 int port_base
; /* Number of the first port */
42 struct sx_port
*ports
;
48 struct timer_list timer
;
64 #ifndef MOD_RS232DB25MALE
65 #define MOD_RS232DB25MALE 0x0a
69 #define SX_BOARD_PRESENT 0x00000001
70 #define SX_ISA_BOARD 0x00000002
71 #define SX_PCI_BOARD 0x00000004
72 #define SI_ISA_BOARD 0x00000008
73 #define SX_BOARD_INITIALIZED 0x00000010
74 #define SX_IRQ_ALLOCATED 0x00000020
76 #define SX_BOARD_TYPE (SX_ISA_BOARD|SX_PCI_BOARD|SI_ISA_BOARD)
78 #define IS_SX_BOARD(board) (board->flags & (SX_PCI_BOARD | SX_ISA_BOARD))
79 #define IS_SI_BOARD(board) (board->flags & SI_ISA_BOARD)
82 #define SERIAL_TYPE_NORMAL 1
84 /* The SI processor clock is required to calculate the cc_int_count register
85 value for the SI cards. */
86 #define SI_PROCESSOR_CLOCK 25000000
90 /* Make sure these don't clash with gs flags or async flags */
91 #define SX_RX_THROTTLE 0x0000001
95 #define SX_PORT_TRANSMIT_LOCK 0
96 #define SX_BOARD_INTR_LOCK 0
100 /* Debug flags. Add these together to get more debug info. */
102 #define SX_DEBUG_OPEN 0x00000001
103 #define SX_DEBUG_SETTING 0x00000002
104 #define SX_DEBUG_FLOW 0x00000004
105 #define SX_DEBUG_MODEMSIGNALS 0x00000008
106 #define SX_DEBUG_TERMIOS 0x00000010
107 #define SX_DEBUG_TRANSMIT 0x00000020
108 #define SX_DEBUG_RECEIVE 0x00000040
109 #define SX_DEBUG_INTERRUPTS 0x00000080
110 #define SX_DEBUG_PROBE 0x00000100
111 #define SX_DEBUG_INIT 0x00000200
112 #define SX_DEBUG_CLEANUP 0x00000400
113 #define SX_DEBUG_CLOSE 0x00000800
114 #define SX_DEBUG_FIRMWARE 0x00001000
115 #define SX_DEBUG_MEMTEST 0x00002000
117 #define SX_DEBUG_ALL 0xffffffff
120 #define O_OTHER(tty) \
135 /* Same for input. */
136 #define I_OTHER(tty) \
143 #define MOD_TA ( TA>>4)
144 #define MOD_MTA (MTA_CD1400>>4)
145 #define MOD_SXDC ( SXDC>>4)
148 /* We copy the download code over to the card in chunks of ... bytes */
149 #define SX_CHUNK_SIZE 128
151 #endif /* __KERNEL__ */
155 /* Specialix document 6210046-11 page 3 */
156 #define SPX(X) (('S'<<24) | ('P' << 16) | (X))
158 /* Specialix-Linux specific IOCTLS. */
159 #define SPXL(X) (SPX(('L' << 8) | (X)))
162 #define SXIO_SET_BOARD SPXL(0x01)
163 #define SXIO_GET_TYPE SPXL(0x02)
164 #define SXIO_DOWNLOAD SPXL(0x03)
165 #define SXIO_INIT SPXL(0x04)
166 #define SXIO_SETDEBUG SPXL(0x05)
167 #define SXIO_GETDEBUG SPXL(0x06)
168 #define SXIO_DO_RAMTEST SPXL(0x07)
169 #define SXIO_SETGSDEBUG SPXL(0x08)
170 #define SXIO_GETGSDEBUG SPXL(0x09)
173 #ifndef SXCTL_MISC_MINOR
174 /* Allow others to gather this into "major.h" or something like that */
175 #define SXCTL_MISC_MINOR 167
178 #define SX_TYPE_SX 0x01
179 #define SX_TYPE_SI 0x02