Full support for Ginger Console
[linux-ginger.git] / drivers / char / rio / func.h
blob078d44f85e45143020652f1e4b457fbdedad119b
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 /* rioboot.c */
39 int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
40 int RIOBootCodeHOST(struct rio_info *, struct DownLoad *);
41 int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
42 void msec_timeout(struct Host *);
43 int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *);
44 int RIOBootOk(struct rio_info *, struct Host *, unsigned long);
45 int RIORtaBound(struct rio_info *, unsigned int);
46 void rio_fill_host_slot(int, int, unsigned int, struct Host *);
48 /* riocmd.c */
49 int RIOFoadRta(struct Host *, struct Map *);
50 int RIOZombieRta(struct Host *, struct Map *);
51 int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *));
52 int RIOIdentifyRta(struct rio_info *, void __user *);
53 int RIOKillNeighbour(struct rio_info *, void __user *);
54 int RIOSuspendBootRta(struct Host *, int, int);
55 int RIOFoadWakeup(struct rio_info *);
56 struct CmdBlk *RIOGetCmdBlk(void);
57 void RIOFreeCmdBlk(struct CmdBlk *);
58 int RIOQueueCmdBlk(struct Host *, unsigned int, struct CmdBlk *);
59 void RIOPollHostCommands(struct rio_info *, struct Host *);
60 int RIOWFlushMark(unsigned long, struct CmdBlk *);
61 int RIORFlushEnable(unsigned long, struct CmdBlk *);
62 int RIOUnUse(unsigned long, struct CmdBlk *);
64 /* rioctrl.c */
65 int riocontrol(struct rio_info *, dev_t, int, unsigned long, int);
67 int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char);
69 /* rioinit.c */
70 void rioinit(struct rio_info *, struct RioHostInfo *);
71 void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
72 void RIOISAinit(struct rio_info *, int);
73 int RIODoAT(struct rio_info *, int, int);
74 caddr_t RIOCheckForATCard(int);
75 int RIOAssignAT(struct rio_info *, int, void __iomem *, int);
76 int RIOBoardTest(unsigned long, void __iomem *, unsigned char, int);
77 void RIOAllocDataStructs(struct rio_info *);
78 void RIOSetupDataStructs(struct rio_info *);
79 int RIODefaultName(struct rio_info *, struct Host *, unsigned int);
80 struct rioVersion *RIOVersid(void);
81 void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int);
83 /* riointr.c */
84 void RIOTxEnable(char *);
85 void RIOServiceHost(struct rio_info *, struct Host *);
86 int riotproc(struct rio_info *, struct ttystatics *, int, int);
88 /* rioparam.c */
89 int RIOParam(struct Port *, int, int, int);
90 int RIODelay(struct Port *PortP, int);
91 int RIODelay_ni(struct Port *PortP, int);
92 void ms_timeout(struct Port *);
93 int can_add_transmit(struct PKT __iomem **, struct Port *);
94 void add_transmit(struct Port *);
95 void put_free_end(struct Host *, struct PKT __iomem *);
96 int can_remove_receive(struct PKT __iomem **, struct Port *);
97 void remove_receive(struct Port *);
99 /* rioroute.c */
100 int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *);
101 void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int);
102 unsigned int GetUnitType(unsigned int);
103 int RIOSetChange(struct rio_info *);
104 int RIOFindFreeID(struct rio_info *, struct Host *, unsigned int *, unsigned int *);
107 /* riotty.c */
109 int riotopen(struct tty_struct *tty, struct file *filp);
110 int riotclose(void *ptr);
111 int riotioctl(struct rio_info *, struct tty_struct *, int, caddr_t);
112 void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
114 /* riotable.c */
115 int RIONewTable(struct rio_info *);
116 int RIOApel(struct rio_info *);
117 int RIODeleteRta(struct rio_info *, struct Map *);
118 int RIOAssignRta(struct rio_info *, struct Map *);
119 int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *);
120 int RIOChangeName(struct rio_info *, struct Map *);
122 #if 0
123 /* riodrvr.c */
124 struct rio_info *rio_install(struct RioHostInfo *);
125 int rio_uninstall(struct rio_info *);
126 int rio_open(struct rio_info *, int, struct file *);
127 int rio_close(struct rio_info *, struct file *);
128 int rio_read(struct rio_info *, struct file *, char *, int);
129 int rio_write(struct rio_info *, struct file *f, char *, int);
130 int rio_ioctl(struct rio_info *, struct file *, int, char *);
131 int rio_select(struct rio_info *, struct file *f, int, struct sel *);
132 int rio_intr(char *);
133 int rio_isr_thread(char *);
134 struct rio_info *rio_info_store(int cmd, struct rio_info *p);
135 #endif
137 extern void rio_copy_to_card(void *from, void __iomem *to, int len);
138 extern int rio_minor(struct tty_struct *tty);
139 extern int rio_ismodem(struct tty_struct *tty);
141 extern void rio_start_card_running(struct Host *HostP);
143 #endif /* __func_h_def */