1*11e86c0bSmickey /* $OpenBSD: eisavar.h,v 1.9 1998/10/29 22:45:30 mickey Exp $ */ 2c44e1821Sniklas /* $NetBSD: eisavar.h,v 1.11 1997/06/06 23:30:07 thorpej Exp $ */ 3df930be7Sderaadt 4df930be7Sderaadt /* 58bd19141Sniklas * Copyright (c) 1995, 1996 Christopher G. Demetriou 6df930be7Sderaadt * All rights reserved. 7df930be7Sderaadt * 8df930be7Sderaadt * Redistribution and use in source and binary forms, with or without 9df930be7Sderaadt * modification, are permitted provided that the following conditions 10df930be7Sderaadt * are met: 11df930be7Sderaadt * 1. Redistributions of source code must retain the above copyright 12df930be7Sderaadt * notice, this list of conditions and the following disclaimer. 13df930be7Sderaadt * 2. Redistributions in binary form must reproduce the above copyright 14df930be7Sderaadt * notice, this list of conditions and the following disclaimer in the 15df930be7Sderaadt * documentation and/or other materials provided with the distribution. 16df930be7Sderaadt * 3. All advertising materials mentioning features or use of this software 17df930be7Sderaadt * must display the following acknowledgement: 18df930be7Sderaadt * This product includes software developed by Christopher G. Demetriou 19df930be7Sderaadt * for the NetBSD Project. 20df930be7Sderaadt * 4. The name of the author may not be used to endorse or promote products 21df930be7Sderaadt * derived from this software without specific prior written permission 22df930be7Sderaadt * 23df930be7Sderaadt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 24df930be7Sderaadt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25df930be7Sderaadt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26df930be7Sderaadt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27df930be7Sderaadt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28df930be7Sderaadt * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29df930be7Sderaadt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30df930be7Sderaadt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31df930be7Sderaadt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32df930be7Sderaadt * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33df930be7Sderaadt */ 34df930be7Sderaadt 35d724e01aSderaadt #ifndef _DEV_EISA_EISAVAR_H_ 36d724e01aSderaadt #define _DEV_EISA_EISAVAR_H_ 37df930be7Sderaadt 38df930be7Sderaadt /* 398bd19141Sniklas * Definitions for EISA autoconfiguration. 408bd19141Sniklas * 41d724e01aSderaadt * This file describes types and functions which are used for EISA 42d724e01aSderaadt * configuration. Some of this information is machine-specific, and is 43d724e01aSderaadt * separated into eisa_machdep.h. 44df930be7Sderaadt */ 458bd19141Sniklas 46c0981ad2Sniklas #include <machine/bus.h> 478bd19141Sniklas #include <dev/eisa/eisareg.h> /* For ID register & string info. */ 488bd19141Sniklas 49d724e01aSderaadt /* 50d724e01aSderaadt * Structures and definitions needed by the machine-dependent header. 51d724e01aSderaadt */ 52d724e01aSderaadt struct eisabus_attach_args; 53d724e01aSderaadt 54d724e01aSderaadt /* 55d724e01aSderaadt * Machine-dependent definitions. 56d724e01aSderaadt */ 57*11e86c0bSmickey #if (alpha + i386 + arc + hppa != 1) 58d724e01aSderaadt ERROR: COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE. 59d724e01aSderaadt #endif 60d724e01aSderaadt #if alpha 61d724e01aSderaadt #include <alpha/eisa/eisa_machdep.h> 62d724e01aSderaadt #endif 63d724e01aSderaadt #if i386 64d724e01aSderaadt #include <i386/eisa/eisa_machdep.h> 65d724e01aSderaadt #endif 66eef949feSpefo #if arc 67eef949feSpefo #include <arc/eisa/eisa_machdep.h> 68eef949feSpefo #endif 69*11e86c0bSmickey #if hppa 70*11e86c0bSmickey #include <hppa/eisa/eisa_machdep.h> 71*11e86c0bSmickey #endif 728bd19141Sniklas 738bd19141Sniklas typedef int eisa_slot_t; /* really only needs to be 4 bits */ 748bd19141Sniklas 758bd19141Sniklas /* 768bd19141Sniklas * EISA bus attach arguments. 778bd19141Sniklas */ 788bd19141Sniklas struct eisabus_attach_args { 798bd19141Sniklas char *eba_busname; /* XXX should be common */ 80c0981ad2Sniklas bus_space_tag_t eba_iot; /* eisa i/o space tag */ 81c0981ad2Sniklas bus_space_tag_t eba_memt; /* eisa mem space tag */ 82c44e1821Sniklas bus_dma_tag_t eba_dmat; /* DMA tag */ 83d724e01aSderaadt eisa_chipset_tag_t eba_ec; 848bd19141Sniklas }; 858bd19141Sniklas 868bd19141Sniklas /* 878bd19141Sniklas * EISA device attach arguments. 888bd19141Sniklas */ 898bd19141Sniklas struct eisa_attach_args { 90c0981ad2Sniklas bus_space_tag_t ea_iot; /* eisa i/o space tag */ 91c0981ad2Sniklas bus_space_tag_t ea_memt; /* eisa mem space tag */ 92c44e1821Sniklas bus_dma_tag_t ea_dmat; /* DMA tag */ 93d724e01aSderaadt eisa_chipset_tag_t ea_ec; 948bd19141Sniklas 958bd19141Sniklas eisa_slot_t ea_slot; 968bd19141Sniklas u_int8_t ea_vid[EISA_NVIDREGS]; 978bd19141Sniklas u_int8_t ea_pid[EISA_NPIDREGS]; 988bd19141Sniklas char ea_idstring[EISA_IDSTRINGLEN]; 998bd19141Sniklas }; 1008bd19141Sniklas 1018bd19141Sniklas /* 102d724e01aSderaadt * Locators for EISA devices, as specified to config. 1038bd19141Sniklas */ 104d724e01aSderaadt #define eisacf_slot cf_loc[0] 105d724e01aSderaadt #define EISA_UNKNOWN_SLOT -1 /* wildcarded 'slot' */ 1068bd19141Sniklas 107d724e01aSderaadt #endif /* _DEV_EISA_EISAVAR_H_ */ 108