eisavar.h revision 1.3 1 1.3 cgd /* $NetBSD: eisavar.h,v 1.3 1996/02/27 00:21:03 cgd Exp $ */
2 1.1 cgd
3 1.1 cgd /*
4 1.3 cgd * Copyright (c) 1995, 1996 Christopher G. Demetriou
5 1.1 cgd * All rights reserved.
6 1.1 cgd *
7 1.1 cgd * Redistribution and use in source and binary forms, with or without
8 1.1 cgd * modification, are permitted provided that the following conditions
9 1.1 cgd * are met:
10 1.1 cgd * 1. Redistributions of source code must retain the above copyright
11 1.1 cgd * notice, this list of conditions and the following disclaimer.
12 1.1 cgd * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 cgd * notice, this list of conditions and the following disclaimer in the
14 1.1 cgd * documentation and/or other materials provided with the distribution.
15 1.1 cgd * 3. All advertising materials mentioning features or use of this software
16 1.1 cgd * must display the following acknowledgement:
17 1.1 cgd * This product includes software developed by Christopher G. Demetriou
18 1.1 cgd * for the NetBSD Project.
19 1.1 cgd * 4. The name of the author may not be used to endorse or promote products
20 1.1 cgd * derived from this software without specific prior written permission
21 1.1 cgd *
22 1.1 cgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 1.1 cgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 1.1 cgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 1.1 cgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 1.1 cgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 1.1 cgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 1.1 cgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 1.1 cgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 1.1 cgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 1.1 cgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 1.1 cgd */
33 1.1 cgd
34 1.3 cgd #ifndef __DEV_EISA_EISAVAR_H__
35 1.3 cgd #define __DEV_EISA_EISAVAR_H__
36 1.3 cgd
37 1.3 cgd /*
38 1.3 cgd * Definitions for EISA autoconfiguration.
39 1.3 cgd *
40 1.3 cgd * This file describes types, constants, and functions which are used
41 1.3 cgd * for EISA autoconfiguration.
42 1.3 cgd */
43 1.3 cgd
44 1.3 cgd #include <dev/eisa/eisareg.h> /* For ID register & string info. */
45 1.3 cgd
46 1.3 cgd
47 1.3 cgd typedef int eisa_slot_t; /* really only needs to be 4 bits */
48 1.3 cgd
49 1.3 cgd
50 1.1 cgd /*
51 1.3 cgd * EISA bus attach arguments.
52 1.1 cgd */
53 1.3 cgd struct eisabus_attach_args {
54 1.3 cgd char *eba_busname; /* XXX should be common */
55 1.3 cgd };
56 1.1 cgd
57 1.1 cgd /*
58 1.3 cgd * EISA device attach arguments.
59 1.1 cgd */
60 1.3 cgd struct eisa_attach_args {
61 1.3 cgd eisa_slot_t ea_slot;
62 1.3 cgd u_int8_t ea_vid[EISA_NVIDREGS];
63 1.3 cgd u_int8_t ea_pid[EISA_NPIDREGS];
64 1.3 cgd char ea_idstring[EISA_IDSTRINGLEN];
65 1.3 cgd };
66 1.3 cgd
67 1.3 cgd
68 1.3 cgd /*
69 1.3 cgd * Easy to remember names for EISA device locators.
70 1.3 cgd */
71 1.3 cgd
72 1.3 cgd #define eisacf_slot cf_loc[0] /* slot */
73 1.3 cgd
74 1.3 cgd
75 1.3 cgd /*
76 1.3 cgd * EISA device locator values that mean "unknown" or "unspecified."
77 1.3 cgd * Note that not all are supplied by 'config' and should be filled
78 1.3 cgd * in by the device if appropriate.
79 1.3 cgd */
80 1.3 cgd
81 1.3 cgd #define EISA_UNKNOWN_SLOT ((eisa_slot_t)-1)
82 1.3 cgd
83 1.3 cgd /*
84 1.3 cgd * The EISA bus cfdriver, so that subdevices can more easily tell
85 1.3 cgd * what bus they're on.
86 1.3 cgd */
87 1.3 cgd
88 1.3 cgd extern struct cfdriver eisacd;
89 1.1 cgd
90 1.1 cgd /*
91 1.3 cgd * XXX interrupt attachment, etc., is done by using the ISA interfaces.
92 1.3 cgd * XXX THIS SHOULD CHANGE.
93 1.1 cgd */
94 1.1 cgd
95 1.3 cgd #include <dev/isa/isavar.h>
96 1.3 cgd
97 1.1 cgd #define eisa_intr_establish isa_intr_establish /* XXX */
98 1.1 cgd #define eisa_intr_disestablish isa_intr_disestablish /* XXX */
99 1.3 cgd
100 1.3 cgd #endif /* !__DEV_EISA_EISAVAR_H__ */
101