autoconf.h revision 1.7.8.2 1 1.7.8.2 soda /* $NetBSD: autoconf.h,v 1.7.8.2 2001/06/13 14:58:44 soda Exp $ */
2 1.7.8.2 soda /* $OpenBSD: autoconf.h,v 1.2 1997/03/12 19:16:54 pefo Exp $ */
3 1.7.8.2 soda /* NetBSD: autoconf.h,v 1.1 1995/02/13 23:07:31 cgd Exp */
4 1.7.8.2 soda
5 1.7.8.2 soda /*
6 1.7.8.2 soda * Copyright (c) 1994, 1995 Carnegie-Mellon University.
7 1.7.8.2 soda * All rights reserved.
8 1.7.8.2 soda *
9 1.7.8.2 soda * Author: Chris G. Demetriou
10 1.7.8.2 soda *
11 1.7.8.2 soda * Permission to use, copy, modify and distribute this software and
12 1.7.8.2 soda * its documentation is hereby granted, provided that both the copyright
13 1.7.8.2 soda * notice and this permission notice appear in all copies of the
14 1.7.8.2 soda * software, derivative works or modified versions, and any portions
15 1.7.8.2 soda * thereof, and that both notices appear in supporting documentation.
16 1.7.8.2 soda *
17 1.7.8.2 soda * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
18 1.7.8.2 soda * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
19 1.7.8.2 soda * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
20 1.7.8.2 soda *
21 1.7.8.2 soda * Carnegie Mellon requests users of this software to return to
22 1.7.8.2 soda *
23 1.7.8.2 soda * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
24 1.7.8.2 soda * School of Computer Science
25 1.7.8.2 soda * Carnegie Mellon University
26 1.7.8.2 soda * Pittsburgh PA 15213-3890
27 1.7.8.2 soda *
28 1.7.8.2 soda * any improvements or extensions that they make and grant Carnegie the
29 1.7.8.2 soda * rights to redistribute these changes.
30 1.7.8.2 soda */
31 1.7.8.2 soda
32 1.7.8.2 soda /*
33 1.7.8.2 soda * Machine-dependent structures of autoconfiguration
34 1.7.8.2 soda */
35 1.7.8.2 soda
36 1.7.8.2 soda #ifndef _ARC_AUTOCONF_H_
37 1.7.8.2 soda #define _ARC_AUTOCONF_H_
38 1.7.8.2 soda
39 1.7.8.2 soda struct confargs;
40 1.7.8.2 soda
41 1.7.8.2 soda typedef int (*intr_handler_t) __P((void *));
42 1.7.8.2 soda
43 1.7.8.2 soda struct abus {
44 1.7.8.2 soda struct device *ab_dv; /* back-pointer to device */
45 1.7.8.2 soda int ab_type; /* bus type (see below) */
46 1.7.8.2 soda void (*ab_intr_establish) /* bus's set-handler function */
47 1.7.8.2 soda __P((struct confargs *, intr_handler_t, void *));
48 1.7.8.2 soda void (*ab_intr_disestablish) /* bus's unset-handler function */
49 1.7.8.2 soda __P((struct confargs *));
50 1.7.8.2 soda caddr_t (*ab_cvtaddr) /* convert slot/offset to address */
51 1.7.8.2 soda __P((struct confargs *));
52 1.7.8.2 soda int (*ab_matchname) /* see if name matches driver */
53 1.7.8.2 soda __P((struct confargs *, char *));
54 1.7.8.2 soda };
55 1.7.8.2 soda
56 1.7.8.2 soda #define BUS_MAIN 1 /* mainbus */
57 1.7.8.2 soda #define BUS_PICA 2 /* PICA Bus */
58 1.7.8.2 soda #define BUS_ISABR 3 /* ISA Bridge Bus */
59 1.7.8.2 soda
60 1.7.8.2 soda #define BUS_INTR_ESTABLISH(ca, handler, val) \
61 1.7.8.2 soda (*(ca)->ca_bus->ab_intr_establish)((ca), (handler), (val))
62 1.7.8.2 soda #define BUS_INTR_DISESTABLISH(ca) \
63 1.7.8.2 soda (*(ca)->ca_bus->ab_intr_establish)(ca)
64 1.7.8.2 soda #define BUS_CVTADDR(ca) \
65 1.7.8.2 soda (*(ca)->ca_bus->ab_cvtaddr)(ca)
66 1.7.8.2 soda #define BUS_MATCHNAME(ca, name) \
67 1.7.8.2 soda (*(ca)->ca_bus->ab_matchname)((ca), (name))
68 1.7.8.2 soda
69 1.7.8.2 soda struct confargs {
70 1.7.8.2 soda char *ca_name; /* Device name. */
71 1.7.8.2 soda int ca_slot; /* Device slot. */
72 1.7.8.2 soda int ca_offset; /* Offset into slot. */
73 1.7.8.2 soda struct abus *ca_bus; /* bus device resides on. */
74 1.7.8.2 soda };
75 1.7.8.2 soda
76 1.7.8.2 soda void makebootdev __P((char *cp));
77 1.7.8.2 soda
78 1.7.8.2 soda /* serial console related variables */
79 1.7.8.2 soda extern int com_freq;
80 1.7.8.2 soda extern int com_console;
81 1.7.8.2 soda extern int com_console_address;
82 1.7.8.2 soda extern int com_console_speed;
83 1.7.8.2 soda extern int com_console_mode;
84 1.7.8.2 soda #endif /* _ARC_AUTOCONF_H_ */
85