ia64/linux-2.6.18-xen.hg

annotate drivers/char/rio/riodrvr.h @ 0:831230e53067

Import 2.6.18 from kernel.org tarball.
author Ian Campbell <ian.campbell@xensource.com>
date Wed Apr 11 14:15:44 2007 +0100 (2007-04-11)
parents
children
rev   line source
ian@0 1 /*
ian@0 2 ** -----------------------------------------------------------------------------
ian@0 3 **
ian@0 4 ** Perle Specialix driver for Linux
ian@0 5 ** Ported from existing RIO Driver for SCO sources.
ian@0 6 *
ian@0 7 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
ian@0 8 *
ian@0 9 * This program is free software; you can redistribute it and/or modify
ian@0 10 * it under the terms of the GNU General Public License as published by
ian@0 11 * the Free Software Foundation; either version 2 of the License, or
ian@0 12 * (at your option) any later version.
ian@0 13 *
ian@0 14 * This program is distributed in the hope that it will be useful,
ian@0 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ian@0 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ian@0 17 * GNU General Public License for more details.
ian@0 18 *
ian@0 19 * You should have received a copy of the GNU General Public License
ian@0 20 * along with this program; if not, write to the Free Software
ian@0 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ian@0 22 **
ian@0 23 ** Module : riodrvr.h
ian@0 24 ** SID : 1.3
ian@0 25 ** Last Modified : 11/6/98 09:22:46
ian@0 26 ** Retrieved : 11/6/98 09:22:46
ian@0 27 **
ian@0 28 ** ident @(#)riodrvr.h 1.3
ian@0 29 **
ian@0 30 ** -----------------------------------------------------------------------------
ian@0 31 */
ian@0 32
ian@0 33 #ifndef __riodrvr_h
ian@0 34 #define __riodrvr_h
ian@0 35
ian@0 36 #include <asm/param.h> /* for HZ */
ian@0 37
ian@0 38 #ifdef SCCS_LABELS
ian@0 39 static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3";
ian@0 40 #endif
ian@0 41
ian@0 42 #define MEMDUMP_SIZE 32
ian@0 43 #define MOD_DISABLE (RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
ian@0 44
ian@0 45
ian@0 46 struct rio_info {
ian@0 47 int mode; /* Intr or polled, word/byte */
ian@0 48 spinlock_t RIOIntrSem; /* Interrupt thread sem */
ian@0 49 int current_chan; /* current channel */
ian@0 50 int RIOFailed; /* Not initialised ? */
ian@0 51 int RIOInstallAttempts; /* no. of rio-install() calls */
ian@0 52 int RIOLastPCISearch; /* status of last search */
ian@0 53 int RIONumHosts; /* Number of RIO Hosts */
ian@0 54 struct Host *RIOHosts; /* RIO Host values */
ian@0 55 struct Port **RIOPortp; /* RIO port values */
ian@0 56 /*
ian@0 57 ** 02.03.1999 ARG - ESIL 0820 fix
ian@0 58 ** We no longer use RIOBootMode
ian@0 59 **
ian@0 60 int RIOBootMode; * RIO boot mode *
ian@0 61 **
ian@0 62 */
ian@0 63 int RIOPrintDisabled; /* RIO printing disabled ? */
ian@0 64 int RIOPrintLogState; /* RIO printing state ? */
ian@0 65 int RIOPolling; /* Polling ? */
ian@0 66 /*
ian@0 67 ** 09.12.1998 ARG - ESIL 0776 part fix
ian@0 68 ** The 'RIO_QUICK_CHECK' ioctl was using RIOHalted.
ian@0 69 ** The fix for this ESIL introduces another member (RIORtaDisCons) here to be
ian@0 70 ** updated in RIOConCon() - to keep track of RTA connections/disconnections.
ian@0 71 ** 'RIO_QUICK_CHECK' now returns the value of RIORtaDisCons.
ian@0 72 */
ian@0 73 int RIOHalted; /* halted ? */
ian@0 74 int RIORtaDisCons; /* RTA connections/disconnections */
ian@0 75 unsigned int RIOReadCheck; /* Rio read check */
ian@0 76 unsigned int RIONoMessage; /* To display message or not */
ian@0 77 unsigned int RIONumBootPkts; /* how many packets for an RTA */
ian@0 78 unsigned int RIOBootCount; /* size of RTA code */
ian@0 79 unsigned int RIOBooting; /* count of outstanding boots */
ian@0 80 unsigned int RIOSystemUp; /* Booted ?? */
ian@0 81 unsigned int RIOCounting; /* for counting interrupts */
ian@0 82 unsigned int RIOIntCount; /* # of intr since last check */
ian@0 83 unsigned int RIOTxCount; /* number of xmit intrs */
ian@0 84 unsigned int RIORxCount; /* number of rx intrs */
ian@0 85 unsigned int RIORupCount; /* number of rup intrs */
ian@0 86 int RIXTimer;
ian@0 87 int RIOBufferSize; /* Buffersize */
ian@0 88 int RIOBufferMask; /* Buffersize */
ian@0 89
ian@0 90 int RIOFirstMajor; /* First host card's major no */
ian@0 91
ian@0 92 unsigned int RIOLastPortsMapped; /* highest port number known */
ian@0 93 unsigned int RIOFirstPortsMapped; /* lowest port number known */
ian@0 94
ian@0 95 unsigned int RIOLastPortsBooted; /* highest port number running */
ian@0 96 unsigned int RIOFirstPortsBooted; /* lowest port number running */
ian@0 97
ian@0 98 unsigned int RIOLastPortsOpened; /* highest port number running */
ian@0 99 unsigned int RIOFirstPortsOpened; /* lowest port number running */
ian@0 100
ian@0 101 /* Flag to say that the topology information has been changed. */
ian@0 102 unsigned int RIOQuickCheck;
ian@0 103 unsigned int CdRegister; /* ??? */
ian@0 104 int RIOSignalProcess; /* Signalling process */
ian@0 105 int rio_debug; /* To debug ... */
ian@0 106 int RIODebugWait; /* For what ??? */
ian@0 107 int tpri; /* Thread prio */
ian@0 108 int tid; /* Thread id */
ian@0 109 unsigned int _RIO_Polled; /* Counter for polling */
ian@0 110 unsigned int _RIO_Interrupted; /* Counter for interrupt */
ian@0 111 int intr_tid; /* iointset return value */
ian@0 112 int TxEnSem; /* TxEnable Semaphore */
ian@0 113
ian@0 114
ian@0 115 struct Error RIOError; /* to Identify what went wrong */
ian@0 116 struct Conf RIOConf; /* Configuration ??? */
ian@0 117 struct ttystatics channel[RIO_PORTS]; /* channel information */
ian@0 118 char RIOBootPackets[1 + (SIXTY_FOUR_K / RTA_BOOT_DATA_SIZE)]
ian@0 119 [RTA_BOOT_DATA_SIZE];
ian@0 120 struct Map RIOConnectTable[TOTAL_MAP_ENTRIES];
ian@0 121 struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
ian@0 122
ian@0 123 /* RTA to host binding table for master/slave operation */
ian@0 124 unsigned long RIOBindTab[MAX_RTA_BINDINGS];
ian@0 125 /* RTA memory dump variable */
ian@0 126 unsigned char RIOMemDump[MEMDUMP_SIZE];
ian@0 127 struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
ian@0 128
ian@0 129 };
ian@0 130
ian@0 131
ian@0 132 #ifdef linux
ian@0 133 #define debug(x) printk x
ian@0 134 #else
ian@0 135 #define debug(x) kkprintf x
ian@0 136 #endif
ian@0 137
ian@0 138
ian@0 139
ian@0 140 #define RIO_RESET_INT 0x7d80
ian@0 141
ian@0 142 #endif /* __riodrvr.h */