Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003   nubus.h: various definitions and prototypes for NuBus drivers to use.
0004 
0005   Originally written by Alan Cox.
0006 
0007   Hacked to death by C. Scott Ananian and David Huggins-Daines.
0008   
0009   Some of the constants in here are from the corresponding
0010   NetBSD/OpenBSD header file, by Allen Briggs.  We figured out the
0011   rest of them on our own. */
0012 
0013 #ifndef _UAPILINUX_NUBUS_H
0014 #define _UAPILINUX_NUBUS_H
0015 
0016 #include <linux/types.h>
0017 
0018 enum nubus_category {
0019     NUBUS_CAT_BOARD          = 0x0001,
0020     NUBUS_CAT_DISPLAY        = 0x0003,
0021     NUBUS_CAT_NETWORK        = 0x0004,
0022     NUBUS_CAT_COMMUNICATIONS = 0x0006,
0023     NUBUS_CAT_FONT           = 0x0009,
0024     NUBUS_CAT_CPU            = 0x000A,
0025     /* For lack of a better name */
0026     NUBUS_CAT_DUODOCK        = 0x0020
0027 };
0028 
0029 enum nubus_type_network {
0030     NUBUS_TYPE_ETHERNET      = 0x0001,
0031     NUBUS_TYPE_RS232         = 0x0002
0032 };
0033 
0034 enum nubus_type_display {
0035     NUBUS_TYPE_VIDEO         = 0x0001
0036 };
0037 
0038 enum nubus_type_cpu {
0039     NUBUS_TYPE_68020         = 0x0003,
0040     NUBUS_TYPE_68030         = 0x0004,
0041     NUBUS_TYPE_68040         = 0x0005
0042 };
0043 
0044 /* Known <Cat,Type,SW,HW> tuples: (according to TattleTech and Slots)
0045  *  68030 motherboards: <10,4,0,24>
0046  *  68040 motherboards: <10,5,0,24>
0047  *  DuoDock Plus: <32,1,1,2>
0048  *
0049  *  Toby Frame Buffer card: <3,1,1,1>
0050  *  RBV built-in video (IIci): <3,1,1,24>
0051  *  Valkyrie built-in video (Q630): <3,1,1,46>
0052  *  Macintosh Display Card: <3,1,1,25>
0053  *  Sonora built-in video (P460): <3,1,1,34>
0054  *  Jet framebuffer (DuoDock Plus): <3,1,1,41>
0055  *
0056  *  SONIC comm-slot/on-board and DuoDock Ethernet: <4,1,1,272>
0057  *  SONIC LC-PDS Ethernet (Dayna, but like Apple 16-bit, sort of): <4,1,1,271>
0058  *  Apple SONIC LC-PDS Ethernet ("Apple Ethernet LC Twisted-Pair Card"): <4,1,0,281>
0059  *  Sonic Systems Ethernet A-Series Card: <4,1,268,256>
0060  *  Asante MacCon NuBus-A: <4,1,260,256> (alpha-1.0,1.1 revision)
0061  *   ROM on the above card: <2,1,0,0>
0062  *  Cabletron ethernet card: <4,1,1,265>
0063  *  Farallon ethernet card: <4,1,268,256> (identical to Sonic Systems card)
0064  *  Kinetics EtherPort IIN: <4,1,259,262>
0065  *  API Engineering EtherRun_LCa PDS enet card: <4,1,282,256>
0066  *
0067  *  Add your devices to the list!  You can obtain the "Slots" utility
0068  *  from Apple's FTP site at:
0069  *  ftp://dev.apple.com/devworld/Tool_Chest/Devices_-_Hardware/NuBus_Slot_Manager/
0070  *
0071  *  Alternately, TattleTech can be found at any Info-Mac mirror site.  
0072  *  or from its distribution site: ftp://ftp.decismkr.com/dms
0073  */
0074 
0075 /* DrSW: Uniquely identifies the software interface to a board.  This
0076    is usually the one you want to look at when writing a driver.  It's
0077    not as useful as you think, though, because as we should know by
0078    now (duh), "Apple Compatible" can mean a lot of things... */
0079 
0080 /* Add known DrSW values here */
0081 enum nubus_drsw {
0082     /* NUBUS_CAT_DISPLAY */
0083     NUBUS_DRSW_APPLE        = 0x0001,
0084     NUBUS_DRSW_APPLE_HIRES  = 0x0013, /* MacII HiRes card driver */
0085     
0086     /* NUBUS_CAT_NETWORK */
0087     NUBUS_DRSW_3COM         = 0x0000,
0088     NUBUS_DRSW_CABLETRON    = 0x0001,
0089     NUBUS_DRSW_SONIC_LC     = 0x0001,
0090     NUBUS_DRSW_KINETICS     = 0x0103,
0091     NUBUS_DRSW_ASANTE       = 0x0104,
0092     NUBUS_DRSW_TECHWORKS    = 0x0109,
0093     NUBUS_DRSW_DAYNA        = 0x010b,
0094     NUBUS_DRSW_FARALLON     = 0x010c,
0095     NUBUS_DRSW_APPLE_SN     = 0x010f,
0096     NUBUS_DRSW_DAYNA2       = 0x0115,
0097     NUBUS_DRSW_FOCUS        = 0x011a,
0098     NUBUS_DRSW_ASANTE_CS    = 0x011d, /* use asante SMC9194 driver */
0099     NUBUS_DRSW_DAYNA_LC     = 0x011e,
0100 
0101     /* NUBUS_CAT_CPU */
0102     NUBUS_DRSW_NONE         = 0x0000,
0103 };
0104 
0105 /* DrHW: Uniquely identifies the hardware interface to a board (or at
0106    least, it should...  some video cards are known to incorrectly
0107    identify themselves as Toby cards) */
0108 
0109 /* Add known DrHW values here */
0110 enum nubus_drhw {
0111     /* NUBUS_CAT_DISPLAY */
0112     NUBUS_DRHW_APPLE_TFB      = 0x0001, /* Toby frame buffer card */
0113     NUBUS_DRHW_APPLE_WVC      = 0x0006, /* Apple Workstation Video Card */
0114     NUBUS_DRHW_SIGMA_CLRMAX   = 0x0007, /* Sigma Design ColorMax */
0115     NUBUS_DRHW_APPLE_SE30     = 0x0009, /* Apple SE/30 video */
0116     NUBUS_DRHW_APPLE_HRVC     = 0x0013, /* Mac II High-Res Video Card */
0117     NUBUS_DRHW_APPLE_MVC      = 0x0014, /* Mac II Monochrome Video Card */
0118     NUBUS_DRHW_APPLE_PVC      = 0x0017, /* Mac II Portrait Video Card */
0119     NUBUS_DRHW_APPLE_RBV1     = 0x0018, /* IIci RBV video */
0120     NUBUS_DRHW_APPLE_MDC      = 0x0019, /* Macintosh Display Card */
0121     NUBUS_DRHW_APPLE_VSC      = 0x0020, /* Duo MiniDock ViSC framebuffer */
0122     NUBUS_DRHW_APPLE_SONORA   = 0x0022, /* Sonora built-in video */
0123     NUBUS_DRHW_APPLE_JET      = 0x0029, /* Jet framebuffer (DuoDock) */
0124     NUBUS_DRHW_APPLE_24AC     = 0x002b, /* Mac 24AC Video Card */
0125     NUBUS_DRHW_APPLE_VALKYRIE = 0x002e,
0126     NUBUS_DRHW_SMAC_GFX       = 0x0105, /* SuperMac GFX */
0127     NUBUS_DRHW_RASTER_CB264   = 0x013B, /* RasterOps ColorBoard 264 */
0128     NUBUS_DRHW_MICRON_XCEED   = 0x0146, /* Micron Exceed color */
0129     NUBUS_DRHW_RDIUS_GSC      = 0x0153, /* Radius GS/C */
0130     NUBUS_DRHW_SMAC_SPEC8     = 0x017B, /* SuperMac Spectrum/8 */
0131     NUBUS_DRHW_SMAC_SPEC24    = 0x017C, /* SuperMac Spectrum/24 */
0132     NUBUS_DRHW_RASTER_CB364   = 0x026F, /* RasterOps ColorBoard 364 */
0133     NUBUS_DRHW_RDIUS_DCGX     = 0x027C, /* Radius DirectColor/GX */
0134     NUBUS_DRHW_RDIUS_PC8      = 0x0291, /* Radius PrecisionColor 8 */
0135     NUBUS_DRHW_LAPIS_PCS8     = 0x0292, /* Lapis ProColorServer 8 */
0136     NUBUS_DRHW_RASTER_24XLI   = 0x02A0, /* RasterOps 8/24 XLi */
0137     NUBUS_DRHW_RASTER_PBPGT   = 0x02A5, /* RasterOps PaintBoard Prism GT */
0138     NUBUS_DRHW_EMACH_FSX      = 0x02AE, /* E-Machines Futura SX */
0139     NUBUS_DRHW_RASTER_24XLTV  = 0x02B7, /* RasterOps 24XLTV */
0140     NUBUS_DRHW_SMAC_THUND24   = 0x02CB, /* SuperMac Thunder/24 */
0141     NUBUS_DRHW_SMAC_THUNDLGHT = 0x03D9, /* SuperMac ThunderLight */
0142     NUBUS_DRHW_RDIUS_PC24XP   = 0x0406, /* Radius PrecisionColor 24Xp */
0143     NUBUS_DRHW_RDIUS_PC24X    = 0x040A, /* Radius PrecisionColor 24X */
0144     NUBUS_DRHW_RDIUS_PC8XJ    = 0x040B, /* Radius PrecisionColor 8XJ */
0145     
0146     /* NUBUS_CAT_NETWORK */
0147     NUBUS_DRHW_INTERLAN       = 0x0100,
0148     NUBUS_DRHW_SMC9194        = 0x0101,
0149     NUBUS_DRHW_KINETICS       = 0x0106,
0150     NUBUS_DRHW_CABLETRON      = 0x0109,
0151     NUBUS_DRHW_ASANTE_LC      = 0x010f,
0152     NUBUS_DRHW_SONIC          = 0x0110,
0153     NUBUS_DRHW_TECHWORKS      = 0x0112,
0154     NUBUS_DRHW_APPLE_SONIC_NB = 0x0118,
0155     NUBUS_DRHW_APPLE_SONIC_LC = 0x0119,
0156     NUBUS_DRHW_FOCUS          = 0x011c,
0157     NUBUS_DRHW_SONNET         = 0x011d,
0158 };
0159 
0160 /* Resource IDs: These are the identifiers for the various weird and
0161    wonderful tidbits of information that may or may not reside in the
0162    NuBus ROM directory. */
0163 enum nubus_res_id {
0164     NUBUS_RESID_TYPE         = 0x0001,
0165     NUBUS_RESID_NAME         = 0x0002,
0166     NUBUS_RESID_ICON         = 0x0003,
0167     NUBUS_RESID_DRVRDIR      = 0x0004,
0168     NUBUS_RESID_LOADREC      = 0x0005,
0169     NUBUS_RESID_BOOTREC      = 0x0006,
0170     NUBUS_RESID_FLAGS        = 0x0007,
0171     NUBUS_RESID_HWDEVID      = 0x0008,
0172     NUBUS_RESID_MINOR_BASEOS = 0x000a,
0173     NUBUS_RESID_MINOR_LENGTH = 0x000b,
0174     NUBUS_RESID_MAJOR_BASEOS = 0x000c,
0175     NUBUS_RESID_MAJOR_LENGTH = 0x000d,
0176     NUBUS_RESID_CICN         = 0x000f,
0177     NUBUS_RESID_ICL8         = 0x0010,
0178     NUBUS_RESID_ICL4         = 0x0011,
0179 };
0180 
0181 /* Category-specific resources. */
0182 enum nubus_board_res_id {
0183     NUBUS_RESID_BOARDID      = 0x0020,
0184     NUBUS_RESID_PRAMINITDATA = 0x0021,
0185     NUBUS_RESID_PRIMARYINIT  = 0x0022,
0186     NUBUS_RESID_TIMEOUTCONST = 0x0023,
0187     NUBUS_RESID_VENDORINFO   = 0x0024,
0188     NUBUS_RESID_BOARDFLAGS   = 0x0025,
0189     NUBUS_RESID_SECONDINIT   = 0x0026,
0190 
0191     /* Not sure why Apple put these next two in here */
0192     NUBUS_RESID_VIDNAMES     = 0x0041,
0193     NUBUS_RESID_VIDMODES     = 0x007e
0194 };
0195 
0196 /* Fields within the vendor info directory */
0197 enum nubus_vendor_res_id {
0198     NUBUS_RESID_VEND_ID     = 0x0001,
0199     NUBUS_RESID_VEND_SERIAL = 0x0002,
0200     NUBUS_RESID_VEND_REV    = 0x0003,
0201     NUBUS_RESID_VEND_PART   = 0x0004,
0202     NUBUS_RESID_VEND_DATE   = 0x0005
0203 };
0204 
0205 enum nubus_net_res_id {
0206     NUBUS_RESID_MAC_ADDRESS  = 0x0080
0207 };
0208 
0209 enum nubus_cpu_res_id {
0210     NUBUS_RESID_MEMINFO      = 0x0081,
0211     NUBUS_RESID_ROMINFO      = 0x0082
0212 };
0213 
0214 enum nubus_display_res_id {
0215     NUBUS_RESID_GAMMADIR    = 0x0040,
0216     NUBUS_RESID_FIRSTMODE   = 0x0080,
0217     NUBUS_RESID_SECONDMODE  = 0x0081,
0218     NUBUS_RESID_THIRDMODE   = 0x0082,
0219     NUBUS_RESID_FOURTHMODE  = 0x0083,
0220     NUBUS_RESID_FIFTHMODE   = 0x0084,
0221     NUBUS_RESID_SIXTHMODE   = 0x0085
0222 };
0223 
0224 #endif /* _UAPILINUX_NUBUS_H */