[BACK]Return to eisavar.h CVS log [TXT][DIR] Up to [local] / sys / dev / eisa

Annotation of sys/dev/eisa/eisavar.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: eisavar.h,v 1.12 2003/12/12 22:56:46 hshoexer 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 (__alpha__ + __i386__ + __arc__ + __hppa__ != 1)
                     58: #error COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE.
                     59: #endif
                     60: #if __alpha__
                     61: #include <alpha/eisa/eisa_machdep.h>
                     62: #endif
                     63: #if __i386__
                     64: #include <i386/eisa/eisa_machdep.h>
                     65: #endif
                     66: #if __arc__
                     67: #include <arc/eisa/eisa_machdep.h>
                     68: #endif
                     69: #if __hppa__
                     70: #include <hppa/include/eisa_machdep.h>
                     71: #endif
                     72:
                     73: typedef int    eisa_slot_t;            /* really only needs to be 4 bits */
                     74:
                     75: /*
                     76:  * EISA bus attach arguments.
                     77:  */
                     78: struct eisabus_attach_args {
                     79:        char    *eba_busname;           /* XXX should be common */
                     80:        bus_space_tag_t eba_iot;        /* eisa i/o space tag */
                     81:        bus_space_tag_t eba_memt;       /* eisa mem space tag */
                     82:        bus_dma_tag_t eba_dmat;         /* DMA tag */
                     83:        eisa_chipset_tag_t eba_ec;
                     84: };
                     85:
                     86: /*
                     87:  * EISA device attach arguments.
                     88:  */
                     89: struct eisa_attach_args {
                     90:        bus_space_tag_t ea_iot;         /* eisa i/o space tag */
                     91:        bus_space_tag_t ea_memt;        /* eisa mem space tag */
                     92:        bus_dma_tag_t ea_dmat;          /* DMA tag */
                     93:        eisa_chipset_tag_t ea_ec;
                     94:
                     95:        eisa_slot_t     ea_slot;
                     96:        u_int8_t        ea_vid[EISA_NVIDREGS];
                     97:        u_int8_t        ea_pid[EISA_NPIDREGS];
                     98:        char            ea_idstring[EISA_IDSTRINGLEN];
                     99: };
                    100:
                    101: /*
                    102:  * Locators for EISA devices, as specified to config.
                    103:  */
                    104: #define        eisacf_slot             cf_loc[0]
                    105: #define        EISA_UNKNOWN_SLOT       -1              /* wildcarded 'slot' */
                    106:
                    107: #endif /* _DEV_EISA_EISAVAR_H_ */

CVSweb