1 /*****************************************************************************/
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 /*****************************************************************************/
27 /*****************************************************************************/
30 * Define important driver constants here.
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
66 unsigned int rxmarkmsk
;
67 wait_queue_head_t raw_wait
;
70 unsigned long rxoffset
;
71 unsigned long txoffset
;
77 unsigned char portidx
;
78 unsigned char portbit
;
82 * Use a structure of function pointers to do board level operations.
83 * These include, enable/disable, paging shared memory, interrupting, etc.
90 unsigned int nrpanels
;
95 unsigned long memaddr
;
96 void __iomem
*membase
;
97 unsigned long memsize
;
103 unsigned int panels
[STL_MAXPANELS
];
104 int panelids
[STL_MAXPANELS
];
105 void (*init
)(struct stlibrd
*brdp
);
106 void (*enable
)(struct stlibrd
*brdp
);
107 void (*reenable
)(struct stlibrd
*brdp
);
108 void (*disable
)(struct stlibrd
*brdp
);
109 void __iomem
*(*getmemptr
)(struct stlibrd
*brdp
, unsigned long offset
, int line
);
110 void (*intr
)(struct stlibrd
*brdp
);
111 void (*reset
)(struct stlibrd
*brdp
);
112 struct stliport
*ports
[STL_MAXPORTS
];
117 * Define MAGIC numbers used for above structures.
119 #define STLI_PORTMAGIC 0xe671c7a1
120 #define STLI_BOARDMAGIC 0x4bc6c825
122 /*****************************************************************************/