aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/isicom.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/isicom.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/isicom.h')
-rw-r--r--include/linux/isicom.h131
1 files changed, 131 insertions, 0 deletions
diff --git a/include/linux/isicom.h b/include/linux/isicom.h
new file mode 100644
index 000000000000..7c6eae7f6ed7
--- /dev/null
+++ b/include/linux/isicom.h
@@ -0,0 +1,131 @@
1#ifndef _LINUX_ISICOM_H
2#define _LINUX_ISICOM_H
3
4/*#define ISICOM_DEBUG*/
5/*#define ISICOM_DEBUG_DTR_RTS*/
6
7
8/*
9 * Firmware Loader definitions ...
10 */
11
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)
17
18#define DATA_SIZE 16
19
20typedef struct {
21 unsigned short exec_segment;
22 unsigned short exec_addr;
23} exec_record;
24
25typedef struct {
26 int board; /* Board to load */
27 unsigned short addr;
28 unsigned short count;
29} bin_header;
30
31typedef 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;
38
39#ifdef __KERNEL__
40
41#define YES 1
42#define NO 0
43
44#define ISILOAD_MISC_MINOR 155 /* /dev/isctl */
45#define ISILOAD_NAME "ISILoad"
46
47/*
48 * ISICOM Driver definitions ...
49 *
50 */
51
52#define ISICOM_NAME "ISICom"
53
54/*
55 * PCI definitions
56 */
57
58 #define DEVID_COUNT 9
59 #define VENDOR_ID 0x10b5
60
61/*
62 * These are now officially allocated numbers
63 */
64
65#define ISICOM_NMAJOR 112 /* normal */
66#define ISICOM_CMAJOR 113 /* callout */
67#define ISICOM_MAGIC (('M' << 8) | 'T')
68
69#define WAKEUP_CHARS 256 /* hard coded for now */
70#define TX_SIZE 254
71
72#define BOARD_COUNT 4
73#define PORT_COUNT (BOARD_COUNT*16)
74
75#define SERIAL_TYPE_NORMAL 1
76
77/* character sizes */
78
79#define ISICOM_CS5 0x0000
80#define ISICOM_CS6 0x0001
81#define ISICOM_CS7 0x0002
82#define ISICOM_CS8 0x0003
83
84/* stop bits */
85
86#define ISICOM_1SB 0x0000
87#define ISICOM_2SB 0x0004
88
89/* parity */
90
91#define ISICOM_NOPAR 0x0000
92#define ISICOM_ODPAR 0x0008
93#define ISICOM_EVPAR 0x0018
94
95/* flow control */
96
97#define ISICOM_CTSRTS 0x03
98#define ISICOM_INITIATE_XONXOFF 0x04
99#define ISICOM_RESPOND_XONXOFF 0x08
100
101#define InterruptTheCard(base) (outw(0,(base)+0xc))
102#define ClearInterrupt(base) (inw((base)+0x0a))
103
104#define BOARD(line) (((line) >> 4) & 0x3)
105
106 /* isi kill queue bitmap */
107
108#define ISICOM_KILLTX 0x01
109#define ISICOM_KILLRX 0x02
110
111 /* isi_board status bitmap */
112
113#define FIRMWARE_LOADED 0x0001
114#define BOARD_ACTIVE 0x0002
115
116 /* isi_port status bitmap */
117
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
124
125
126#define ISI_TXOK 0x0001
127
128#endif /* __KERNEL__ */
129
130#endif /* ISICOM_H */
131