1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun nubus.h: various definitions and prototypes for NuBus drivers to use. 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun Originally written by Alan Cox. 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun Hacked to death by C. Scott Ananian and David Huggins-Daines. 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun Some of the constants in here are from the corresponding 10*4882a593Smuzhiyun NetBSD/OpenBSD header file, by Allen Briggs. We figured out the 11*4882a593Smuzhiyun rest of them on our own. */ 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #ifndef _UAPILINUX_NUBUS_H 14*4882a593Smuzhiyun #define _UAPILINUX_NUBUS_H 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun #include <linux/types.h> 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun enum nubus_category { 19*4882a593Smuzhiyun NUBUS_CAT_BOARD = 0x0001, 20*4882a593Smuzhiyun NUBUS_CAT_DISPLAY = 0x0003, 21*4882a593Smuzhiyun NUBUS_CAT_NETWORK = 0x0004, 22*4882a593Smuzhiyun NUBUS_CAT_COMMUNICATIONS = 0x0006, 23*4882a593Smuzhiyun NUBUS_CAT_FONT = 0x0009, 24*4882a593Smuzhiyun NUBUS_CAT_CPU = 0x000A, 25*4882a593Smuzhiyun /* For lack of a better name */ 26*4882a593Smuzhiyun NUBUS_CAT_DUODOCK = 0x0020 27*4882a593Smuzhiyun }; 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun enum nubus_type_network { 30*4882a593Smuzhiyun NUBUS_TYPE_ETHERNET = 0x0001, 31*4882a593Smuzhiyun NUBUS_TYPE_RS232 = 0x0002 32*4882a593Smuzhiyun }; 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun enum nubus_type_display { 35*4882a593Smuzhiyun NUBUS_TYPE_VIDEO = 0x0001 36*4882a593Smuzhiyun }; 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun enum nubus_type_cpu { 39*4882a593Smuzhiyun NUBUS_TYPE_68020 = 0x0003, 40*4882a593Smuzhiyun NUBUS_TYPE_68030 = 0x0004, 41*4882a593Smuzhiyun NUBUS_TYPE_68040 = 0x0005 42*4882a593Smuzhiyun }; 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun /* Known <Cat,Type,SW,HW> tuples: (according to TattleTech and Slots) 45*4882a593Smuzhiyun * 68030 motherboards: <10,4,0,24> 46*4882a593Smuzhiyun * 68040 motherboards: <10,5,0,24> 47*4882a593Smuzhiyun * DuoDock Plus: <32,1,1,2> 48*4882a593Smuzhiyun * 49*4882a593Smuzhiyun * Toby Frame Buffer card: <3,1,1,1> 50*4882a593Smuzhiyun * RBV built-in video (IIci): <3,1,1,24> 51*4882a593Smuzhiyun * Valkyrie built-in video (Q630): <3,1,1,46> 52*4882a593Smuzhiyun * Macintosh Display Card: <3,1,1,25> 53*4882a593Smuzhiyun * Sonora built-in video (P460): <3,1,1,34> 54*4882a593Smuzhiyun * Jet framebuffer (DuoDock Plus): <3,1,1,41> 55*4882a593Smuzhiyun * 56*4882a593Smuzhiyun * SONIC comm-slot/on-board and DuoDock Ethernet: <4,1,1,272> 57*4882a593Smuzhiyun * SONIC LC-PDS Ethernet (Dayna, but like Apple 16-bit, sort of): <4,1,1,271> 58*4882a593Smuzhiyun * Apple SONIC LC-PDS Ethernet ("Apple Ethernet LC Twisted-Pair Card"): <4,1,0,281> 59*4882a593Smuzhiyun * Sonic Systems Ethernet A-Series Card: <4,1,268,256> 60*4882a593Smuzhiyun * Asante MacCon NuBus-A: <4,1,260,256> (alpha-1.0,1.1 revision) 61*4882a593Smuzhiyun * ROM on the above card: <2,1,0,0> 62*4882a593Smuzhiyun * Cabletron ethernet card: <4,1,1,265> 63*4882a593Smuzhiyun * Farallon ethernet card: <4,1,268,256> (identical to Sonic Systems card) 64*4882a593Smuzhiyun * Kinetics EtherPort IIN: <4,1,259,262> 65*4882a593Smuzhiyun * API Engineering EtherRun_LCa PDS enet card: <4,1,282,256> 66*4882a593Smuzhiyun * 67*4882a593Smuzhiyun * Add your devices to the list! You can obtain the "Slots" utility 68*4882a593Smuzhiyun * from Apple's FTP site at: 69*4882a593Smuzhiyun * ftp://dev.apple.com/devworld/Tool_Chest/Devices_-_Hardware/NuBus_Slot_Manager/ 70*4882a593Smuzhiyun * 71*4882a593Smuzhiyun * Alternately, TattleTech can be found at any Info-Mac mirror site. 72*4882a593Smuzhiyun * or from its distribution site: ftp://ftp.decismkr.com/dms 73*4882a593Smuzhiyun */ 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun /* DrSW: Uniquely identifies the software interface to a board. This 76*4882a593Smuzhiyun is usually the one you want to look at when writing a driver. It's 77*4882a593Smuzhiyun not as useful as you think, though, because as we should know by 78*4882a593Smuzhiyun now (duh), "Apple Compatible" can mean a lot of things... */ 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun /* Add known DrSW values here */ 81*4882a593Smuzhiyun enum nubus_drsw { 82*4882a593Smuzhiyun /* NUBUS_CAT_DISPLAY */ 83*4882a593Smuzhiyun NUBUS_DRSW_APPLE = 0x0001, 84*4882a593Smuzhiyun NUBUS_DRSW_APPLE_HIRES = 0x0013, /* MacII HiRes card driver */ 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun /* NUBUS_CAT_NETWORK */ 87*4882a593Smuzhiyun NUBUS_DRSW_3COM = 0x0000, 88*4882a593Smuzhiyun NUBUS_DRSW_CABLETRON = 0x0001, 89*4882a593Smuzhiyun NUBUS_DRSW_SONIC_LC = 0x0001, 90*4882a593Smuzhiyun NUBUS_DRSW_KINETICS = 0x0103, 91*4882a593Smuzhiyun NUBUS_DRSW_ASANTE = 0x0104, 92*4882a593Smuzhiyun NUBUS_DRSW_TECHWORKS = 0x0109, 93*4882a593Smuzhiyun NUBUS_DRSW_DAYNA = 0x010b, 94*4882a593Smuzhiyun NUBUS_DRSW_FARALLON = 0x010c, 95*4882a593Smuzhiyun NUBUS_DRSW_APPLE_SN = 0x010f, 96*4882a593Smuzhiyun NUBUS_DRSW_DAYNA2 = 0x0115, 97*4882a593Smuzhiyun NUBUS_DRSW_FOCUS = 0x011a, 98*4882a593Smuzhiyun NUBUS_DRSW_ASANTE_CS = 0x011d, /* use asante SMC9194 driver */ 99*4882a593Smuzhiyun NUBUS_DRSW_DAYNA_LC = 0x011e, 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun /* NUBUS_CAT_CPU */ 102*4882a593Smuzhiyun NUBUS_DRSW_NONE = 0x0000, 103*4882a593Smuzhiyun }; 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun /* DrHW: Uniquely identifies the hardware interface to a board (or at 106*4882a593Smuzhiyun least, it should... some video cards are known to incorrectly 107*4882a593Smuzhiyun identify themselves as Toby cards) */ 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun /* Add known DrHW values here */ 110*4882a593Smuzhiyun enum nubus_drhw { 111*4882a593Smuzhiyun /* NUBUS_CAT_DISPLAY */ 112*4882a593Smuzhiyun NUBUS_DRHW_APPLE_TFB = 0x0001, /* Toby frame buffer card */ 113*4882a593Smuzhiyun NUBUS_DRHW_APPLE_WVC = 0x0006, /* Apple Workstation Video Card */ 114*4882a593Smuzhiyun NUBUS_DRHW_SIGMA_CLRMAX = 0x0007, /* Sigma Design ColorMax */ 115*4882a593Smuzhiyun NUBUS_DRHW_APPLE_SE30 = 0x0009, /* Apple SE/30 video */ 116*4882a593Smuzhiyun NUBUS_DRHW_APPLE_HRVC = 0x0013, /* Mac II High-Res Video Card */ 117*4882a593Smuzhiyun NUBUS_DRHW_APPLE_MVC = 0x0014, /* Mac II Monochrome Video Card */ 118*4882a593Smuzhiyun NUBUS_DRHW_APPLE_PVC = 0x0017, /* Mac II Portrait Video Card */ 119*4882a593Smuzhiyun NUBUS_DRHW_APPLE_RBV1 = 0x0018, /* IIci RBV video */ 120*4882a593Smuzhiyun NUBUS_DRHW_APPLE_MDC = 0x0019, /* Macintosh Display Card */ 121*4882a593Smuzhiyun NUBUS_DRHW_APPLE_VSC = 0x0020, /* Duo MiniDock ViSC framebuffer */ 122*4882a593Smuzhiyun NUBUS_DRHW_APPLE_SONORA = 0x0022, /* Sonora built-in video */ 123*4882a593Smuzhiyun NUBUS_DRHW_APPLE_JET = 0x0029, /* Jet framebuffer (DuoDock) */ 124*4882a593Smuzhiyun NUBUS_DRHW_APPLE_24AC = 0x002b, /* Mac 24AC Video Card */ 125*4882a593Smuzhiyun NUBUS_DRHW_APPLE_VALKYRIE = 0x002e, 126*4882a593Smuzhiyun NUBUS_DRHW_SMAC_GFX = 0x0105, /* SuperMac GFX */ 127*4882a593Smuzhiyun NUBUS_DRHW_RASTER_CB264 = 0x013B, /* RasterOps ColorBoard 264 */ 128*4882a593Smuzhiyun NUBUS_DRHW_MICRON_XCEED = 0x0146, /* Micron Exceed color */ 129*4882a593Smuzhiyun NUBUS_DRHW_RDIUS_GSC = 0x0153, /* Radius GS/C */ 130*4882a593Smuzhiyun NUBUS_DRHW_SMAC_SPEC8 = 0x017B, /* SuperMac Spectrum/8 */ 131*4882a593Smuzhiyun NUBUS_DRHW_SMAC_SPEC24 = 0x017C, /* SuperMac Spectrum/24 */ 132*4882a593Smuzhiyun NUBUS_DRHW_RASTER_CB364 = 0x026F, /* RasterOps ColorBoard 364 */ 133*4882a593Smuzhiyun NUBUS_DRHW_RDIUS_DCGX = 0x027C, /* Radius DirectColor/GX */ 134*4882a593Smuzhiyun NUBUS_DRHW_RDIUS_PC8 = 0x0291, /* Radius PrecisionColor 8 */ 135*4882a593Smuzhiyun NUBUS_DRHW_LAPIS_PCS8 = 0x0292, /* Lapis ProColorServer 8 */ 136*4882a593Smuzhiyun NUBUS_DRHW_RASTER_24XLI = 0x02A0, /* RasterOps 8/24 XLi */ 137*4882a593Smuzhiyun NUBUS_DRHW_RASTER_PBPGT = 0x02A5, /* RasterOps PaintBoard Prism GT */ 138*4882a593Smuzhiyun NUBUS_DRHW_EMACH_FSX = 0x02AE, /* E-Machines Futura SX */ 139*4882a593Smuzhiyun NUBUS_DRHW_RASTER_24XLTV = 0x02B7, /* RasterOps 24XLTV */ 140*4882a593Smuzhiyun NUBUS_DRHW_SMAC_THUND24 = 0x02CB, /* SuperMac Thunder/24 */ 141*4882a593Smuzhiyun NUBUS_DRHW_SMAC_THUNDLGHT = 0x03D9, /* SuperMac ThunderLight */ 142*4882a593Smuzhiyun NUBUS_DRHW_RDIUS_PC24XP = 0x0406, /* Radius PrecisionColor 24Xp */ 143*4882a593Smuzhiyun NUBUS_DRHW_RDIUS_PC24X = 0x040A, /* Radius PrecisionColor 24X */ 144*4882a593Smuzhiyun NUBUS_DRHW_RDIUS_PC8XJ = 0x040B, /* Radius PrecisionColor 8XJ */ 145*4882a593Smuzhiyun 146*4882a593Smuzhiyun /* NUBUS_CAT_NETWORK */ 147*4882a593Smuzhiyun NUBUS_DRHW_INTERLAN = 0x0100, 148*4882a593Smuzhiyun NUBUS_DRHW_SMC9194 = 0x0101, 149*4882a593Smuzhiyun NUBUS_DRHW_KINETICS = 0x0106, 150*4882a593Smuzhiyun NUBUS_DRHW_CABLETRON = 0x0109, 151*4882a593Smuzhiyun NUBUS_DRHW_ASANTE_LC = 0x010f, 152*4882a593Smuzhiyun NUBUS_DRHW_SONIC = 0x0110, 153*4882a593Smuzhiyun NUBUS_DRHW_TECHWORKS = 0x0112, 154*4882a593Smuzhiyun NUBUS_DRHW_APPLE_SONIC_NB = 0x0118, 155*4882a593Smuzhiyun NUBUS_DRHW_APPLE_SONIC_LC = 0x0119, 156*4882a593Smuzhiyun NUBUS_DRHW_FOCUS = 0x011c, 157*4882a593Smuzhiyun NUBUS_DRHW_SONNET = 0x011d, 158*4882a593Smuzhiyun }; 159*4882a593Smuzhiyun 160*4882a593Smuzhiyun /* Resource IDs: These are the identifiers for the various weird and 161*4882a593Smuzhiyun wonderful tidbits of information that may or may not reside in the 162*4882a593Smuzhiyun NuBus ROM directory. */ 163*4882a593Smuzhiyun enum nubus_res_id { 164*4882a593Smuzhiyun NUBUS_RESID_TYPE = 0x0001, 165*4882a593Smuzhiyun NUBUS_RESID_NAME = 0x0002, 166*4882a593Smuzhiyun NUBUS_RESID_ICON = 0x0003, 167*4882a593Smuzhiyun NUBUS_RESID_DRVRDIR = 0x0004, 168*4882a593Smuzhiyun NUBUS_RESID_LOADREC = 0x0005, 169*4882a593Smuzhiyun NUBUS_RESID_BOOTREC = 0x0006, 170*4882a593Smuzhiyun NUBUS_RESID_FLAGS = 0x0007, 171*4882a593Smuzhiyun NUBUS_RESID_HWDEVID = 0x0008, 172*4882a593Smuzhiyun NUBUS_RESID_MINOR_BASEOS = 0x000a, 173*4882a593Smuzhiyun NUBUS_RESID_MINOR_LENGTH = 0x000b, 174*4882a593Smuzhiyun NUBUS_RESID_MAJOR_BASEOS = 0x000c, 175*4882a593Smuzhiyun NUBUS_RESID_MAJOR_LENGTH = 0x000d, 176*4882a593Smuzhiyun NUBUS_RESID_CICN = 0x000f, 177*4882a593Smuzhiyun NUBUS_RESID_ICL8 = 0x0010, 178*4882a593Smuzhiyun NUBUS_RESID_ICL4 = 0x0011, 179*4882a593Smuzhiyun }; 180*4882a593Smuzhiyun 181*4882a593Smuzhiyun /* Category-specific resources. */ 182*4882a593Smuzhiyun enum nubus_board_res_id { 183*4882a593Smuzhiyun NUBUS_RESID_BOARDID = 0x0020, 184*4882a593Smuzhiyun NUBUS_RESID_PRAMINITDATA = 0x0021, 185*4882a593Smuzhiyun NUBUS_RESID_PRIMARYINIT = 0x0022, 186*4882a593Smuzhiyun NUBUS_RESID_TIMEOUTCONST = 0x0023, 187*4882a593Smuzhiyun NUBUS_RESID_VENDORINFO = 0x0024, 188*4882a593Smuzhiyun NUBUS_RESID_BOARDFLAGS = 0x0025, 189*4882a593Smuzhiyun NUBUS_RESID_SECONDINIT = 0x0026, 190*4882a593Smuzhiyun 191*4882a593Smuzhiyun /* Not sure why Apple put these next two in here */ 192*4882a593Smuzhiyun NUBUS_RESID_VIDNAMES = 0x0041, 193*4882a593Smuzhiyun NUBUS_RESID_VIDMODES = 0x007e 194*4882a593Smuzhiyun }; 195*4882a593Smuzhiyun 196*4882a593Smuzhiyun /* Fields within the vendor info directory */ 197*4882a593Smuzhiyun enum nubus_vendor_res_id { 198*4882a593Smuzhiyun NUBUS_RESID_VEND_ID = 0x0001, 199*4882a593Smuzhiyun NUBUS_RESID_VEND_SERIAL = 0x0002, 200*4882a593Smuzhiyun NUBUS_RESID_VEND_REV = 0x0003, 201*4882a593Smuzhiyun NUBUS_RESID_VEND_PART = 0x0004, 202*4882a593Smuzhiyun NUBUS_RESID_VEND_DATE = 0x0005 203*4882a593Smuzhiyun }; 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun enum nubus_net_res_id { 206*4882a593Smuzhiyun NUBUS_RESID_MAC_ADDRESS = 0x0080 207*4882a593Smuzhiyun }; 208*4882a593Smuzhiyun 209*4882a593Smuzhiyun enum nubus_cpu_res_id { 210*4882a593Smuzhiyun NUBUS_RESID_MEMINFO = 0x0081, 211*4882a593Smuzhiyun NUBUS_RESID_ROMINFO = 0x0082 212*4882a593Smuzhiyun }; 213*4882a593Smuzhiyun 214*4882a593Smuzhiyun enum nubus_display_res_id { 215*4882a593Smuzhiyun NUBUS_RESID_GAMMADIR = 0x0040, 216*4882a593Smuzhiyun NUBUS_RESID_FIRSTMODE = 0x0080, 217*4882a593Smuzhiyun NUBUS_RESID_SECONDMODE = 0x0081, 218*4882a593Smuzhiyun NUBUS_RESID_THIRDMODE = 0x0082, 219*4882a593Smuzhiyun NUBUS_RESID_FOURTHMODE = 0x0083, 220*4882a593Smuzhiyun NUBUS_RESID_FIFTHMODE = 0x0084, 221*4882a593Smuzhiyun NUBUS_RESID_SIXTHMODE = 0x0085 222*4882a593Smuzhiyun }; 223*4882a593Smuzhiyun 224*4882a593Smuzhiyun #endif /* _UAPILINUX_NUBUS_H */ 225