xref: /openbsd/sys/arch/sparc64/include/conf.h (revision 891d7ab6)
1 /*	$OpenBSD: conf.h,v 1.21 2010/07/21 15:40:04 deraadt Exp $	*/
2 /*	$NetBSD: conf.h,v 1.9 2001/03/26 12:33:26 lukem Exp $	*/
3 
4 /*-
5  * Copyright (c) 1996 The NetBSD Foundation, Inc.
6  * All rights reserved.
7  *
8  * This code is derived from software contributed to The NetBSD Foundation
9  * by Christos Zoulas.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  *    notice, this list of conditions and the following disclaimer in the
18  *    documentation and/or other materials provided with the distribution.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #define mmread mmrw
34 #define mmwrite mmrw
35 cdev_decl(mm);
36 
37 cdev_decl(openprom);
38 
39 /* open, close, ioctl */
40 #define cdev_openprom_init(c,n) { \
41 	dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
42 	(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
43 	(dev_type_stop((*))) nullop, 0, selfalse, \
44 	(dev_type_mmap((*))) enodev }
45 
46 cdev_decl(uperf);
47 
48 /* open, close, ioctl */
49 #define cdev_uperf_init(c,n) { \
50 	dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
51 	(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
52 	(dev_type_stop((*))) nullop, 0, selfalse, \
53 	(dev_type_mmap((*))) enodev }
54 
55 #define	cdev_gen_init(c,n) { \
56 	dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
57 	dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
58 	0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev }
59 
60 cdev_decl(cn);
61 
62 cdev_decl(zs);
63 
64 bdev_decl(fd);
65 cdev_decl(fd);
66 
67 cdev_decl(fb);
68 
69 cdev_decl(ms);
70 
71 cdev_decl(kbd);
72 cdev_decl(kd);
73 
74 cdev_decl(bwtwo);
75 
76 cdev_decl(cgtwo);
77 
78 cdev_decl(cgthree);
79 
80 cdev_decl(cgfour);
81 
82 cdev_decl(cgsix);
83 
84 cdev_decl(cgeight);
85 
86 cdev_decl(tcx);
87 
88 cdev_decl(cgfourteen);
89 
90 cdev_decl(bpp);
91 cdev_decl(lpt);
92 
93 cdev_decl(scsibus);
94 
95 bdev_decl(wd);
96 cdev_decl(wd);
97 
98 cdev_decl(sabtty);
99 
100 cdev_decl(pcons);
101 cdev_decl(vcons);
102 cdev_decl(vcctty);
103 cdev_decl(sbbc);
104 
105 cdev_decl(com);
106 
107 cdev_decl(mtty);
108 cdev_decl(mbpp);
109 cdev_decl(stty);
110 cdev_decl(sbpp);
111 
112 /* open, close, write, ioctl */
113 #define	cdev_bpp_init(c,n) { \
114 	dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
115 	dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
116 	0, seltrue, (dev_type_mmap((*))) enodev }
117 
118 cdev_decl(bpp);
119