The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/eisa/eisaconf.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * EISA bus device definitions
    3  *
    4  * Copyright (c) 1995, 1996 Justin T. Gibbs.
    5  * All rights reserved.
    6  * 
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice immediately at the beginning of the file, without modification,
   12  *    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. The name of the author may not be used to endorse or promote products
   17  *    derived from this software without specific prior written permission.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
   23  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   29  * SUCH DAMAGE.
   30  *
   31  * $FreeBSD: releng/10.2/sys/dev/eisa/eisaconf.h 139749 2005-01-06 01:43:34Z imp $
   32  */
   33 
   34 #ifndef _DEV_EISA_EISACONF_H_
   35 #define _DEV_EISA_EISACONF_H_ 1
   36 
   37 #include "eisa_if.h"
   38 #define EISA_SLOT_SIZE 0x1000
   39 
   40 #define EISA_MFCTR_CHAR0(ID) (char)(((ID>>26) & 0x1F) | '@')  /* Bits 26-30 */
   41 #define EISA_MFCTR_CHAR1(ID) (char)(((ID>>21) & 0x1F) | '@')  /* Bits 21-25 */
   42 #define EISA_MFCTR_CHAR2(ID) (char)(((ID>>16) & 0x1F) | '@')  /* Bits 16-20 */
   43 #define EISA_MFCTR_ID(ID)    (short)((ID>>16) & 0xFF)         /* Bits 16-31 */
   44 #define EISA_PRODUCT_ID(ID)  (short)((ID>>4)  & 0xFFF)        /* Bits  4-15 */
   45 #define EISA_REVISION_ID(ID) (u_char)(ID & 0x0F)              /* Bits  0-3  */
   46 
   47 extern int num_eisa_slots;
   48 
   49 typedef u_int32_t eisa_id_t;
   50 
   51 enum eisa_device_ivars {
   52     EISA_IVAR_SLOT,
   53     EISA_IVAR_ID,
   54     EISA_IVAR_IRQ
   55 };
   56 
   57 #define EISA_TRIGGER_EDGE       0x0
   58 #define EISA_TRIGGER_LEVEL      0x1
   59 
   60 /*
   61  * Simplified accessors for isa devices
   62  */
   63 #define EISA_ACCESSOR(var, ivar, type)                                   \
   64         __BUS_ACCESSOR(eisa, var, EISA, ivar, type)
   65 
   66 EISA_ACCESSOR(slot, SLOT, int)
   67 EISA_ACCESSOR(id, ID, eisa_id_t)
   68 EISA_ACCESSOR(irq, IRQ, eisa_id_t)
   69 
   70 #undef EISA_ACCESSOR
   71 
   72 #define         RESVADDR_NONE           0x00
   73 #define         RESVADDR_BITMASK        0x01    /* size is a mask of reserved 
   74                                                  * bits at addr
   75                                                  */
   76 #define         RESVADDR_RELOCATABLE    0x02
   77 
   78 static __inline int
   79 eisa_add_intr(device_t dev, int irq, int trigger)
   80 {
   81         return (EISA_ADD_INTR(device_get_parent(dev), dev, irq, trigger));
   82 }
   83 
   84 static __inline int
   85 eisa_add_iospace(device_t dev, u_long iobase, u_long iosize, int flags)
   86 {
   87         return (EISA_ADD_IOSPACE(device_get_parent(dev), dev, iobase, iosize,
   88             flags));
   89 }
   90 
   91 static __inline int
   92 eisa_add_mspace(device_t dev, u_long mbase, u_long msize, int flags)
   93 {
   94         return (EISA_ADD_MSPACE(device_get_parent(dev), dev, mbase, msize,
   95             flags));
   96 }
   97 
   98 #endif /* _DEV_EISA_EISACONF_H_ */

Cache object: 5cf134b0d6beed1b6152e113140c1485


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.