blob: 8967772d833d55670b0afad45a13037776aa0bf2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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
38#ifdef SCCS_LABELS
39#ifndef lint
40static char *_func_h_sccs_ = "@(#)func.h 1.3";
41#endif
42#endif
43
44/* rioboot.c */
45int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
Alan Cox00d83a52006-03-24 03:18:28 -080046int RIOBootCodeHOST(struct rio_info *, struct DownLoad *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
48void msec_timeout(struct Host *);
Alan Cox00d83a52006-03-24 03:18:28 -080049int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT *);
50int RIOBootOk(struct rio_info *, struct Host *, unsigned long);
51int RIORtaBound(struct rio_info *, unsigned int);
52void FillSlot(int, int, unsigned int, struct Host *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
54/* riocmd.c */
55int RIOFoadRta(struct Host *, struct Map *);
56int RIOZombieRta(struct Host *, struct Map *);
Alan Cox00d83a52006-03-24 03:18:28 -080057int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *));
58int RIOIdentifyRta(struct rio_info *, void *);
59int RIOKillNeighbour(struct rio_info *, void *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070060int RIOSuspendBootRta(struct Host *, int, int);
61int RIOFoadWakeup(struct rio_info *);
Andrew Morton8d8706e2006-01-11 12:17:49 -080062struct CmdBlk *RIOGetCmdBlk(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070063void RIOFreeCmdBlk(struct CmdBlk *);
Alan Cox00d83a52006-03-24 03:18:28 -080064int RIOQueueCmdBlk(struct Host *, unsigned int, struct CmdBlk *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070065void RIOPollHostCommands(struct rio_info *, struct Host *);
Alan Cox00d83a52006-03-24 03:18:28 -080066int RIOWFlushMark(unsigned long, struct CmdBlk *);
67int RIORFlushEnable(unsigned long, struct CmdBlk *);
68int RIOUnUse(unsigned long, struct CmdBlk *);
69void ShowPacket(unsigned int, struct PKT *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070070
71/* rioctrl.c */
Andrew Morton8d8706e2006-01-11 12:17:49 -080072int riocontrol(struct rio_info *, dev_t, int, caddr_t, int);
Alan Cox00d83a52006-03-24 03:18:28 -080073int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char);
Linus Torvalds1da177e2005-04-16 15:20:36 -070074
75/* rioinit.c */
76void rioinit(struct rio_info *, struct RioHostInfo *);
77void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
Andrew Morton8d8706e2006-01-11 12:17:49 -080078void RIOISAinit(struct rio_info *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -070079int RIODoAT(struct rio_info *, int, int);
80caddr_t RIOCheckForATCard(int);
81int RIOAssignAT(struct rio_info *, int, caddr_t, int);
Alan Cox00d83a52006-03-24 03:18:28 -080082int RIOBoardTest(paddr_t, caddr_t, unsigned char, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -070083void RIOAllocDataStructs(struct rio_info *);
84void RIOSetupDataStructs(struct rio_info *);
Alan Cox00d83a52006-03-24 03:18:28 -080085int RIODefaultName(struct rio_info *, struct Host *, unsigned int);
Andrew Morton8d8706e2006-01-11 12:17:49 -080086struct rioVersion *RIOVersid(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070087int RIOMapin(paddr_t, int, caddr_t *);
88void RIOMapout(paddr_t, long, caddr_t);
Alan Cox00d83a52006-03-24 03:18:28 -080089void RIOHostReset(unsigned int, struct DpRam *, unsigned int);
Linus Torvalds1da177e2005-04-16 15:20:36 -070090
91/* riointr.c */
92void RIOTxEnable(char *);
93void RIOServiceHost(struct rio_info *, struct Host *, int);
Alan Cox00d83a52006-03-24 03:18:28 -080094int riotproc(struct rio_info *, struct ttystatics *, int, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -070095
96/* rioparam.c */
97int RIOParam(struct Port *, int, int, int);
98int RIODelay(struct Port *PortP, int);
99int RIODelay_ni(struct Port *PortP, int);
100void ms_timeout(struct Port *);
101int can_add_transmit(struct PKT **, struct Port *);
102void add_transmit(struct Port *);
103void put_free_end(struct Host *, struct PKT *);
104int can_remove_receive(struct PKT **, struct Port *);
105void remove_receive(struct Port *);
106
107/* rioroute.c */
Alan Cox00d83a52006-03-24 03:18:28 -0800108int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT *);
109void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int);
110unsigned int GetUnitType(unsigned int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111int RIOSetChange(struct rio_info *);
Alan Cox00d83a52006-03-24 03:18:28 -0800112int RIOFindFreeID(struct rio_info *, struct Host *, unsigned int *, unsigned int *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113
114
115/* riotty.c */
116
Andrew Morton8d8706e2006-01-11 12:17:49 -0800117int riotopen(struct tty_struct *tty, struct file *filp);
118int riotclose(void *ptr);
Alan Cox00d83a52006-03-24 03:18:28 -0800119int riotioctl(struct rio_info *, struct tty_struct *, int, caddr_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg);
121
122/* riotable.c */
123int RIONewTable(struct rio_info *);
124int RIOApel(struct rio_info *);
125int RIODeleteRta(struct rio_info *, struct Map *);
126int RIOAssignRta(struct rio_info *, struct Map *);
127int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *);
Andrew Morton8d8706e2006-01-11 12:17:49 -0800128int RIOChangeName(struct rio_info *, struct Map *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129
130#if 0
131/* riodrvr.c */
Andrew Morton8d8706e2006-01-11 12:17:49 -0800132struct rio_info *rio_install(struct RioHostInfo *);
Alan Cox00d83a52006-03-24 03:18:28 -0800133int rio_uninstall(struct rio_info *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134int rio_open(struct rio_info *, int, struct file *);
135int rio_close(struct rio_info *, struct file *);
136int rio_read(struct rio_info *, struct file *, char *, int);
Andrew Morton8d8706e2006-01-11 12:17:49 -0800137int rio_write(struct rio_info *, struct file *f, char *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138int rio_ioctl(struct rio_info *, struct file *, int, char *);
Andrew Morton8d8706e2006-01-11 12:17:49 -0800139int rio_select(struct rio_info *, struct file *f, int, struct sel *);
140int rio_intr(char *);
141int rio_isr_thread(char *);
142struct rio_info *rio_info_store(int cmd, struct rio_info *p);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143#endif
144
Alan Cox00d83a52006-03-24 03:18:28 -0800145extern void rio_copy_to_card(void *to, void *from, int len);
Andrew Morton8d8706e2006-01-11 12:17:49 -0800146extern int rio_minor(struct tty_struct *tty);
147extern int rio_ismodem(struct tty_struct *tty);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148
Andrew Morton8d8706e2006-01-11 12:17:49 -0800149extern void rio_start_card_running(struct Host *HostP);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150
Andrew Morton8d8706e2006-01-11 12:17:49 -0800151#endif /* __func_h_def */