eisa_machdep.h revision 1.3 1 1.3 cgd /* $NetBSD: eisa_machdep.h,v 1.3 1999/03/19 02:59:49 cgd Exp $ */
2 1.3 cgd
3 1.3 cgd /*
4 1.3 cgd * Copyright (c) 1996 Carnegie-Mellon University.
5 1.3 cgd * All rights reserved.
6 1.3 cgd *
7 1.3 cgd * Author: Chris G. Demetriou
8 1.3 cgd *
9 1.3 cgd * Permission to use, copy, modify and distribute this software and
10 1.3 cgd * its documentation is hereby granted, provided that both the copyright
11 1.3 cgd * notice and this permission notice appear in all copies of the
12 1.3 cgd * software, derivative works or modified versions, and any portions
13 1.3 cgd * thereof, and that both notices appear in supporting documentation.
14 1.3 cgd *
15 1.3 cgd * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 1.3 cgd * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 1.3 cgd * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 1.3 cgd *
19 1.3 cgd * Carnegie Mellon requests users of this software to return to
20 1.3 cgd *
21 1.3 cgd * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
22 1.3 cgd * School of Computer Science
23 1.3 cgd * Carnegie Mellon University
24 1.3 cgd * Pittsburgh PA 15213-3890
25 1.3 cgd *
26 1.3 cgd * any improvements or extensions that they make and grant Carnegie the
27 1.3 cgd * rights to redistribute these changes.
28 1.3 cgd */
29 1.3 cgd
30 1.3 cgd /*
31 1.3 cgd * Types provided to machine-independent EISA code.
32 1.3 cgd */
33 1.3 cgd typedef struct alpha_eisa_chipset *eisa_chipset_tag_t;
34 1.3 cgd typedef int eisa_intr_handle_t;
35 1.3 cgd
36 1.3 cgd struct alpha_eisa_chipset {
37 1.3 cgd void *ec_v;
38 1.3 cgd
39 1.3 cgd void (*ec_attach_hook) __P((struct device *, struct device *,
40 1.3 cgd struct eisabus_attach_args *));
41 1.3 cgd int (*ec_maxslots) __P((void *));
42 1.3 cgd int (*ec_intr_map) __P((void *, u_int,
43 1.3 cgd eisa_intr_handle_t *));
44 1.3 cgd const char *(*ec_intr_string) __P((void *, eisa_intr_handle_t));
45 1.3 cgd void *(*ec_intr_establish) __P((void *, eisa_intr_handle_t,
46 1.3 cgd int, int, int (*)(void *), void *));
47 1.3 cgd void (*ec_intr_disestablish) __P((void *, void *));
48 1.3 cgd };
49 1.3 cgd
50 1.3 cgd /*
51 1.3 cgd * Functions provided to machine-independent EISA code.
52 1.3 cgd */
53 1.3 cgd #define eisa_attach_hook(p, s, a) \
54 1.3 cgd (*(a)->eba_ec->ec_attach_hook)((p), (s), (a))
55 1.3 cgd #define eisa_maxslots(c) \
56 1.3 cgd (*(c)->ec_maxslots)((c)->ec_v)
57 1.3 cgd #define eisa_intr_map(c, i, hp) \
58 1.3 cgd (*(c)->ec_intr_map)((c)->ec_v, (i), (hp))
59 1.3 cgd #define eisa_intr_string(c, h) \
60 1.3 cgd (*(c)->ec_intr_string)((c)->ec_v, (h))
61 1.3 cgd #define eisa_intr_establish(c, h, t, l, f, a) \
62 1.3 cgd (*(c)->ec_intr_establish)((c)->ec_v, (h), (t), (l), (f), (a))
63 1.3 cgd #define eisa_intr_disestablish(c, h) \
64 1.3 cgd (*(c)->ec_intr_disestablish)((c)->ec_v, (h))
65