1
2
3
4
5
6
7
8
9
10
11
12#ifndef _UAPILINUX_NUBUS_H
13#define _UAPILINUX_NUBUS_H
14
15#include <linux/types.h>
16
17enum nubus_category {
18 NUBUS_CAT_BOARD = 0x0001,
19 NUBUS_CAT_DISPLAY = 0x0003,
20 NUBUS_CAT_NETWORK = 0x0004,
21 NUBUS_CAT_COMMUNICATIONS = 0x0006,
22 NUBUS_CAT_FONT = 0x0009,
23 NUBUS_CAT_CPU = 0x000A,
24
25 NUBUS_CAT_DUODOCK = 0x0020
26};
27
28enum nubus_type_network {
29 NUBUS_TYPE_ETHERNET = 0x0001,
30 NUBUS_TYPE_RS232 = 0x0002
31};
32
33enum nubus_type_display {
34 NUBUS_TYPE_VIDEO = 0x0001
35};
36
37enum nubus_type_cpu {
38 NUBUS_TYPE_68020 = 0x0003,
39 NUBUS_TYPE_68030 = 0x0004,
40 NUBUS_TYPE_68040 = 0x0005
41};
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80enum nubus_drsw {
81
82 NUBUS_DRSW_APPLE = 0x0001,
83 NUBUS_DRSW_APPLE_HIRES = 0x0013,
84
85
86 NUBUS_DRSW_3COM = 0x0000,
87 NUBUS_DRSW_CABLETRON = 0x0001,
88 NUBUS_DRSW_SONIC_LC = 0x0001,
89 NUBUS_DRSW_KINETICS = 0x0103,
90 NUBUS_DRSW_ASANTE = 0x0104,
91 NUBUS_DRSW_TECHWORKS = 0x0109,
92 NUBUS_DRSW_DAYNA = 0x010b,
93 NUBUS_DRSW_FARALLON = 0x010c,
94 NUBUS_DRSW_APPLE_SN = 0x010f,
95 NUBUS_DRSW_DAYNA2 = 0x0115,
96 NUBUS_DRSW_FOCUS = 0x011a,
97 NUBUS_DRSW_ASANTE_CS = 0x011d,
98 NUBUS_DRSW_DAYNA_LC = 0x011e,
99
100
101 NUBUS_DRSW_NONE = 0x0000,
102};
103
104
105
106
107
108
109enum nubus_drhw {
110
111 NUBUS_DRHW_APPLE_TFB = 0x0001,
112 NUBUS_DRHW_APPLE_WVC = 0x0006,
113 NUBUS_DRHW_SIGMA_CLRMAX = 0x0007,
114 NUBUS_DRHW_APPLE_SE30 = 0x0009,
115 NUBUS_DRHW_APPLE_HRVC = 0x0013,
116 NUBUS_DRHW_APPLE_PVC = 0x0017,
117 NUBUS_DRHW_APPLE_RBV1 = 0x0018,
118 NUBUS_DRHW_APPLE_MDC = 0x0019,
119 NUBUS_DRHW_APPLE_SONORA = 0x0022,
120 NUBUS_DRHW_APPLE_24AC = 0x002b,
121 NUBUS_DRHW_APPLE_VALKYRIE = 0x002e,
122 NUBUS_DRHW_APPLE_JET = 0x0029,
123 NUBUS_DRHW_SMAC_GFX = 0x0105,
124 NUBUS_DRHW_RASTER_CB264 = 0x013B,
125 NUBUS_DRHW_MICRON_XCEED = 0x0146,
126 NUBUS_DRHW_RDIUS_GSC = 0x0153,
127 NUBUS_DRHW_SMAC_SPEC8 = 0x017B,
128 NUBUS_DRHW_SMAC_SPEC24 = 0x017C,
129 NUBUS_DRHW_RASTER_CB364 = 0x026F,
130 NUBUS_DRHW_RDIUS_DCGX = 0x027C,
131 NUBUS_DRHW_RDIUS_PC8 = 0x0291,
132 NUBUS_DRHW_LAPIS_PCS8 = 0x0292,
133 NUBUS_DRHW_RASTER_24XLI = 0x02A0,
134 NUBUS_DRHW_RASTER_PBPGT = 0x02A5,
135 NUBUS_DRHW_EMACH_FSX = 0x02AE,
136 NUBUS_DRHW_RASTER_24XLTV = 0x02B7,
137 NUBUS_DRHW_SMAC_THUND24 = 0x02CB,
138 NUBUS_DRHW_SMAC_THUNDLGHT = 0x03D9,
139 NUBUS_DRHW_RDIUS_PC24XP = 0x0406,
140 NUBUS_DRHW_RDIUS_PC24X = 0x040A,
141 NUBUS_DRHW_RDIUS_PC8XJ = 0x040B,
142
143
144 NUBUS_DRHW_INTERLAN = 0x0100,
145 NUBUS_DRHW_SMC9194 = 0x0101,
146 NUBUS_DRHW_KINETICS = 0x0106,
147 NUBUS_DRHW_CABLETRON = 0x0109,
148 NUBUS_DRHW_ASANTE_LC = 0x010f,
149 NUBUS_DRHW_SONIC = 0x0110,
150 NUBUS_DRHW_TECHWORKS = 0x0112,
151 NUBUS_DRHW_APPLE_SONIC_NB = 0x0118,
152 NUBUS_DRHW_APPLE_SONIC_LC = 0x0119,
153 NUBUS_DRHW_FOCUS = 0x011c,
154 NUBUS_DRHW_SONNET = 0x011d,
155};
156
157
158
159
160enum nubus_res_id {
161 NUBUS_RESID_TYPE = 0x0001,
162 NUBUS_RESID_NAME = 0x0002,
163 NUBUS_RESID_ICON = 0x0003,
164 NUBUS_RESID_DRVRDIR = 0x0004,
165 NUBUS_RESID_LOADREC = 0x0005,
166 NUBUS_RESID_BOOTREC = 0x0006,
167 NUBUS_RESID_FLAGS = 0x0007,
168 NUBUS_RESID_HWDEVID = 0x0008,
169 NUBUS_RESID_MINOR_BASEOS = 0x000a,
170 NUBUS_RESID_MINOR_LENGTH = 0x000b,
171 NUBUS_RESID_MAJOR_BASEOS = 0x000c,
172 NUBUS_RESID_MAJOR_LENGTH = 0x000d,
173 NUBUS_RESID_CICN = 0x000f,
174 NUBUS_RESID_ICL8 = 0x0010,
175 NUBUS_RESID_ICL4 = 0x0011,
176};
177
178
179enum nubus_board_res_id {
180 NUBUS_RESID_BOARDID = 0x0020,
181 NUBUS_RESID_PRAMINITDATA = 0x0021,
182 NUBUS_RESID_PRIMARYINIT = 0x0022,
183 NUBUS_RESID_TIMEOUTCONST = 0x0023,
184 NUBUS_RESID_VENDORINFO = 0x0024,
185 NUBUS_RESID_BOARDFLAGS = 0x0025,
186 NUBUS_RESID_SECONDINIT = 0x0026,
187
188
189 NUBUS_RESID_VIDNAMES = 0x0041,
190 NUBUS_RESID_VIDMODES = 0x007e
191};
192
193
194enum nubus_vendor_res_id {
195 NUBUS_RESID_VEND_ID = 0x0001,
196 NUBUS_RESID_VEND_SERIAL = 0x0002,
197 NUBUS_RESID_VEND_REV = 0x0003,
198 NUBUS_RESID_VEND_PART = 0x0004,
199 NUBUS_RESID_VEND_DATE = 0x0005
200};
201
202enum nubus_net_res_id {
203 NUBUS_RESID_MAC_ADDRESS = 0x0080
204};
205
206enum nubus_cpu_res_id {
207 NUBUS_RESID_MEMINFO = 0x0081,
208 NUBUS_RESID_ROMINFO = 0x0082
209};
210
211enum nubus_display_res_id {
212 NUBUS_RESID_GAMMADIR = 0x0040,
213 NUBUS_RESID_FIRSTMODE = 0x0080,
214 NUBUS_RESID_SECONDMODE = 0x0081,
215 NUBUS_RESID_THIRDMODE = 0x0082,
216 NUBUS_RESID_FOURTHMODE = 0x0083,
217 NUBUS_RESID_FIFTHMODE = 0x0084,
218 NUBUS_RESID_SIXTHMODE = 0x0085
219};
220
221struct nubus_dir
222{
223 unsigned char *base;
224 unsigned char *ptr;
225 int done;
226 int mask;
227};
228
229struct nubus_dirent
230{
231 unsigned char *base;
232 unsigned char type;
233 __u32 data;
234 int mask;
235};
236
237
238
239static inline void *nubus_slot_addr(int slot)
240{
241 return (void *)(0xF0000000|(slot<<24));
242}
243
244#endif
245