aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/istallion.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/istallion.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/istallion.h')
-rw-r--r--include/linux/istallion.h132
1 files changed, 132 insertions, 0 deletions
diff --git a/include/linux/istallion.h b/include/linux/istallion.h
new file mode 100644
index 000000000000..5f4ee646c119
--- /dev/null
+++ b/include/linux/istallion.h
@@ -0,0 +1,132 @@
1/*****************************************************************************/
2
3/*
4 * istallion.h -- stallion intelligent multiport serial driver.
5 *
6 * Copyright (C) 1996-1998 Stallion Technologies
7 * Copyright (C) 1994-1996 Greg Ungerer.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24#include <linux/version.h>
25
26/*****************************************************************************/
27#ifndef _ISTALLION_H
28#define _ISTALLION_H
29/*****************************************************************************/
30
31/*
32 * Define important driver constants here.
33 */
34#define STL_MAXBRDS 4
35#define STL_MAXPANELS 4
36#define STL_MAXPORTS 64
37#define STL_MAXCHANS (STL_MAXPORTS + 1)
38#define STL_MAXDEVS (STL_MAXBRDS * STL_MAXPORTS)
39
40
41/*
42 * Define a set of structures to hold all the board/panel/port info
43 * for our ports. These will be dynamically allocated as required at
44 * driver initialization time.
45 */
46
47/*
48 * Port and board structures to hold status info about each object.
49 * The board structure contains pointers to structures for each port
50 * connected to it. Panels are not distinguished here, since
51 * communication with the slave board will always be on a per port
52 * basis.
53 */
54typedef struct {
55 unsigned long magic;
56 int portnr;
57 int panelnr;
58 int brdnr;
59 unsigned long state;
60 int devnr;
61 int flags;
62 int baud_base;
63 int custom_divisor;
64 int close_delay;
65 int closing_wait;
66 int refcount;
67 int openwaitcnt;
68 int rc;
69 int argsize;
70 void *argp;
71 unsigned int rxmarkmsk;
72 struct tty_struct *tty;
73 wait_queue_head_t open_wait;
74 wait_queue_head_t close_wait;
75 wait_queue_head_t raw_wait;
76 struct work_struct tqhangup;
77 asysigs_t asig;
78 unsigned long addr;
79 unsigned long rxoffset;
80 unsigned long txoffset;
81 unsigned long sigs;
82 unsigned long pflag;
83 unsigned int rxsize;
84 unsigned int txsize;
85 unsigned char reqbit;
86 unsigned char portidx;
87 unsigned char portbit;
88} stliport_t;
89
90/*
91 * Use a structure of function pointers to do board level operations.
92 * These include, enable/disable, paging shared memory, interrupting, etc.
93 */
94typedef struct stlibrd {
95 unsigned long magic;
96 int brdnr;
97 int brdtype;
98 int state;
99 int nrpanels;
100 int nrports;
101 int nrdevs;
102 unsigned int iobase;
103 int iosize;
104 unsigned long memaddr;
105 void *membase;
106 int memsize;
107 int pagesize;
108 int hostoffset;
109 int slaveoffset;
110 int bitsize;
111 int enabval;
112 int panels[STL_MAXPANELS];
113 int panelids[STL_MAXPANELS];
114 void (*init)(struct stlibrd *brdp);
115 void (*enable)(struct stlibrd *brdp);
116 void (*reenable)(struct stlibrd *brdp);
117 void (*disable)(struct stlibrd *brdp);
118 char *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line);
119 void (*intr)(struct stlibrd *brdp);
120 void (*reset)(struct stlibrd *brdp);
121 stliport_t *ports[STL_MAXPORTS];
122} stlibrd_t;
123
124
125/*
126 * Define MAGIC numbers used for above structures.
127 */
128#define STLI_PORTMAGIC 0xe671c7a1
129#define STLI_BOARDMAGIC 0x4bc6c825
130
131/*****************************************************************************/
132#endif