Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nubus.h
Go to the documentation of this file.
1 /*
2  nubus.h: various definitions and prototypes for NuBus drivers to use.
3 
4  Originally written by Alan Cox.
5 
6  Hacked to death by C. Scott Ananian and David Huggins-Daines.
7 
8  Some of the constants in here are from the corresponding
9  NetBSD/OpenBSD header file, by Allen Briggs. We figured out the
10  rest of them on our own. */
11 
12 #ifndef _UAPILINUX_NUBUS_H
13 #define _UAPILINUX_NUBUS_H
14 
15 #include <linux/types.h>
16 
18  NUBUS_CAT_BOARD = 0x0001,
22  NUBUS_CAT_FONT = 0x0009,
23  NUBUS_CAT_CPU = 0x000A,
24  /* For lack of a better name */
26 };
27 
31 };
32 
35 };
36 
38  NUBUS_TYPE_68020 = 0x0003,
39  NUBUS_TYPE_68030 = 0x0004,
41 };
42 
43 /* Known <Cat,Type,SW,HW> tuples: (according to TattleTech and Slots)
44  * 68030 motherboards: <10,4,0,24>
45  * 68040 motherboards: <10,5,0,24>
46  * DuoDock Plus: <32,1,1,2>
47  *
48  * Toby Frame Buffer card: <3,1,1,1>
49  * RBV built-in video (IIci): <3,1,1,24>
50  * Valkyrie built-in video (Q630): <3,1,1,46>
51  * Macintosh Display Card: <3,1,1,25>
52  * Sonora built-in video (P460): <3,1,1,34>
53  * Jet framebuffer (DuoDock Plus): <3,1,1,41>
54  *
55  * SONIC comm-slot/on-board and DuoDock Ethernet: <4,1,1,272>
56  * SONIC LC-PDS Ethernet (Dayna, but like Apple 16-bit, sort of): <4,1,1,271>
57  * Apple SONIC LC-PDS Ethernet ("Apple Ethernet LC Twisted-Pair Card"): <4,1,0,281>
58  * Sonic Systems Ethernet A-Series Card: <4,1,268,256>
59  * Asante MacCon NuBus-A: <4,1,260,256> (alpha-1.0,1.1 revision)
60  * ROM on the above card: <2,1,0,0>
61  * Cabletron ethernet card: <4,1,1,265>
62  * Farallon ethernet card: <4,1,268,256> (identical to Sonic Systems card)
63  * Kinetics EtherPort IIN: <4,1,259,262>
64  * API Engineering EtherRun_LCa PDS enet card: <4,1,282,256>
65  *
66  * Add your devices to the list! You can obtain the "Slots" utility
67  * from Apple's FTP site at:
68  * ftp://dev.apple.com/devworld/Tool_Chest/Devices_-_Hardware/NuBus_Slot_Manager/
69  *
70  * Alternately, TattleTech can be found at any Info-Mac mirror site.
71  * or from its distribution site: ftp://ftp.decismkr.com/dms
72  */
73 
74 /* DrSW: Uniquely identifies the software interface to a board. This
75  is usually the one you want to look at when writing a driver. It's
76  not as useful as you think, though, because as we should know by
77  now (duh), "Apple Compatible" can mean a lot of things... */
78 
79 /* Add known DrSW values here */
80 enum nubus_drsw {
81  /* NUBUS_CAT_DISPLAY */
82  NUBUS_DRSW_APPLE = 0x0001,
83  NUBUS_DRSW_APPLE_HIRES = 0x0013, /* MacII HiRes card driver */
84 
85  /* NUBUS_CAT_NETWORK */
86  NUBUS_DRSW_3COM = 0x0000,
92  NUBUS_DRSW_DAYNA = 0x010b,
96  NUBUS_DRSW_FOCUS = 0x011a,
97  NUBUS_DRSW_ASANTE_CS = 0x011d, /* use asante SMC9194 driver */
99 
100  /* NUBUS_CAT_CPU */
101  NUBUS_DRSW_NONE = 0x0000,
102 };
103 
104 /* DrHW: Uniquely identifies the hardware interface to a board (or at
105  least, it should... some video cards are known to incorrectly
106  identify themselves as Toby cards) */
107 
108 /* Add known DrHW values here */
110  /* NUBUS_CAT_DISPLAY */
111  NUBUS_DRHW_APPLE_TFB = 0x0001, /* Toby frame buffer card */
112  NUBUS_DRHW_APPLE_WVC = 0x0006, /* Apple Workstation Video Card */
113  NUBUS_DRHW_SIGMA_CLRMAX = 0x0007, /* Sigma Design ColorMax */
114  NUBUS_DRHW_APPLE_SE30 = 0x0009, /* Apple SE/30 video */
115  NUBUS_DRHW_APPLE_HRVC = 0x0013, /* Mac II High-Res Video Card */
116  NUBUS_DRHW_APPLE_PVC = 0x0017, /* Mac II Portrait Video Card */
117  NUBUS_DRHW_APPLE_RBV1 = 0x0018, /* IIci RBV video */
118  NUBUS_DRHW_APPLE_MDC = 0x0019, /* Macintosh Display Card */
119  NUBUS_DRHW_APPLE_SONORA = 0x0022, /* Sonora built-in video */
120  NUBUS_DRHW_APPLE_24AC = 0x002b, /* Mac 24AC Video Card */
122  NUBUS_DRHW_APPLE_JET = 0x0029, /* Jet framebuffer (DuoDock) */
123  NUBUS_DRHW_SMAC_GFX = 0x0105, /* SuperMac GFX */
124  NUBUS_DRHW_RASTER_CB264 = 0x013B, /* RasterOps ColorBoard 264 */
125  NUBUS_DRHW_MICRON_XCEED = 0x0146, /* Micron Exceed color */
126  NUBUS_DRHW_RDIUS_GSC = 0x0153, /* Radius GS/C */
127  NUBUS_DRHW_SMAC_SPEC8 = 0x017B, /* SuperMac Spectrum/8 */
128  NUBUS_DRHW_SMAC_SPEC24 = 0x017C, /* SuperMac Spectrum/24 */
129  NUBUS_DRHW_RASTER_CB364 = 0x026F, /* RasterOps ColorBoard 364 */
130  NUBUS_DRHW_RDIUS_DCGX = 0x027C, /* Radius DirectColor/GX */
131  NUBUS_DRHW_RDIUS_PC8 = 0x0291, /* Radius PrecisionColor 8 */
132  NUBUS_DRHW_LAPIS_PCS8 = 0x0292, /* Lapis ProColorServer 8 */
133  NUBUS_DRHW_RASTER_24XLI = 0x02A0, /* RasterOps 8/24 XLi */
134  NUBUS_DRHW_RASTER_PBPGT = 0x02A5, /* RasterOps PaintBoard Prism GT */
135  NUBUS_DRHW_EMACH_FSX = 0x02AE, /* E-Machines Futura SX */
136  NUBUS_DRHW_RASTER_24XLTV = 0x02B7, /* RasterOps 24XLTV */
137  NUBUS_DRHW_SMAC_THUND24 = 0x02CB, /* SuperMac Thunder/24 */
138  NUBUS_DRHW_SMAC_THUNDLGHT = 0x03D9, /* SuperMac ThunderLight */
139  NUBUS_DRHW_RDIUS_PC24XP = 0x0406, /* Radius PrecisionColor 24Xp */
140  NUBUS_DRHW_RDIUS_PC24X = 0x040A, /* Radius PrecisionColor 24X */
141  NUBUS_DRHW_RDIUS_PC8XJ = 0x040B, /* Radius PrecisionColor 8XJ */
142 
143  /* NUBUS_CAT_NETWORK */
155 };
156 
157 /* Resource IDs: These are the identifiers for the various weird and
158  wonderful tidbits of information that may or may not reside in the
159  NuBus ROM directory. */
176 };
177 
178 /* Category-specific resources. */
187 
188  /* Not sure why Apple put these next two in here */
191 };
192 
193 /* Fields within the vendor info directory */
200 };
201 
204 };
205 
209 };
210 
219 };
220 
221 struct nubus_dir
222 {
223  unsigned char *base;
224  unsigned char *ptr;
225  int done;
226  int mask;
227 };
228 
230 {
231  unsigned char *base;
232  unsigned char type;
233  __u32 data; /* Actually 24bits used */
234  int mask;
235 };
236 
237 
238 /* We'd like to get rid of this eventually. Only daynaport.c uses it now. */
239 static inline void *nubus_slot_addr(int slot)
240 {
241  return (void *)(0xF0000000|(slot<<24));
242 }
243 
244 #endif /* _UAPILINUX_NUBUS_H */