autoconf.h revision 1.7 1 1.7 mhitch /* $NetBSD: autoconf.h,v 1.7 1996/05/29 06:19:49 mhitch Exp $ */
2 1.1 jonathan
3 1.1 jonathan /*
4 1.1 jonathan * Copyright (c) 1994, 1995 Carnegie-Mellon University.
5 1.1 jonathan * All rights reserved.
6 1.1 jonathan *
7 1.1 jonathan * Author: Chris G. Demetriou
8 1.1 jonathan *
9 1.1 jonathan * Permission to use, copy, modify and distribute this software and
10 1.1 jonathan * its documentation is hereby granted, provided that both the copyright
11 1.1 jonathan * notice and this permission notice appear in all copies of the
12 1.1 jonathan * software, derivative works or modified versions, and any portions
13 1.1 jonathan * thereof, and that both notices appear in supporting documentation.
14 1.1 jonathan *
15 1.1 jonathan * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16 1.1 jonathan * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17 1.1 jonathan * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 1.1 jonathan *
19 1.1 jonathan * Carnegie Mellon requests users of this software to return to
20 1.1 jonathan *
21 1.1 jonathan * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
22 1.1 jonathan * School of Computer Science
23 1.1 jonathan * Carnegie Mellon University
24 1.1 jonathan * Pittsburgh PA 15213-3890
25 1.1 jonathan *
26 1.1 jonathan * any improvements or extensions that they make and grant Carnegie the
27 1.1 jonathan * rights to redistribute these changes.
28 1.1 jonathan */
29 1.1 jonathan
30 1.1 jonathan /*
31 1.1 jonathan * Machine-dependent structures of autoconfiguration
32 1.1 jonathan */
33 1.1 jonathan
34 1.4 jonathan #include <machine/tc_machdep.h>
35 1.4 jonathan
36 1.1 jonathan struct confargs;
37 1.1 jonathan
38 1.6 jonathan
39 1.1 jonathan /* Handle device interrupt for given unit of a driver */
40 1.1 jonathan
41 1.2 jonathan typedef void* intr_arg_t; /* pointer to some softc */
42 1.2 jonathan typedef int (*intr_handler_t) __P((intr_arg_t));
43 1.6 jonathan /*
44 1.6 jonathan * XXX Establish interrupt on an arbitrary decstation/decsystem bus.
45 1.6 jonathan */
46 1.6 jonathan extern void
47 1.6 jonathan generic_intr_establish __P(( void * parent, void * cookie,
48 1.6 jonathan int level,
49 1.6 jonathan intr_handler_t handler, intr_arg_t arg));
50 1.6 jonathan
51 1.1 jonathan
52 1.4 jonathan #define KN02_ASIC_NAME "KN02 " /* ROM name in 3max system slot */
53 1.1 jonathan
54 1.5 jonathan #define INTR_ESTABLISH(parent, cookie, level, handler, val) \
55 1.5 jonathan generic_intr_establish((parent), (cookie), (level), (handler), (val))
56 1.5 jonathan
57 1.5 jonathan #define BUS_INTR_ESTABLISH(ca, handler, val) \
58 1.5 jonathan generic_intr_establish( ((struct device*)(val))->dv_parent, \
59 1.6 jonathan (void*)(ca)->ca_slotpri, 0, (handler), (val))
60 1.4 jonathan
61 1.1 jonathan
62 1.1 jonathan struct confargs {
63 1.7 mhitch char *ca_name; /* Device name. */
64 1.1 jonathan int ca_slot; /* Device slot (table entry). */
65 1.3 jonathan int ca_offset; /* Offset into slot. */
66 1.4 jonathan tc_addr_t ca_addr; /* Device address. */
67 1.1 jonathan int ca_slotpri; /* Device interrupt "priority" */
68 1.1 jonathan };
69 1.2 jonathan
70 1.4 jonathan extern caddr_t baseboard_cvtaddr __P((struct confargs *)); /*XXX*/
71 1.1 jonathan
72 1.1 jonathan #ifndef pmax
73 1.1 jonathan void set_clockintr __P((void (*)(struct clockframe *)));
74 1.1 jonathan #endif
75 1.1 jonathan void set_iointr __P((void (*)(void *, int)));
76 1.1 jonathan int badaddr __P((void *, u_int));
77