1*8bd19141Sniklas /* $OpenBSD: eisavar.h,v 1.3 1996/04/18 23:47:13 niklas Exp $ */ 2*8bd19141Sniklas /* $NetBSD: eisavar.h,v 1.4 1996/03/08 20:25:22 cgd Exp $ */ 3df930be7Sderaadt 4df930be7Sderaadt /* 5*8bd19141Sniklas * 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 35*8bd19141Sniklas #ifndef __DEV_EISA_EISAVAR_H__ 36*8bd19141Sniklas #define __DEV_EISA_EISAVAR_H__ 37df930be7Sderaadt 38df930be7Sderaadt /* 39*8bd19141Sniklas * Definitions for EISA autoconfiguration. 40*8bd19141Sniklas * 41*8bd19141Sniklas * This file describes types, constants, and functions which are used 42*8bd19141Sniklas * for EISA autoconfiguration. 43df930be7Sderaadt */ 44*8bd19141Sniklas 45*8bd19141Sniklas #include <machine/bus.h> 46*8bd19141Sniklas #include <dev/eisa/eisareg.h> /* For ID register & string info. */ 47*8bd19141Sniklas 48*8bd19141Sniklas 49*8bd19141Sniklas typedef int eisa_slot_t; /* really only needs to be 4 bits */ 50*8bd19141Sniklas 51*8bd19141Sniklas 52*8bd19141Sniklas /* 53*8bd19141Sniklas * EISA bus attach arguments. 54*8bd19141Sniklas */ 55*8bd19141Sniklas struct eisabus_attach_args { 56*8bd19141Sniklas char *eba_busname; /* XXX should be common */ 57*8bd19141Sniklas bus_chipset_tag_t eba_bc; /* XXX should be common */ 58*8bd19141Sniklas }; 59*8bd19141Sniklas 60*8bd19141Sniklas 61*8bd19141Sniklas /* 62*8bd19141Sniklas * EISA device attach arguments. 63*8bd19141Sniklas */ 64*8bd19141Sniklas struct eisa_attach_args { 65*8bd19141Sniklas bus_chipset_tag_t ea_bc; 66*8bd19141Sniklas 67*8bd19141Sniklas eisa_slot_t ea_slot; 68*8bd19141Sniklas u_int8_t ea_vid[EISA_NVIDREGS]; 69*8bd19141Sniklas u_int8_t ea_pid[EISA_NPIDREGS]; 70*8bd19141Sniklas char ea_idstring[EISA_IDSTRINGLEN]; 71*8bd19141Sniklas }; 72*8bd19141Sniklas 73*8bd19141Sniklas 74*8bd19141Sniklas /* 75*8bd19141Sniklas * Easy to remember names for EISA device locators. 76*8bd19141Sniklas */ 77*8bd19141Sniklas 78*8bd19141Sniklas #define eisacf_slot cf_loc[0] /* slot */ 79*8bd19141Sniklas 80*8bd19141Sniklas 81*8bd19141Sniklas /* 82*8bd19141Sniklas * EISA device locator values that mean "unknown" or "unspecified." 83*8bd19141Sniklas * Note that not all are supplied by 'config' and should be filled 84*8bd19141Sniklas * in by the device if appropriate. 85*8bd19141Sniklas */ 86*8bd19141Sniklas 87*8bd19141Sniklas #define EISA_UNKNOWN_SLOT ((eisa_slot_t)-1) 88*8bd19141Sniklas 89*8bd19141Sniklas /* 90*8bd19141Sniklas * The EISA bus cfdriver, so that subdevices can more easily tell 91*8bd19141Sniklas * what bus they're on. 92*8bd19141Sniklas */ 93*8bd19141Sniklas 94*8bd19141Sniklas extern struct cfdriver eisacd; 95*8bd19141Sniklas 96*8bd19141Sniklas /* 97*8bd19141Sniklas * XXX interrupt attachment, etc., is done by using the ISA interfaces. 98*8bd19141Sniklas * XXX THIS SHOULD CHANGE. 99*8bd19141Sniklas */ 100*8bd19141Sniklas 101df930be7Sderaadt #include <dev/isa/isavar.h> 102df930be7Sderaadt 103df930be7Sderaadt #define eisa_intr_establish isa_intr_establish /* XXX */ 104df930be7Sderaadt #define eisa_intr_disestablish isa_intr_disestablish /* XXX */ 105*8bd19141Sniklas 106*8bd19141Sniklas #endif /* !__DEV_EISA_EISAVAR_H__ */ 107