1*89e78ff6Smiod /* $OpenBSD: eisavar.h,v 1.14 2012/03/28 20:44:23 miod 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*89e78ff6Smiod #if defined(__alpha__) 58d724e01aSderaadt #include <alpha/eisa/eisa_machdep.h> 59*89e78ff6Smiod #elif defined(__i386__) 60d724e01aSderaadt #include <i386/eisa/eisa_machdep.h> 61*89e78ff6Smiod #else 62*89e78ff6Smiod #include <machine/eisa_machdep.h> 6311e86c0bSmickey #endif 648bd19141Sniklas 658bd19141Sniklas typedef int eisa_slot_t; /* really only needs to be 4 bits */ 668bd19141Sniklas 678bd19141Sniklas /* 688bd19141Sniklas * EISA bus attach arguments. 698bd19141Sniklas */ 708bd19141Sniklas struct eisabus_attach_args { 718bd19141Sniklas char *eba_busname; /* XXX should be common */ 72c0981ad2Sniklas bus_space_tag_t eba_iot; /* eisa i/o space tag */ 73c0981ad2Sniklas bus_space_tag_t eba_memt; /* eisa mem space tag */ 74c44e1821Sniklas bus_dma_tag_t eba_dmat; /* DMA tag */ 75d724e01aSderaadt eisa_chipset_tag_t eba_ec; 768bd19141Sniklas }; 778bd19141Sniklas 788bd19141Sniklas /* 798bd19141Sniklas * EISA device attach arguments. 808bd19141Sniklas */ 818bd19141Sniklas struct eisa_attach_args { 82c0981ad2Sniklas bus_space_tag_t ea_iot; /* eisa i/o space tag */ 83c0981ad2Sniklas bus_space_tag_t ea_memt; /* eisa mem space tag */ 84c44e1821Sniklas bus_dma_tag_t ea_dmat; /* DMA tag */ 85d724e01aSderaadt eisa_chipset_tag_t ea_ec; 868bd19141Sniklas 878bd19141Sniklas eisa_slot_t ea_slot; 888bd19141Sniklas u_int8_t ea_vid[EISA_NVIDREGS]; 898bd19141Sniklas u_int8_t ea_pid[EISA_NPIDREGS]; 908bd19141Sniklas char ea_idstring[EISA_IDSTRINGLEN]; 918bd19141Sniklas }; 928bd19141Sniklas 938bd19141Sniklas /* 94d724e01aSderaadt * Locators for EISA devices, as specified to config. 958bd19141Sniklas */ 96d724e01aSderaadt #define eisacf_slot cf_loc[0] 97d724e01aSderaadt #define EISA_UNKNOWN_SLOT -1 /* wildcarded 'slot' */ 988bd19141Sniklas 99d724e01aSderaadt #endif /* _DEV_EISA_EISAVAR_H_ */ 100