1 /* $OpenBSD: eisavar.h,v 1.14 2012/03/28 20:44:23 miod Exp $ */ 2 /* $NetBSD: eisavar.h,v 1.11 1997/06/06 23:30:07 thorpej Exp $ */ 3 4 /* 5 * Copyright (c) 1995, 1996 Christopher G. Demetriou 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. All advertising materials mentioning features or use of this software 17 * must display the following acknowledgement: 18 * This product includes software developed by Christopher G. Demetriou 19 * for the NetBSD Project. 20 * 4. The name of the author may not be used to endorse or promote products 21 * derived from this software without specific prior written permission 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34 35 #ifndef _DEV_EISA_EISAVAR_H_ 36 #define _DEV_EISA_EISAVAR_H_ 37 38 /* 39 * Definitions for EISA autoconfiguration. 40 * 41 * This file describes types and functions which are used for EISA 42 * configuration. Some of this information is machine-specific, and is 43 * separated into eisa_machdep.h. 44 */ 45 46 #include <machine/bus.h> 47 #include <dev/eisa/eisareg.h> /* For ID register & string info. */ 48 49 /* 50 * Structures and definitions needed by the machine-dependent header. 51 */ 52 struct eisabus_attach_args; 53 54 /* 55 * Machine-dependent definitions. 56 */ 57 #if defined(__alpha__) 58 #include <alpha/eisa/eisa_machdep.h> 59 #elif defined(__i386__) 60 #include <i386/eisa/eisa_machdep.h> 61 #else 62 #include <machine/eisa_machdep.h> 63 #endif 64 65 typedef int eisa_slot_t; /* really only needs to be 4 bits */ 66 67 /* 68 * EISA bus attach arguments. 69 */ 70 struct eisabus_attach_args { 71 char *eba_busname; /* XXX should be common */ 72 bus_space_tag_t eba_iot; /* eisa i/o space tag */ 73 bus_space_tag_t eba_memt; /* eisa mem space tag */ 74 bus_dma_tag_t eba_dmat; /* DMA tag */ 75 eisa_chipset_tag_t eba_ec; 76 }; 77 78 /* 79 * EISA device attach arguments. 80 */ 81 struct eisa_attach_args { 82 bus_space_tag_t ea_iot; /* eisa i/o space tag */ 83 bus_space_tag_t ea_memt; /* eisa mem space tag */ 84 bus_dma_tag_t ea_dmat; /* DMA tag */ 85 eisa_chipset_tag_t ea_ec; 86 87 eisa_slot_t ea_slot; 88 u_int8_t ea_vid[EISA_NVIDREGS]; 89 u_int8_t ea_pid[EISA_NPIDREGS]; 90 char ea_idstring[EISA_IDSTRINGLEN]; 91 }; 92 93 /* 94 * Locators for EISA devices, as specified to config. 95 */ 96 #define eisacf_slot cf_loc[0] 97 #define EISA_UNKNOWN_SLOT -1 /* wildcarded 'slot' */ 98 99 #endif /* _DEV_EISA_EISAVAR_H_ */ 100