Merge branch 'for-2.6.34' of git://linux-nfs.org/~bfields/linux
[linux-2.6-block.git] / drivers / char / rio / func.h
CommitLineData
1da177e4
LT
1/*
2** -----------------------------------------------------------------------------
3**
4** Perle Specialix driver for Linux
5** Ported from existing RIO Driver for SCO sources.
6 *
7 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
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** Module : func.h
24** SID : 1.3
25** Last Modified : 11/6/98 11:34:10
26** Retrieved : 11/6/98 11:34:21
27**
28** ident @(#)func.h 1.3
29**
30** -----------------------------------------------------------------------------
31*/
32
33#ifndef __func_h_def
34#define __func_h_def
35
36#include <linux/kdev_t.h>
37
1da177e4
LT
38/* rioboot.c */
39int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
00d83a54 40int RIOBootCodeHOST(struct rio_info *, struct DownLoad *);
1da177e4
LT
41int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
42void msec_timeout(struct Host *);
d886cb58 43int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *);
00d83a54
AC
44int RIOBootOk(struct rio_info *, struct Host *, unsigned long);
45int RIORtaBound(struct rio_info *, unsigned int);
57c2d60e 46void rio_fill_host_slot(int, int, unsigned int, struct Host *);
1da177e4
LT
47
48/* riocmd.c */
49int RIOFoadRta(struct Host *, struct Map *);
50int RIOZombieRta(struct Host *, struct Map *);
00d83a54 51int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *));
d886cb58
AV
52int RIOIdentifyRta(struct rio_info *, void __user *);
53int RIOKillNeighbour(struct rio_info *, void __user *);
1da177e4
LT
54int RIOSuspendBootRta(struct Host *, int, int);
55int RIOFoadWakeup(struct rio_info *);
8d8706e2 56struct CmdBlk *RIOGetCmdBlk(void);
1da177e4 57void RIOFreeCmdBlk(struct CmdBlk *);
00d83a54 58int RIOQueueCmdBlk(struct Host *, unsigned int, struct CmdBlk *);
1da177e4 59void RIOPollHostCommands(struct rio_info *, struct Host *);
00d83a54
AC
60int RIOWFlushMark(unsigned long, struct CmdBlk *);
61int RIORFlushEnable(unsigned long, struct CmdBlk *);
62int RIOUnUse(unsigned long, struct CmdBlk *);
1da177e4
LT
63
64/* rioctrl.c */
d886cb58
AV
65int riocontrol(struct rio_info *, dev_t, int, unsigned long, int);
66
00d83a54 67int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char);
1da177e4
LT
68
69/* rioinit.c */
70void rioinit(struct rio_info *, struct RioHostInfo *);
71void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
8d8706e2 72void RIOISAinit(struct rio_info *, int);
1da177e4
LT
73int RIODoAT(struct rio_info *, int, int);
74caddr_t RIOCheckForATCard(int);
d886cb58
AV
75int RIOAssignAT(struct rio_info *, int, void __iomem *, int);
76int RIOBoardTest(unsigned long, void __iomem *, unsigned char, int);
1da177e4
LT
77void RIOAllocDataStructs(struct rio_info *);
78void RIOSetupDataStructs(struct rio_info *);
00d83a54 79int RIODefaultName(struct rio_info *, struct Host *, unsigned int);
8d8706e2 80struct rioVersion *RIOVersid(void);
d886cb58 81void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int);
1da177e4
LT
82
83/* riointr.c */
84void RIOTxEnable(char *);
c7bec5ab 85void RIOServiceHost(struct rio_info *, struct Host *);
00d83a54 86int riotproc(struct rio_info *, struct ttystatics *, int, int);
1da177e4
LT
87
88/* rioparam.c */
89int RIOParam(struct Port *, int, int, int);
90int RIODelay(struct Port *PortP, int);
91int RIODelay_ni(struct Port *PortP, int);
92void ms_timeout(struct Port *);
d886cb58 93int can_add_transmit(struct PKT __iomem **, struct Port *);
1da177e4 94void add_transmit(struct Port *);
d886cb58
AV
95void put_free_end(struct Host *, struct PKT __iomem *);
96int can_remove_receive(struct PKT __iomem **, struct Port *);
1da177e4
LT
97void remove_receive(struct Port *);
98
99/* rioroute.c */
d886cb58 100int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *);
00d83a54
AC
101void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int);
102unsigned int GetUnitType(unsigned int);
1da177e4 103int RIOSetChange(struct rio_info *);
00d83a54 104int RIOFindFreeID(struct rio_info *, struct Host *, unsigned int *, unsigned int *);
1da177e4
LT
105
106
107/* riotty.c */
108
8d8706e2
AM
109int riotopen(struct tty_struct *tty, struct file *filp);
110int riotclose(void *ptr);
00d83a54 111int riotioctl(struct rio_info *, struct tty_struct *, int, caddr_t);
1da177e4
LT
112void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
113
114/* riotable.c */
115int RIONewTable(struct rio_info *);
116int RIOApel(struct rio_info *);
117int RIODeleteRta(struct rio_info *, struct Map *);
118int RIOAssignRta(struct rio_info *, struct Map *);
119int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *);
8d8706e2 120int RIOChangeName(struct rio_info *, struct Map *);
1da177e4
LT
121
122#if 0
123/* riodrvr.c */
8d8706e2 124struct rio_info *rio_install(struct RioHostInfo *);
00d83a54 125int rio_uninstall(struct rio_info *);
1da177e4
LT
126int rio_open(struct rio_info *, int, struct file *);
127int rio_close(struct rio_info *, struct file *);
128int rio_read(struct rio_info *, struct file *, char *, int);
8d8706e2 129int rio_write(struct rio_info *, struct file *f, char *, int);
1da177e4 130int rio_ioctl(struct rio_info *, struct file *, int, char *);
8d8706e2
AM
131int rio_select(struct rio_info *, struct file *f, int, struct sel *);
132int rio_intr(char *);
133int rio_isr_thread(char *);
134struct rio_info *rio_info_store(int cmd, struct rio_info *p);
1da177e4
LT
135#endif
136
38d0d001 137extern void rio_copy_to_card(void *from, void __iomem *to, int len);
8d8706e2
AM
138extern int rio_minor(struct tty_struct *tty);
139extern int rio_ismodem(struct tty_struct *tty);
1da177e4 140
8d8706e2 141extern void rio_start_card_running(struct Host *HostP);
1da177e4 142
8d8706e2 143#endif /* __func_h_def */