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 40static char *_func_h_sccs_ = "@(#)func.h 1.3"; 41#endif 42#endif 43 44/* rioboot.c */ 45int RIOBootCodeRTA(struct rio_info *, struct DownLoad *); 46int RIOBootCodeHOST(struct rio_info *, struct DownLoad *); 47int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *); 48void msec_timeout(struct Host *); 49int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *); 50int RIOBootOk(struct rio_info *, struct Host *, unsigned long); 51int RIORtaBound(struct rio_info *, unsigned int); 52void rio_fill_host_slot(int, int, unsigned int, struct Host *); 53 54/* riocmd.c */ 55int RIOFoadRta(struct Host *, struct Map *); 56int RIOZombieRta(struct Host *, struct Map *); 57int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *)); 58int RIOIdentifyRta(struct rio_info *, void __user *); 59int RIOKillNeighbour(struct rio_info *, void __user *); 60int RIOSuspendBootRta(struct Host *, int, int); 61int RIOFoadWakeup(struct rio_info *); 62struct CmdBlk *RIOGetCmdBlk(void); 63void RIOFreeCmdBlk(struct CmdBlk *); 64int RIOQueueCmdBlk(struct Host *, unsigned int, struct CmdBlk *); 65void RIOPollHostCommands(struct rio_info *, struct Host *); 66int RIOWFlushMark(unsigned long, struct CmdBlk *); 67int RIORFlushEnable(unsigned long, struct CmdBlk *); 68int RIOUnUse(unsigned long, struct CmdBlk *); 69 70/* rioctrl.c */ 71int riocontrol(struct rio_info *, dev_t, int, unsigned long, int); 72 73int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char); 74 75/* rioinit.c */ 76void rioinit(struct rio_info *, struct RioHostInfo *); 77void RIOInitHosts(struct rio_info *, struct RioHostInfo *); 78void RIOISAinit(struct rio_info *, int); 79int RIODoAT(struct rio_info *, int, int); 80caddr_t RIOCheckForATCard(int); 81int RIOAssignAT(struct rio_info *, int, void __iomem *, int); 82int RIOBoardTest(unsigned long, void __iomem *, unsigned char, int); 83void RIOAllocDataStructs(struct rio_info *); 84void RIOSetupDataStructs(struct rio_info *); 85int RIODefaultName(struct rio_info *, struct Host *, unsigned int); 86struct rioVersion *RIOVersid(void); 87void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int); 88 89/* riointr.c */ 90void RIOTxEnable(char *); 91void RIOServiceHost(struct rio_info *, struct Host *); 92int riotproc(struct rio_info *, struct ttystatics *, int, int); 93 94/* rioparam.c */ 95int RIOParam(struct Port *, int, int, int); 96int RIODelay(struct Port *PortP, int); 97int RIODelay_ni(struct Port *PortP, int); 98void ms_timeout(struct Port *); 99int can_add_transmit(struct PKT __iomem **, struct Port *); 100void add_transmit(struct Port *); 101void put_free_end(struct Host *, struct PKT __iomem *); 102int can_remove_receive(struct PKT __iomem **, struct Port *); 103void remove_receive(struct Port *); 104 105/* rioroute.c */ 106int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *); 107void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int); 108unsigned int GetUnitType(unsigned int); 109int RIOSetChange(struct rio_info *); 110int RIOFindFreeID(struct rio_info *, struct Host *, unsigned int *, unsigned int *); 111 112 113/* riotty.c */ 114 115int riotopen(struct tty_struct *tty, struct file *filp); 116int riotclose(void *ptr); 117int riotioctl(struct rio_info *, struct tty_struct *, int, caddr_t); 118void ttyseth(struct Port *, struct ttystatics *, struct old_sgttyb *sg); 119 120/* riotable.c */ 121int RIONewTable(struct rio_info *); 122int RIOApel(struct rio_info *); 123int RIODeleteRta(struct rio_info *, struct Map *); 124int RIOAssignRta(struct rio_info *, struct Map *); 125int RIOReMapPorts(struct rio_info *, struct Host *, struct Map *); 126int RIOChangeName(struct rio_info *, struct Map *); 127 128 129extern void rio_copy_to_card(void *from, void __iomem *to, int len); 130extern int rio_minor(struct tty_struct *tty); 131extern int rio_ismodem(struct tty_struct *tty); 132 133extern void rio_start_card_running(struct Host *HostP); 134 135#endif /* __func_h_def */ 136