xref: /openbsd/sys/arch/sparc64/include/conf.h (revision d89ec533)
1 /*	$OpenBSD: conf.h,v 1.26 2020/05/23 11:29:37 mpi 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 cdev_decl(vdsp);
56 
57 /* open, close, ioctl */
58 #define cdev_vdsp_init(c,n) { \
59 	dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
60 	(dev_type_write((*))) enodev, dev_init(c,n,ioctl), \
61 	(dev_type_stop((*))) nullop, 0, selfalse, \
62 	(dev_type_mmap((*))) enodev }
63 
64 #define	cdev_gen_init(c,n) { \
65 	dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
66 	dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
67 	0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev, \
68 	0, 0, dev_init(c,n,kqfilter) }
69 
70 cdev_decl(cn);
71 
72 cdev_decl(zs);
73 
74 bdev_decl(fd);
75 cdev_decl(fd);
76 
77 cdev_decl(fb);
78 
79 cdev_decl(ms);
80 
81 cdev_decl(kbd);
82 cdev_decl(kd);
83 
84 cdev_decl(bwtwo);
85 
86 cdev_decl(cgtwo);
87 
88 cdev_decl(cgthree);
89 
90 cdev_decl(cgfour);
91 
92 cdev_decl(cgsix);
93 
94 cdev_decl(cgeight);
95 
96 cdev_decl(tcx);
97 
98 cdev_decl(cgfourteen);
99 
100 cdev_decl(bpp);
101 cdev_decl(lpt);
102 
103 cdev_decl(scsibus);
104 
105 bdev_decl(wd);
106 cdev_decl(wd);
107 
108 cdev_decl(sabtty);
109 
110 cdev_decl(pcons);
111 cdev_decl(vcons);
112 cdev_decl(vcctty);
113 cdev_decl(sbbc);
114 
115 cdev_decl(vldcp);
116 
117 cdev_decl(com);
118 
119 cdev_decl(mtty);
120 cdev_decl(mbpp);
121 cdev_decl(stty);
122 cdev_decl(sbpp);
123 
124 /* open, close, write, ioctl */
125 #define	cdev_bpp_init(c,n) { \
126 	dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
127 	dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
128 	0, seltrue, (dev_type_mmap((*))) enodev, 0, 0, seltrue_kqfilter }
129 
130 cdev_decl(bpp);
131