initial commit with v2.6.9
[linux-2.6.9-moxart.git] / drivers / char / rio / func.h
blob1e15d1cf0a102bbf7995d9f7827f4b4888e5ccbf
1 /*
2 ** -----------------------------------------------------------------------------
3 **
4 ** Perle Specialix driver for Linux
5 ** Ported from existing RIO Driver for SCO sources.
7 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
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.
23 ** Module : func.h
24 ** SID : 1.3
25 ** Last Modified : 11/6/98 11:34:10
26 ** Retrieved : 11/6/98 11:34:21
28 ** ident @(#)func.h 1.3
30 ** -----------------------------------------------------------------------------
33 #ifndef __func_h_def
34 #define __func_h_def
36 #include <linux/kdev_t.h>
38 #ifdef SCCS_LABELS
39 #ifndef lint
40 static char *_func_h_sccs_ = "@(#)func.h 1.3";
41 #endif
42 #endif
44 /* rioboot.c */
45 int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
46 int RIOBootCodeHOST(struct rio_info *, register struct DownLoad *);
47 int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
48 void msec_timeout(struct Host *);
49 int RIOBootRup(struct rio_info *, uint, struct Host *, struct PKT *);
50 int RIOBootComplete(struct rio_info *, struct Host *, uint, struct PktCmd *);
51 int RIOBootOk(struct rio_info *,struct Host *, ulong);
52 int RIORtaBound(struct rio_info *, uint);
53 void FillSlot(int, int, uint, struct Host *);
55 /* riocmd.c */
56 int RIOFoadRta(struct Host *, struct Map *);
57 int RIOZombieRta(struct Host *, struct Map *);
58 int RIOCommandRta(struct rio_info *, uint, int (* func)( struct Host *,
59 struct Map *));
60 int RIOIdentifyRta(struct rio_info *, caddr_t);
61 int RIOKillNeighbour(struct rio_info *, caddr_t);
62 int RIOSuspendBootRta(struct Host *, int, int);
63 int RIOFoadWakeup(struct rio_info *);
64 int RIOCommandRup(struct rio_info *, uint, struct Host *, struct PKT *);
65 struct CmdBlk * RIOGetCmdBlk(void);
66 void RIOFreeCmdBlk(struct CmdBlk *);
67 int RIOQueueCmdBlk(struct Host *, uint, struct CmdBlk *);
68 void RIOPollHostCommands(struct rio_info *, struct Host *);
69 int RIOStrlen(register char *);
70 int RIOStrCmp(register char *, register char *);
71 int RIOStrnCmp(register char *, register char *, int);
72 void RIOStrNCpy(char *, char *, int);
73 int RIOWFlushMark(int, struct CmdBlk *);
74 int RIORFlushEnable(int, struct CmdBlk *);
75 int RIOUnUse(int, struct CmdBlk *);
76 void ShowPacket(uint, struct PKT *);
78 /* rioctrl.c */
79 int copyin(int, caddr_t, int);
80 int copyout(caddr_t, int, int);
81 int riocontrol(struct rio_info *, dev_t,int,caddr_t,int);
82 int RIOPreemptiveCmd(struct rio_info *,struct Port *,uchar);
84 /* rioinit.c */
85 void rioinit(struct rio_info *, struct RioHostInfo *);
86 void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
87 void RIOISAinit(struct rio_info *,int);
88 int RIODoAT(struct rio_info *, int, int);
89 caddr_t RIOCheckForATCard(int);
90 int RIOAssignAT(struct rio_info *, int, caddr_t, int);
91 int RIOBoardTest(paddr_t, caddr_t, uchar, int);
92 int RIOScrub(int, BYTE *, int);
93 void RIOAllocateInterrupts(struct rio_info *);
94 void RIOStopInterrupts(struct rio_info *, int, int);
95 void RIOAllocDataStructs(struct rio_info *);
96 void RIOSetupDataStructs(struct rio_info *);
97 int RIODefaultName(struct rio_info *, struct Host *, uint);
98 int RIOReport(struct rio_info *);
99 struct rioVersion * RIOVersid(void);
100 int RIOMapin(paddr_t, int, caddr_t *);
101 void RIOMapout(paddr_t, long, caddr_t);
102 void RIOHostReset(uint, volatile struct DpRam *, uint);
104 /* riointr.c */
105 void riopoll(struct rio_info *);
106 void riointr(struct rio_info *);
107 void RIOTxEnable(char *);
108 void RIOServiceHost(struct rio_info *, struct Host *, int);
109 void RIOReceive(struct rio_info *, struct Port *);
110 int riotproc(struct rio_info *, register struct ttystatics *, int, int);
112 /* rioparam.c */
113 int RIOParam(struct Port *, int, int, int);
114 int RIODelay(struct Port *PortP, int);
115 int RIODelay_ni(struct Port *PortP, int);
116 void ms_timeout(struct Port *);
117 int can_add_transmit(struct PKT **, struct Port *);
118 void add_transmit(struct Port *);
119 void put_free_end(struct Host *, struct PKT *);
120 int can_remove_receive(struct PKT **, struct Port *);
121 void remove_receive(struct Port *);
123 /* rioroute.c */
124 int RIORouteRup(struct rio_info *, uint, struct Host *, struct PKT *);
125 void RIOFixPhbs(struct rio_info *, struct Host *, uint);
126 int RIOCheckIsolated(struct rio_info *, struct Host *, uint);
127 int RIOIsolate(struct rio_info *, struct Host *, uint);
128 int RIOCheck(struct Host *, uint);
129 uint GetUnitType(uint);
130 int RIOSetChange(struct rio_info *);
131 void RIOConCon(struct rio_info *, struct Host *, uint, uint, uint, uint, int);
132 int RIOFindFreeID(struct rio_info *, struct Host *, uint *, uint *);
133 int RIOFreeDisconnected(struct rio_info *, struct Host *, int );
134 int RIORemoveFromSavedTable(struct rio_info *, struct Map *);
137 /* riotty.c */
139 int riotopen(struct tty_struct * tty, struct file * filp);
140 int riotclose(void *ptr);
141 int RIOCookMode(struct ttystatics *);
142 int riotioctl(struct rio_info *, struct tty_struct *, register int, register caddr_t);
143 void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
145 /* riotable.c */
146 int RIONewTable(struct rio_info *);
147 int RIOApel(struct rio_info *);
148 int RIODeleteRta(struct rio_info *, struct Map *);
149 int RIOAssignRta(struct rio_info *, struct Map *);
150 int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *);
151 int RIOChangeName(struct rio_info *, struct Map*);
153 #if 0
154 /* riodrvr.c */
155 struct rio_info * rio_install(struct RioHostInfo *);
156 int rio_uninstall(register struct rio_info *);
157 int rio_open(struct rio_info *, int, struct file *);
158 int rio_close(struct rio_info *, struct file *);
159 int rio_read(struct rio_info *, struct file *, char *, int);
160 int rio_write(struct rio_info *, struct file * f, char *, int);
161 int rio_ioctl(struct rio_info *, struct file *, int, char *);
162 int rio_select(struct rio_info *, struct file * f, int, struct sel *);
163 int rio_intr(char *);
164 int rio_isr_thread(char *);
165 struct rio_info * rio_info_store( int cmd, struct rio_info * p);
166 #endif
168 extern int rio_pcicopy(char *src, char *dst, int n);
169 extern int rio_minor (struct tty_struct *tty);
170 extern int rio_ismodem (struct tty_struct *tty);
171 extern void rio_udelay (int usecs);
173 extern void rio_start_card_running (struct Host * HostP);
175 #endif /* __func_h_def */