ia64/linux-2.6.18-xen.hg

annotate drivers/char/rio/riospace.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 : riospace.h
ian@0 24 ** SID : 1.2
ian@0 25 ** Last Modified : 11/6/98 11:34:13
ian@0 26 ** Retrieved : 11/6/98 11:34:22
ian@0 27 **
ian@0 28 ** ident @(#)riospace.h 1.2
ian@0 29 **
ian@0 30 ** -----------------------------------------------------------------------------
ian@0 31 */
ian@0 32
ian@0 33 #ifndef __rio_riospace_h__
ian@0 34 #define __rio_riospace_h__
ian@0 35
ian@0 36 #ifdef SCCS_LABELS
ian@0 37 static char *_riospace_h_sccs_ = "@(#)riospace.h 1.2";
ian@0 38 #endif
ian@0 39
ian@0 40 #define RIO_LOCATOR_LEN 16
ian@0 41 #define MAX_RIO_BOARDS 4
ian@0 42
ian@0 43 /*
ian@0 44 ** DONT change this file. At all. Unless you can rebuild the entire
ian@0 45 ** device driver, which you probably can't, then the rest of the
ian@0 46 ** driver won't see any changes you make here. So don't make any.
ian@0 47 ** In particular, it won't be able to see changes to RIO_SLOTS
ian@0 48 */
ian@0 49
ian@0 50 struct Conf {
ian@0 51 char Locator[24];
ian@0 52 unsigned int StartupTime;
ian@0 53 unsigned int SlowCook;
ian@0 54 unsigned int IntrPollTime;
ian@0 55 unsigned int BreakInterval;
ian@0 56 unsigned int Timer;
ian@0 57 unsigned int RtaLoadBase;
ian@0 58 unsigned int HostLoadBase;
ian@0 59 unsigned int XpHz;
ian@0 60 unsigned int XpCps;
ian@0 61 char *XpOn;
ian@0 62 char *XpOff;
ian@0 63 unsigned int MaxXpCps;
ian@0 64 unsigned int MinXpCps;
ian@0 65 unsigned int SpinCmds;
ian@0 66 unsigned int FirstAddr;
ian@0 67 unsigned int LastAddr;
ian@0 68 unsigned int BufferSize;
ian@0 69 unsigned int LowWater;
ian@0 70 unsigned int LineLength;
ian@0 71 unsigned int CmdTime;
ian@0 72 };
ian@0 73
ian@0 74 /*
ian@0 75 ** Board types - these MUST correspond to product codes!
ian@0 76 */
ian@0 77 #define RIO_EMPTY 0x0
ian@0 78 #define RIO_EISA 0x3
ian@0 79 #define RIO_RTA_16 0x9
ian@0 80 #define RIO_AT 0xA
ian@0 81 #define RIO_MCA 0xB
ian@0 82 #define RIO_PCI 0xD
ian@0 83 #define RIO_RTA 0xE
ian@0 84
ian@0 85 /*
ian@0 86 ** Board data structure. This is used for configuration info
ian@0 87 */
ian@0 88 struct Brd {
ian@0 89 unsigned char Type; /* RIO_EISA, RIO_MCA, RIO_AT, RIO_EMPTY... */
ian@0 90 unsigned char Ivec; /* POLLED or ivec number */
ian@0 91 unsigned char Mode; /* Control stuff, see below */
ian@0 92 };
ian@0 93
ian@0 94 struct Board {
ian@0 95 char Locator[RIO_LOCATOR_LEN];
ian@0 96 int NumSlots;
ian@0 97 struct Brd Boards[MAX_RIO_BOARDS];
ian@0 98 };
ian@0 99
ian@0 100 #define BOOT_FROM_LINK 0x00
ian@0 101 #define BOOT_FROM_RAM 0x01
ian@0 102 #define EXTERNAL_BUS_OFF 0x00
ian@0 103 #define EXTERNAL_BUS_ON 0x02
ian@0 104 #define INTERRUPT_DISABLE 0x00
ian@0 105 #define INTERRUPT_ENABLE 0x04
ian@0 106 #define BYTE_OPERATION 0x00
ian@0 107 #define WORD_OPERATION 0x08
ian@0 108 #define POLLED INTERRUPT_DISABLE
ian@0 109 #define IRQ_15 (0x00 | INTERRUPT_ENABLE)
ian@0 110 #define IRQ_12 (0x10 | INTERRUPT_ENABLE)
ian@0 111 #define IRQ_11 (0x20 | INTERRUPT_ENABLE)
ian@0 112 #define IRQ_9 (0x30 | INTERRUPT_ENABLE)
ian@0 113 #define SLOW_LINKS 0x00
ian@0 114 #define FAST_LINKS 0x40
ian@0 115 #define SLOW_AT_BUS 0x00
ian@0 116 #define FAST_AT_BUS 0x80
ian@0 117 #define SLOW_PCI_TP 0x00
ian@0 118 #define FAST_PCI_TP 0x80
ian@0 119 /*
ian@0 120 ** Debug levels
ian@0 121 */
ian@0 122 #define DBG_NONE 0x00000000
ian@0 123
ian@0 124 #define DBG_INIT 0x00000001
ian@0 125 #define DBG_OPEN 0x00000002
ian@0 126 #define DBG_CLOSE 0x00000004
ian@0 127 #define DBG_IOCTL 0x00000008
ian@0 128
ian@0 129 #define DBG_READ 0x00000010
ian@0 130 #define DBG_WRITE 0x00000020
ian@0 131 #define DBG_INTR 0x00000040
ian@0 132 #define DBG_PROC 0x00000080
ian@0 133
ian@0 134 #define DBG_PARAM 0x00000100
ian@0 135 #define DBG_CMD 0x00000200
ian@0 136 #define DBG_XPRINT 0x00000400
ian@0 137 #define DBG_POLL 0x00000800
ian@0 138
ian@0 139 #define DBG_DAEMON 0x00001000
ian@0 140 #define DBG_FAIL 0x00002000
ian@0 141 #define DBG_MODEM 0x00004000
ian@0 142 #define DBG_LIST 0x00008000
ian@0 143
ian@0 144 #define DBG_ROUTE 0x00010000
ian@0 145 #define DBG_UTIL 0x00020000
ian@0 146 #define DBG_BOOT 0x00040000
ian@0 147 #define DBG_BUFFER 0x00080000
ian@0 148
ian@0 149 #define DBG_MON 0x00100000
ian@0 150 #define DBG_SPECIAL 0x00200000
ian@0 151 #define DBG_VPIX 0x00400000
ian@0 152 #define DBG_FLUSH 0x00800000
ian@0 153
ian@0 154 #define DBG_QENABLE 0x01000000
ian@0 155
ian@0 156 #define DBG_ALWAYS 0x80000000
ian@0 157
ian@0 158 #endif /* __rio_riospace_h__ */