x86: local.h fix checkpatch warnings
[linux-2.6/openmoko-kernel/knife-kernel.git] / include / linux / istallion.h
blob106a5e85e5c434e2fa784bb94c217d5864e6f609
1 /*****************************************************************************/
3 /*
4 * istallion.h -- stallion intelligent multiport serial driver.
6 * Copyright (C) 1996-1998 Stallion Technologies
7 * Copyright (C) 1994-1996 Greg Ungerer.
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.
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.
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.
24 /*****************************************************************************/
25 #ifndef _ISTALLION_H
26 #define _ISTALLION_H
27 /*****************************************************************************/
30 * Define important driver constants here.
32 #define STL_MAXBRDS 4
33 #define STL_MAXPANELS 4
34 #define STL_MAXPORTS 64
35 #define STL_MAXCHANS (STL_MAXPORTS + 1)
36 #define STL_MAXDEVS (STL_MAXBRDS * STL_MAXPORTS)
40 * Define a set of structures to hold all the board/panel/port info
41 * for our ports. These will be dynamically allocated as required at
42 * driver initialization time.
46 * Port and board structures to hold status info about each object.
47 * The board structure contains pointers to structures for each port
48 * connected to it. Panels are not distinguished here, since
49 * communication with the slave board will always be on a per port
50 * basis.
52 struct stliport {
53 unsigned long magic;
54 unsigned int portnr;
55 unsigned int panelnr;
56 unsigned int brdnr;
57 unsigned long state;
58 unsigned int devnr;
59 int flags;
60 int baud_base;
61 int custom_divisor;
62 int close_delay;
63 int closing_wait;
64 int refcount;
65 int openwaitcnt;
66 int rc;
67 int argsize;
68 void *argp;
69 unsigned int rxmarkmsk;
70 struct tty_struct *tty;
71 wait_queue_head_t open_wait;
72 wait_queue_head_t close_wait;
73 wait_queue_head_t raw_wait;
74 struct work_struct tqhangup;
75 struct asysigs asig;
76 unsigned long addr;
77 unsigned long rxoffset;
78 unsigned long txoffset;
79 unsigned long sigs;
80 unsigned long pflag;
81 unsigned int rxsize;
82 unsigned int txsize;
83 unsigned char reqbit;
84 unsigned char portidx;
85 unsigned char portbit;
89 * Use a structure of function pointers to do board level operations.
90 * These include, enable/disable, paging shared memory, interrupting, etc.
92 struct stlibrd {
93 unsigned long magic;
94 unsigned int brdnr;
95 unsigned int brdtype;
96 unsigned int state;
97 unsigned int nrpanels;
98 unsigned int nrports;
99 unsigned int nrdevs;
100 unsigned int iobase;
101 int iosize;
102 unsigned long memaddr;
103 void __iomem *membase;
104 unsigned long memsize;
105 int pagesize;
106 int hostoffset;
107 int slaveoffset;
108 int bitsize;
109 int enabval;
110 unsigned int panels[STL_MAXPANELS];
111 int panelids[STL_MAXPANELS];
112 void (*init)(struct stlibrd *brdp);
113 void (*enable)(struct stlibrd *brdp);
114 void (*reenable)(struct stlibrd *brdp);
115 void (*disable)(struct stlibrd *brdp);
116 void __iomem *(*getmemptr)(struct stlibrd *brdp, unsigned long offset, int line);
117 void (*intr)(struct stlibrd *brdp);
118 void (*reset)(struct stlibrd *brdp);
119 struct stliport *ports[STL_MAXPORTS];
124 * Define MAGIC numbers used for above structures.
126 #define STLI_PORTMAGIC 0xe671c7a1
127 #define STLI_BOARDMAGIC 0x4bc6c825
129 /*****************************************************************************/
130 #endif