Go to the documentation of this file.
27 #ifndef __JSM_DRIVER_H
28 #define __JSM_DRIVER_H
30 #include <linux/kernel.h>
31 #include <linux/types.h>
32 #include <linux/tty.h>
33 #include <linux/serial_core.h>
34 #include <linux/device.h>
60 #define jsm_printk(nlevel, klevel, pdev, fmt, args...) \
61 if ((DBG_##nlevel & jsm_debug)) \
62 dev_printk(KERN_##klevel, pdev->dev, fmt, ## args)
66 #define MAX_STOPS_SENT 5
71 #define T_CLASSIC 0001
76 #define BD_RUNNING 0x0
77 #define BD_REASON 0x7f
78 #define BD_NOTFOUND 0x1
79 #define BD_NOIOPORT 0x2
84 #define BD_ALLOCATED 0x7
85 #define BD_TRIBOOT 0x8
86 #define BD_BADKME 0x80
90 #define WRITEBUFLEN ((4096) + 4)
92 #define JSM_VERSION "jsm: 1.2-1-INKERNEL"
93 #define JSM_PARTNUM "40002438_A-INKERNEL"
163 #define CH_PRON 0x0001
164 #define CH_STOP 0x0002
165 #define CH_STOPI 0x0004
167 #define CH_FCAR 0x0010
168 #define CH_HANGUP 0x0020
170 #define CH_RECEIVER_OFF 0x0040
171 #define CH_OPENING 0x0080
172 #define CH_CLOSING 0x0100
173 #define CH_FIFO_ENABLED 0x0200
174 #define CH_TX_FIFO_EMPTY 0x0400
175 #define CH_TX_FIFO_LWM 0x0800
176 #define CH_BREAK_SENDING 0x1000
177 #define CH_LOOPBACK 0x2000
178 #define CH_BAUD0 0x08000
181 #define RQUEUEMASK 0x1FFF
182 #define EQUEUEMASK 0x1FFF
183 #define RQUEUESIZE (RQUEUEMASK + 1)
184 #define EQUEUESIZE RQUEUESIZE
280 #define UART_17158_POLL_ADDR_OFFSET 0x80
288 #define UART_17158_FCTR_RTS_NODELAY 0x00
289 #define UART_17158_FCTR_RTS_4DELAY 0x01
290 #define UART_17158_FCTR_RTS_6DELAY 0x02
291 #define UART_17158_FCTR_RTS_8DELAY 0x03
292 #define UART_17158_FCTR_RTS_12DELAY 0x12
293 #define UART_17158_FCTR_RTS_16DELAY 0x05
294 #define UART_17158_FCTR_RTS_20DELAY 0x13
295 #define UART_17158_FCTR_RTS_24DELAY 0x06
296 #define UART_17158_FCTR_RTS_28DELAY 0x14
297 #define UART_17158_FCTR_RTS_32DELAY 0x07
298 #define UART_17158_FCTR_RTS_36DELAY 0x16
299 #define UART_17158_FCTR_RTS_40DELAY 0x08
300 #define UART_17158_FCTR_RTS_44DELAY 0x09
301 #define UART_17158_FCTR_RTS_48DELAY 0x10
302 #define UART_17158_FCTR_RTS_52DELAY 0x11
304 #define UART_17158_FCTR_RTS_IRDA 0x10
305 #define UART_17158_FCTR_RS485 0x20
306 #define UART_17158_FCTR_TRGA 0x00
307 #define UART_17158_FCTR_TRGB 0x40
308 #define UART_17158_FCTR_TRGC 0x80
309 #define UART_17158_FCTR_TRGD 0xC0
312 #define UART_17158_FCTR_BIT6 0x40
313 #define UART_17158_FCTR_BIT7 0x80
316 #define UART_17158_RX_FIFOSIZE 64
317 #define UART_17158_TX_FIFOSIZE 64
320 #define UART_17158_IIR_RDI_TIMEOUT 0x0C
321 #define UART_17158_IIR_XONXOFF 0x10
322 #define UART_17158_IIR_HWFLOW_STATE_CHANGE 0x20
323 #define UART_17158_IIR_FIFO_ENABLED 0xC0
329 #define UART_17158_RX_LINE_STATUS 0x1
330 #define UART_17158_RXRDY_TIMEOUT 0x2
331 #define UART_17158_TXRDY 0x3
332 #define UART_17158_MSR 0x4
333 #define UART_17158_TX_AND_FIFO_CLR 0x40
334 #define UART_17158_RX_FIFO_DATA_ERROR 0x80
340 #define UART_17158_EFR_ECB 0x10
341 #define UART_17158_EFR_IXON 0x2
342 #define UART_17158_EFR_IXOFF 0x8
343 #define UART_17158_EFR_RTSDTR 0x40
344 #define UART_17158_EFR_CTSDSR 0x80
346 #define UART_17158_XOFF_DETECT 0x1
347 #define UART_17158_XON_DETECT 0x2
349 #define UART_17158_IER_RSVD1 0x10
350 #define UART_17158_IER_XOFF 0x20
351 #define UART_17158_IER_RTSDTR 0x40
352 #define UART_17158_IER_CTSDSR 0x80
354 #define PCI_DEVICE_NEO_2DB9_PCI_NAME "Neo 2 - DB9 Universal PCI"
355 #define PCI_DEVICE_NEO_2DB9PRI_PCI_NAME "Neo 2 - DB9 Universal PCI - Powered Ring Indicator"
356 #define PCI_DEVICE_NEO_2RJ45_PCI_NAME "Neo 2 - RJ45 Universal PCI"
357 #define PCI_DEVICE_NEO_2RJ45PRI_PCI_NAME "Neo 2 - RJ45 Universal PCI - Powered Ring Indicator"
358 #define PCIE_DEVICE_NEO_IBM_PCI_NAME "Neo 4 - PCI Express - IBM"