ia64/linux-2.6.18-xen.hg

annotate drivers/char/rio/host.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 : host.h
ian@0 24 ** SID : 1.2
ian@0 25 ** Last Modified : 11/6/98 11:34:10
ian@0 26 ** Retrieved : 11/6/98 11:34:21
ian@0 27 **
ian@0 28 ** ident @(#)host.h 1.2
ian@0 29 **
ian@0 30 ** -----------------------------------------------------------------------------
ian@0 31 */
ian@0 32
ian@0 33 #ifndef __rio_host_h__
ian@0 34 #define __rio_host_h__
ian@0 35
ian@0 36 /*
ian@0 37 ** the host structure - one per host card in the system.
ian@0 38 */
ian@0 39
ian@0 40 #define MAX_EXTRA_UNITS 64
ian@0 41
ian@0 42 /*
ian@0 43 ** Host data structure. This is used for the software equiv. of
ian@0 44 ** the host.
ian@0 45 */
ian@0 46 struct Host {
ian@0 47 unsigned char Type; /* RIO_EISA, RIO_MCA, ... */
ian@0 48 unsigned char Ivec; /* POLLED or ivec number */
ian@0 49 unsigned char Mode; /* Control stuff */
ian@0 50 unsigned char Slot; /* Slot */
ian@0 51 void __iomem *Caddr; /* KV address of DPRAM */
ian@0 52 struct DpRam __iomem *CardP; /* KV address of DPRAM, with overlay */
ian@0 53 unsigned long PaddrP; /* Phys. address of DPRAM */
ian@0 54 char Name[MAX_NAME_LEN]; /* The name of the host */
ian@0 55 unsigned int UniqueNum; /* host unique number */
ian@0 56 spinlock_t HostLock; /* Lock structure for MPX */
ian@0 57 unsigned int WorkToBeDone; /* set to true each interrupt */
ian@0 58 unsigned int InIntr; /* Being serviced? */
ian@0 59 unsigned int IntSrvDone; /* host's interrupt has been serviced */
ian@0 60 void (*Copy) (void *, void __iomem *, int); /* copy func */
ian@0 61 struct timer_list timer;
ian@0 62 /*
ian@0 63 ** I M P O R T A N T !
ian@0 64 **
ian@0 65 ** The rest of this data structure is cleared to zero after
ian@0 66 ** a RIO_HOST_FOAD command.
ian@0 67 */
ian@0 68
ian@0 69 unsigned long Flags; /* Whats going down */
ian@0 70 #define RC_WAITING 0
ian@0 71 #define RC_STARTUP 1
ian@0 72 #define RC_RUNNING 2
ian@0 73 #define RC_STUFFED 3
ian@0 74 #define RC_READY 7
ian@0 75 #define RUN_STATE 7
ian@0 76 /*
ian@0 77 ** Boot mode applies to the way in which hosts in this system will
ian@0 78 ** boot RTAs
ian@0 79 */
ian@0 80 #define RC_BOOT_ALL 0x8 /* Boot all RTAs attached */
ian@0 81 #define RC_BOOT_OWN 0x10 /* Only boot RTAs bound to this system */
ian@0 82 #define RC_BOOT_NONE 0x20 /* Don't boot any RTAs (slave mode) */
ian@0 83
ian@0 84 struct Top Topology[LINKS_PER_UNIT]; /* one per link */
ian@0 85 struct Map Mapping[MAX_RUP]; /* Mappings for host */
ian@0 86 struct PHB __iomem *PhbP; /* Pointer to the PHB array */
ian@0 87 unsigned short __iomem *PhbNumP; /* Ptr to Number of PHB's */
ian@0 88 struct LPB __iomem *LinkStrP; /* Link Structure Array */
ian@0 89 struct RUP __iomem *RupP; /* Sixteen real rups here */
ian@0 90 struct PARM_MAP __iomem *ParmMapP; /* points to the parmmap */
ian@0 91 unsigned int ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
ian@0 92 unsigned int NumExtraBooted; /* how many of the above */
ian@0 93 /*
ian@0 94 ** Twenty logical rups.
ian@0 95 ** The first sixteen are the real Rup entries (above), the last four
ian@0 96 ** are the link RUPs.
ian@0 97 */
ian@0 98 struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
ian@0 99 int timeout_id; /* For calling 100 ms delays */
ian@0 100 int timeout_sem; /* For calling 100 ms delays */
ian@0 101 long locks; /* long req'd for set_bit --RR */
ian@0 102 char ____end_marker____;
ian@0 103 };
ian@0 104 #define Control CardP->DpControl
ian@0 105 #define SetInt CardP->DpSetInt
ian@0 106 #define ResetTpu CardP->DpResetTpu
ian@0 107 #define ResetInt CardP->DpResetInt
ian@0 108 #define Signature CardP->DpSignature
ian@0 109 #define Sram1 CardP->DpSram1
ian@0 110 #define Sram2 CardP->DpSram2
ian@0 111 #define Sram3 CardP->DpSram3
ian@0 112 #define Scratch CardP->DpScratch
ian@0 113 #define __ParmMapR CardP->DpParmMapR
ian@0 114 #define SLX CardP->DpSlx
ian@0 115 #define Revision CardP->DpRevision
ian@0 116 #define Unique CardP->DpUnique
ian@0 117 #define Year CardP->DpYear
ian@0 118 #define Week CardP->DpWeek
ian@0 119
ian@0 120 #define RIO_DUMBPARM 0x0860 /* what not to expect */
ian@0 121
ian@0 122 #endif