ia64/linux-2.6.18-xen.hg

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/drivers/char/rio/riodrvr.h	Wed Apr 11 14:15:44 2007 +0100
     1.3 @@ -0,0 +1,142 @@
     1.4 +/*
     1.5 +** -----------------------------------------------------------------------------
     1.6 +**
     1.7 +**  Perle Specialix driver for Linux
     1.8 +**  Ported from existing RIO Driver for SCO sources.
     1.9 + *
    1.10 + *  (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
    1.11 + *
    1.12 + *      This program is free software; you can redistribute it and/or modify
    1.13 + *      it under the terms of the GNU General Public License as published by
    1.14 + *      the Free Software Foundation; either version 2 of the License, or
    1.15 + *      (at your option) any later version.
    1.16 + *
    1.17 + *      This program is distributed in the hope that it will be useful,
    1.18 + *      but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.19 + *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.20 + *      GNU General Public License for more details.
    1.21 + *
    1.22 + *      You should have received a copy of the GNU General Public License
    1.23 + *      along with this program; if not, write to the Free Software
    1.24 + *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1.25 +**
    1.26 +**	Module		: riodrvr.h
    1.27 +**	SID		: 1.3
    1.28 +**	Last Modified	: 11/6/98 09:22:46
    1.29 +**	Retrieved	: 11/6/98 09:22:46
    1.30 +**
    1.31 +**  ident @(#)riodrvr.h	1.3
    1.32 +**
    1.33 +** -----------------------------------------------------------------------------
    1.34 +*/
    1.35 +
    1.36 +#ifndef __riodrvr_h
    1.37 +#define __riodrvr_h
    1.38 +
    1.39 +#include <asm/param.h>		/* for HZ */
    1.40 +
    1.41 +#ifdef SCCS_LABELS
    1.42 +static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h	1.3";
    1.43 +#endif
    1.44 +
    1.45 +#define MEMDUMP_SIZE	32
    1.46 +#define	MOD_DISABLE	(RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT)
    1.47 +
    1.48 +
    1.49 +struct rio_info {
    1.50 +	int mode;		/* Intr or polled, word/byte */
    1.51 +	spinlock_t RIOIntrSem;	/* Interrupt thread sem */
    1.52 +	int current_chan;	/* current channel */
    1.53 +	int RIOFailed;		/* Not initialised ? */
    1.54 +	int RIOInstallAttempts;	/* no. of rio-install() calls */
    1.55 +	int RIOLastPCISearch;	/* status of last search */
    1.56 +	int RIONumHosts;	/* Number of RIO Hosts */
    1.57 +	struct Host *RIOHosts;	/* RIO Host values */
    1.58 +	struct Port **RIOPortp;	/* RIO port values */
    1.59 +/*
    1.60 +** 02.03.1999 ARG - ESIL 0820 fix
    1.61 +** We no longer use RIOBootMode
    1.62 +**
    1.63 +	int			RIOBootMode;		* RIO boot mode *
    1.64 +**
    1.65 +*/
    1.66 +	int RIOPrintDisabled;	/* RIO printing disabled ? */
    1.67 +	int RIOPrintLogState;	/* RIO printing state ? */
    1.68 +	int RIOPolling;		/* Polling ? */
    1.69 +/*
    1.70 +** 09.12.1998 ARG - ESIL 0776 part fix
    1.71 +** The 'RIO_QUICK_CHECK' ioctl was using RIOHalted.
    1.72 +** The fix for this ESIL introduces another member (RIORtaDisCons) here to be
    1.73 +** updated in RIOConCon() - to keep track of RTA connections/disconnections.
    1.74 +** 'RIO_QUICK_CHECK' now returns the value of RIORtaDisCons.
    1.75 +*/
    1.76 +	int RIOHalted;		/* halted ? */
    1.77 +	int RIORtaDisCons;	/* RTA connections/disconnections */
    1.78 +	unsigned int RIOReadCheck;	/* Rio read check */
    1.79 +	unsigned int RIONoMessage;	/* To display message or not */
    1.80 +	unsigned int RIONumBootPkts;	/* how many packets for an RTA */
    1.81 +	unsigned int RIOBootCount;	/* size of RTA code */
    1.82 +	unsigned int RIOBooting;	/* count of outstanding boots */
    1.83 +	unsigned int RIOSystemUp;	/* Booted ?? */
    1.84 +	unsigned int RIOCounting;	/* for counting interrupts */
    1.85 +	unsigned int RIOIntCount;	/* # of intr since last check */
    1.86 +	unsigned int RIOTxCount;	/* number of xmit intrs  */
    1.87 +	unsigned int RIORxCount;	/* number of rx intrs */
    1.88 +	unsigned int RIORupCount;	/* number of rup intrs */
    1.89 +	int RIXTimer;
    1.90 +	int RIOBufferSize;	/* Buffersize */
    1.91 +	int RIOBufferMask;	/* Buffersize */
    1.92 +
    1.93 +	int RIOFirstMajor;	/* First host card's major no */
    1.94 +
    1.95 +	unsigned int RIOLastPortsMapped;	/* highest port number known */
    1.96 +	unsigned int RIOFirstPortsMapped;	/* lowest port number known */
    1.97 +
    1.98 +	unsigned int RIOLastPortsBooted;	/* highest port number running */
    1.99 +	unsigned int RIOFirstPortsBooted;	/* lowest port number running */
   1.100 +
   1.101 +	unsigned int RIOLastPortsOpened;	/* highest port number running */
   1.102 +	unsigned int RIOFirstPortsOpened;	/* lowest port number running */
   1.103 +
   1.104 +	/* Flag to say that the topology information has been changed. */
   1.105 +	unsigned int RIOQuickCheck;
   1.106 +	unsigned int CdRegister;	/* ??? */
   1.107 +	int RIOSignalProcess;	/* Signalling process */
   1.108 +	int rio_debug;		/* To debug ... */
   1.109 +	int RIODebugWait;	/* For what ??? */
   1.110 +	int tpri;		/* Thread prio */
   1.111 +	int tid;		/* Thread id */
   1.112 +	unsigned int _RIO_Polled;	/* Counter for polling */
   1.113 +	unsigned int _RIO_Interrupted;	/* Counter for interrupt */
   1.114 +	int intr_tid;		/* iointset return value */
   1.115 +	int TxEnSem;		/* TxEnable Semaphore */
   1.116 +
   1.117 +
   1.118 +	struct Error RIOError;	/* to Identify what went wrong */
   1.119 +	struct Conf RIOConf;	/* Configuration ??? */
   1.120 +	struct ttystatics channel[RIO_PORTS];	/* channel information */
   1.121 +	char RIOBootPackets[1 + (SIXTY_FOUR_K / RTA_BOOT_DATA_SIZE)]
   1.122 +	    [RTA_BOOT_DATA_SIZE];
   1.123 +	struct Map RIOConnectTable[TOTAL_MAP_ENTRIES];
   1.124 +	struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
   1.125 +
   1.126 +	/* RTA to host binding table for master/slave operation */
   1.127 +	unsigned long RIOBindTab[MAX_RTA_BINDINGS];
   1.128 +	/* RTA memory dump variable */
   1.129 +	unsigned char RIOMemDump[MEMDUMP_SIZE];
   1.130 +	struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
   1.131 +
   1.132 +};
   1.133 +
   1.134 +
   1.135 +#ifdef linux
   1.136 +#define debug(x)        printk x
   1.137 +#else
   1.138 +#define debug(x)	kkprintf x
   1.139 +#endif
   1.140 +
   1.141 +
   1.142 +
   1.143 +#define RIO_RESET_INT	0x7d80
   1.144 +
   1.145 +#endif				/* __riodrvr.h */