[PATCH] dvb: saa7134-dvb must select tda1004x
[linux-ginger.git] / include / linux / isicom.h
blob7c6eae7f6ed73cacc5ab81268684020bd768bac1
1 #ifndef _LINUX_ISICOM_H
2 #define _LINUX_ISICOM_H
4 /*#define ISICOM_DEBUG*/
5 /*#define ISICOM_DEBUG_DTR_RTS*/
8 /*
9 * Firmware Loader definitions ...
12 #define __MultiTech ('M'<<8)
13 #define MIOCTL_LOAD_FIRMWARE (__MultiTech | 0x01)
14 #define MIOCTL_READ_FIRMWARE (__MultiTech | 0x02)
15 #define MIOCTL_XFER_CTRL (__MultiTech | 0x03)
16 #define MIOCTL_RESET_CARD (__MultiTech | 0x04)
18 #define DATA_SIZE 16
20 typedef struct {
21 unsigned short exec_segment;
22 unsigned short exec_addr;
23 } exec_record;
25 typedef struct {
26 int board; /* Board to load */
27 unsigned short addr;
28 unsigned short count;
29 } bin_header;
31 typedef struct {
32 int board; /* Board to load */
33 unsigned short addr;
34 unsigned short count;
35 unsigned short segment;
36 unsigned char bin_data[DATA_SIZE];
37 } bin_frame;
39 #ifdef __KERNEL__
41 #define YES 1
42 #define NO 0
44 #define ISILOAD_MISC_MINOR 155 /* /dev/isctl */
45 #define ISILOAD_NAME "ISILoad"
47 /*
48 * ISICOM Driver definitions ...
52 #define ISICOM_NAME "ISICom"
55 * PCI definitions
58 #define DEVID_COUNT 9
59 #define VENDOR_ID 0x10b5
62 * These are now officially allocated numbers
65 #define ISICOM_NMAJOR 112 /* normal */
66 #define ISICOM_CMAJOR 113 /* callout */
67 #define ISICOM_MAGIC (('M' << 8) | 'T')
69 #define WAKEUP_CHARS 256 /* hard coded for now */
70 #define TX_SIZE 254
72 #define BOARD_COUNT 4
73 #define PORT_COUNT (BOARD_COUNT*16)
75 #define SERIAL_TYPE_NORMAL 1
77 /* character sizes */
79 #define ISICOM_CS5 0x0000
80 #define ISICOM_CS6 0x0001
81 #define ISICOM_CS7 0x0002
82 #define ISICOM_CS8 0x0003
84 /* stop bits */
86 #define ISICOM_1SB 0x0000
87 #define ISICOM_2SB 0x0004
89 /* parity */
91 #define ISICOM_NOPAR 0x0000
92 #define ISICOM_ODPAR 0x0008
93 #define ISICOM_EVPAR 0x0018
95 /* flow control */
97 #define ISICOM_CTSRTS 0x03
98 #define ISICOM_INITIATE_XONXOFF 0x04
99 #define ISICOM_RESPOND_XONXOFF 0x08
101 #define InterruptTheCard(base) (outw(0,(base)+0xc))
102 #define ClearInterrupt(base) (inw((base)+0x0a))
104 #define BOARD(line) (((line) >> 4) & 0x3)
106 /* isi kill queue bitmap */
108 #define ISICOM_KILLTX 0x01
109 #define ISICOM_KILLRX 0x02
111 /* isi_board status bitmap */
113 #define FIRMWARE_LOADED 0x0001
114 #define BOARD_ACTIVE 0x0002
116 /* isi_port status bitmap */
118 #define ISI_CTS 0x1000
119 #define ISI_DSR 0x2000
120 #define ISI_RI 0x4000
121 #define ISI_DCD 0x8000
122 #define ISI_DTR 0x0100
123 #define ISI_RTS 0x0200
126 #define ISI_TXOK 0x0001
128 #endif /* __KERNEL__ */
130 #endif /* ISICOM_H */