Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 38 | #ifdef SCCS_LABELS |
| 39 | #ifndef lint |
| 40 | static char *_func_h_sccs_ = "@(#)func.h 1.3"; |
| 41 | #endif |
| 42 | #endif |
| 43 | |
| 44 | /* rioboot.c */ |
| 45 | int RIOBootCodeRTA(struct rio_info *, struct DownLoad *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 46 | int RIOBootCodeHOST(struct rio_info *, struct DownLoad *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *); |
| 48 | void msec_timeout(struct Host *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 49 | int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT *); |
| 50 | int RIOBootOk(struct rio_info *, struct Host *, unsigned long); |
| 51 | int RIORtaBound(struct rio_info *, unsigned int); |
Alan Cox | 57c2d60 | 2006-03-24 03:18:31 -0800 | [diff] [blame^] | 52 | void rio_fill_host_slot(int, int, unsigned int, struct Host *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | /* riocmd.c */ |
| 55 | int RIOFoadRta(struct Host *, struct Map *); |
| 56 | int RIOZombieRta(struct Host *, struct Map *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 57 | int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *)); |
| 58 | int RIOIdentifyRta(struct rio_info *, void *); |
| 59 | int RIOKillNeighbour(struct rio_info *, void *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | int RIOSuspendBootRta(struct Host *, int, int); |
| 61 | int RIOFoadWakeup(struct rio_info *); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 62 | struct CmdBlk *RIOGetCmdBlk(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | void RIOFreeCmdBlk(struct CmdBlk *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 64 | int RIOQueueCmdBlk(struct Host *, unsigned int, struct CmdBlk *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | void RIOPollHostCommands(struct rio_info *, struct Host *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 66 | int RIOWFlushMark(unsigned long, struct CmdBlk *); |
| 67 | int RIORFlushEnable(unsigned long, struct CmdBlk *); |
| 68 | int RIOUnUse(unsigned long, struct CmdBlk *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | |
| 70 | /* rioctrl.c */ |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 71 | int riocontrol(struct rio_info *, dev_t, int, caddr_t, int); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 72 | int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | |
| 74 | /* rioinit.c */ |
| 75 | void rioinit(struct rio_info *, struct RioHostInfo *); |
| 76 | void RIOInitHosts(struct rio_info *, struct RioHostInfo *); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 77 | void RIOISAinit(struct rio_info *, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | int RIODoAT(struct rio_info *, int, int); |
| 79 | caddr_t RIOCheckForATCard(int); |
| 80 | int RIOAssignAT(struct rio_info *, int, caddr_t, int); |
Alan Cox | 57c2d60 | 2006-03-24 03:18:31 -0800 | [diff] [blame^] | 81 | int RIOBoardTest(unsigned long, caddr_t, unsigned char, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | void RIOAllocDataStructs(struct rio_info *); |
| 83 | void RIOSetupDataStructs(struct rio_info *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 84 | int RIODefaultName(struct rio_info *, struct Host *, unsigned int); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 85 | struct rioVersion *RIOVersid(void); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 86 | void RIOHostReset(unsigned int, struct DpRam *, unsigned int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | |
| 88 | /* riointr.c */ |
| 89 | void RIOTxEnable(char *); |
| 90 | void RIOServiceHost(struct rio_info *, struct Host *, int); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 91 | int riotproc(struct rio_info *, struct ttystatics *, int, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | |
| 93 | /* rioparam.c */ |
| 94 | int RIOParam(struct Port *, int, int, int); |
| 95 | int RIODelay(struct Port *PortP, int); |
| 96 | int RIODelay_ni(struct Port *PortP, int); |
| 97 | void ms_timeout(struct Port *); |
| 98 | int can_add_transmit(struct PKT **, struct Port *); |
| 99 | void add_transmit(struct Port *); |
| 100 | void put_free_end(struct Host *, struct PKT *); |
| 101 | int can_remove_receive(struct PKT **, struct Port *); |
| 102 | void remove_receive(struct Port *); |
| 103 | |
| 104 | /* rioroute.c */ |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 105 | int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT *); |
| 106 | void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int); |
| 107 | unsigned int GetUnitType(unsigned int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | int RIOSetChange(struct rio_info *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 109 | int RIOFindFreeID(struct rio_info *, struct Host *, unsigned int *, unsigned int *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | |
| 111 | |
| 112 | /* riotty.c */ |
| 113 | |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 114 | int riotopen(struct tty_struct *tty, struct file *filp); |
| 115 | int riotclose(void *ptr); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 116 | int riotioctl(struct rio_info *, struct tty_struct *, int, caddr_t); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg); |
| 118 | |
| 119 | /* riotable.c */ |
| 120 | int RIONewTable(struct rio_info *); |
| 121 | int RIOApel(struct rio_info *); |
| 122 | int RIODeleteRta(struct rio_info *, struct Map *); |
| 123 | int RIOAssignRta(struct rio_info *, struct Map *); |
| 124 | int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 125 | int RIOChangeName(struct rio_info *, struct Map *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | |
| 127 | #if 0 |
| 128 | /* riodrvr.c */ |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 129 | struct rio_info *rio_install(struct RioHostInfo *); |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 130 | int rio_uninstall(struct rio_info *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | int rio_open(struct rio_info *, int, struct file *); |
| 132 | int rio_close(struct rio_info *, struct file *); |
| 133 | int rio_read(struct rio_info *, struct file *, char *, int); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 134 | int rio_write(struct rio_info *, struct file *f, char *, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | int rio_ioctl(struct rio_info *, struct file *, int, char *); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 136 | int rio_select(struct rio_info *, struct file *f, int, struct sel *); |
| 137 | int rio_intr(char *); |
| 138 | int rio_isr_thread(char *); |
| 139 | struct rio_info *rio_info_store(int cmd, struct rio_info *p); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | #endif |
| 141 | |
Alan Cox | 00d83a5 | 2006-03-24 03:18:28 -0800 | [diff] [blame] | 142 | extern void rio_copy_to_card(void *to, void *from, int len); |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 143 | extern int rio_minor(struct tty_struct *tty); |
| 144 | extern int rio_ismodem(struct tty_struct *tty); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 146 | extern void rio_start_card_running(struct Host *HostP); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | |
Andrew Morton | 8d8706e | 2006-01-11 12:17:49 -0800 | [diff] [blame] | 148 | #endif /* __func_h_def */ |