10252982aSshatty /* NM registers definitions and macros for access to */ 20252982aSshatty 3ee2288b7Sshatty //old: 40252982aSshatty /* PCI_config_space */ 50252982aSshatty #define NMCFG_DEVID 0x00 60252982aSshatty #define NMCFG_DEVCTRL 0x04 70252982aSshatty #define NMCFG_CLASS 0x08 80252982aSshatty #define NMCFG_HEADER 0x0c 90252982aSshatty #define NMCFG_NMBASE2 0x10 100252982aSshatty #define NMCFG_NMBASE1 0x14 110252982aSshatty #define NMCFG_NMBASE3 0x18 // >= MYST 120252982aSshatty #define NMCFG_SUBSYSIDR 0x2c // >= MYST 130252982aSshatty #define NMCFG_ROMBASE 0x30 140252982aSshatty #define NMCFG_CAP_PTR 0x34 // >= MIL2 150252982aSshatty #define NMCFG_INTCTRL 0x3c 160252982aSshatty #define NMCFG_OPTION 0x40 170252982aSshatty #define NMCFG_NM_INDEX 0x44 180252982aSshatty #define NMCFG_NM_DATA 0x48 190252982aSshatty #define NMCFG_SUBSYSIDW 0x4c // >= MYST 200252982aSshatty #define NMCFG_OPTION2 0x50 // >= G100 210252982aSshatty #define NMCFG_OPTION3 0x54 // >= G400 220252982aSshatty #define NMCFG_OPTION4 0x58 // >= G450 230252982aSshatty #define NMCFG_PM_IDENT 0xdc // >= G100 240252982aSshatty #define NMCFG_PM_CSR 0xe0 // >= G100 250252982aSshatty #define NMCFG_AGP_IDENT 0xf0 // >= MIL2 260252982aSshatty #define NMCFG_AGP_STS 0xf4 // >= MIL2 270252982aSshatty #define NMCFG_AGP_CMD 0xf8 // >= MIL2 28ee2288b7Sshatty //end old. 290252982aSshatty 300252982aSshatty /* neomagic ISA direct registers */ 310252982aSshatty /* VGA standard registers: */ 320252982aSshatty #define NMISA8_ATTRINDW 0x03c0 330252982aSshatty #define NMISA8_ATTRINDR 0x03c1 340252982aSshatty #define NMISA8_ATTRDATW 0x03c0 350252982aSshatty #define NMISA8_ATTRDATR 0x03c1 360252982aSshatty #define NMISA8_SEQIND 0x03c4 370252982aSshatty #define NMISA8_SEQDAT 0x03c5 380252982aSshatty #define NMISA16_SEQIND 0x03c4 390252982aSshatty #define NMISA8_CRTCIND 0x03d4 400252982aSshatty #define NMISA8_CRTCDAT 0x03d5 410252982aSshatty #define NMISA16_CRTCIND 0x03d4 420252982aSshatty #define NMISA8_GRPHIND 0x03ce 430252982aSshatty #define NMISA8_GRPHDAT 0x03cf 440252982aSshatty #define NMISA16_GRPHIND 0x03ce 450252982aSshatty 46ee2288b7Sshatty /* neomagic PCI direct registers */ 47ee2288b7Sshatty #define NM2PCI8_SEQIND 0x03c4 48ee2288b7Sshatty #define NM2PCI8_SEQDAT 0x03c5 49ee2288b7Sshatty #define NM2PCI16_SEQIND 0x03c4 50ee2288b7Sshatty #define NM2PCI8_GRPHIND 0x03ce 51ee2288b7Sshatty #define NM2PCI8_GRPHDAT 0x03cf 52ee2288b7Sshatty #define NM2PCI16_GRPHIND 0x03ce 53ee2288b7Sshatty 540252982aSshatty /* neomagic ISA GENERAL direct registers */ 550252982aSshatty /* VGA standard registers: */ 560252982aSshatty #define NMISA8_MISCW 0x03c2 570252982aSshatty #define NMISA8_MISCR 0x03cc 580252982aSshatty #define NMISA8_INSTAT1 0x03da 590252982aSshatty 600252982aSshatty /* neomagic ISA (DAC) COLOR direct registers (VGA palette RAM) */ 610252982aSshatty /* VGA standard registers: */ 620252982aSshatty #define NMISA8_PALMASK 0x03c6 630252982aSshatty #define NMISA8_PALINDR 0x03c7 640252982aSshatty #define NMISA8_PALINDW 0x03c8 650252982aSshatty #define NMISA8_PALDATA 0x03c9 660252982aSshatty 670252982aSshatty /* neomagic ISA CRTC indexed registers */ 680252982aSshatty /* VGA standard registers: */ 690252982aSshatty #define NMCRTCX_HTOTAL 0x00 700252982aSshatty #define NMCRTCX_HDISPE 0x01 710252982aSshatty #define NMCRTCX_HBLANKS 0x02 720252982aSshatty #define NMCRTCX_HBLANKE 0x03 730252982aSshatty #define NMCRTCX_HSYNCS 0x04 740252982aSshatty #define NMCRTCX_HSYNCE 0x05 750252982aSshatty #define NMCRTCX_VTOTAL 0x06 760252982aSshatty #define NMCRTCX_OVERFLOW 0x07 770252982aSshatty #define NMCRTCX_PRROWSCN 0x08 780252982aSshatty #define NMCRTCX_MAXSCLIN 0x09 790252982aSshatty #define NMCRTCX_VGACURCTRL 0x0a 800252982aSshatty #define NMCRTCX_FBSTADDH 0x0c 810252982aSshatty #define NMCRTCX_FBSTADDL 0x0d 820252982aSshatty #define NMCRTCX_VSYNCS 0x10 830252982aSshatty #define NMCRTCX_VSYNCE 0x11 840252982aSshatty #define NMCRTCX_VDISPE 0x12 850252982aSshatty #define NMCRTCX_PITCHL 0x13 860252982aSshatty #define NMCRTCX_VBLANKS 0x15 870252982aSshatty #define NMCRTCX_VBLANKE 0x16 880252982aSshatty #define NMCRTCX_MODECTL 0x17 890252982aSshatty #define NMCRTCX_LINECOMP 0x18 900252982aSshatty /* NeoMagic specific registers: */ 91*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x40 0x40 92*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x41 0x41 93*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x42 0x42 94*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x43 0x43 95*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x44 0x44 96*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x45 0x45 97*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x46 0x46 98*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x47 0x47 99*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x48 0x48 100*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x49 0x49 101*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x4a 0x4a 102*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x4b 0x4b 103*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x4c 0x4c 104*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x4d 0x4d 105*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x4e 0x4e 106*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x4f 0x4f 107*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x50 0x50 /* >= NM2090 */ 108*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x51 0x51 /* >= NM2090 */ 109*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x52 0x52 /* >= NM2090 */ 110*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x53 0x53 /* >= NM2090 */ 111*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x54 0x54 /* >= NM2090 */ 112*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x55 0x55 /* >= NM2090 */ 113*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x56 0x56 /* >= NM2090 */ 114*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x57 0x57 /* >= NM2090 */ 115*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x58 0x58 /* >= NM2090 */ 116*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x59 0x59 /* >= NM2090 */ 117*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x60 0x60 /* >= NM2097(?) */ 118*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x61 0x61 /* >= NM2097(?) */ 119*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x62 0x62 /* >= NM2097(?) */ 120*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x63 0x63 /* >= NM2097(?) */ 121*6274eb68SRudolf Cornelissen #define NMCRTCX_PANEL_0x64 0x64 /* >= NM2097(?) */ 1220252982aSshatty #define NMCRTCX_VEXT 0x70 /* >= NM2200 */ 1230252982aSshatty 1240252982aSshatty /* neomagic ISA SEQUENCER indexed registers */ 1250252982aSshatty /* VGA standard registers: */ 1260252982aSshatty #define NMSEQX_RESET 0x00 1270252982aSshatty #define NMSEQX_CLKMODE 0x01 12877354258SRudolf Cornelissen #define NMSEQX_MAPMASK 0x02 1290252982aSshatty #define NMSEQX_MEMMODE 0x04 130ee2288b7Sshatty /* NeoMagic BES registers: (> NM2070) (accessible via mapped I/O: >= NM2097) */ 131ee2288b7Sshatty #define NMSEQX_BESCTRL2 0x08 132ee2288b7Sshatty #define NMSEQX_0x09 0x09 //?? 133ee2288b7Sshatty #define NMSEQX_0x0a 0x0a //?? 134ee2288b7Sshatty #define NMSEQX_BUF2ORGL 0x0c 135ee2288b7Sshatty #define NMSEQX_BUF2ORGM 0x0d 136ee2288b7Sshatty #define NMSEQX_BUF2ORGH 0x0e 137ee2288b7Sshatty #define NMSEQX_VSCOORD1L 0x14 /* >= NM2200(?), so clipping done via buffer startadress instead */ 138ee2288b7Sshatty #define NMSEQX_VSCOORD2L 0x15 /* >= NM2200(?), so clipping done via buffer startadress instead */ 139ee2288b7Sshatty #define NMSEQX_VSCOORD21H 0x16 /* >= NM2200(?), so clipping done via buffer startadress instead */ 140ee2288b7Sshatty #define NMSEQX_HSCOORD1L 0x17 /* >= NM2200(?), so clipping done via buffer startadress instead */ 141ee2288b7Sshatty #define NMSEQX_HSCOORD2L 0x18 /* >= NM2200(?), so clipping done via buffer startadress instead */ 142ee2288b7Sshatty #define NMSEQX_HSCOORD21H 0x19 /* >= NM2200(?), so clipping done via buffer startadress instead */ 143ee2288b7Sshatty #define NMSEQX_BUF2PITCHL 0x1a 144ee2288b7Sshatty #define NMSEQX_BUF2PITCHH 0x1b 145ee2288b7Sshatty #define NMSEQX_0x1c 0x1c //?? 146ee2288b7Sshatty #define NMSEQX_0x1d 0x1d //?? 147ee2288b7Sshatty #define NMSEQX_0x1e 0x1e //?? 148ee2288b7Sshatty #define NMSEQX_0x1f 0x1f //?? 1490252982aSshatty 1500252982aSshatty /* neomagic ISA ATTRIBUTE indexed registers */ 1510252982aSshatty /* VGA standard registers: */ 1520252982aSshatty #define NMATBX_MODECTL 0x10 1530252982aSshatty #define NMATBX_OSCANCOLOR 0x11 1540252982aSshatty #define NMATBX_COLPLANE_EN 0x12 1550252982aSshatty #define NMATBX_HORPIXPAN 0x13 1560252982aSshatty #define NMATBX_COLSEL 0x14 15777354258SRudolf Cornelissen #define NMATBX_0x16 0x16 1580252982aSshatty 1590252982aSshatty /* neomagic ISA GRAPHICS indexed registers */ 1600252982aSshatty /* VGA standard registers: */ 1610252982aSshatty #define NMGRPHX_ENSETRESET 0x01 1620252982aSshatty #define NMGRPHX_DATAROTATE 0x03 1630252982aSshatty #define NMGRPHX_READMAPSEL 0x04 1640252982aSshatty #define NMGRPHX_MODE 0x05 1650252982aSshatty #define NMGRPHX_MISC 0x06 1660252982aSshatty #define NMGRPHX_BITMASK 0x08 1670252982aSshatty /* NeoMagic specific registers: */ 1680252982aSshatty #define NMGRPHX_GRPHXLOCK 0x09 1690252982aSshatty #define NMGRPHX_GENLOCK 0x0a 1700252982aSshatty #define NMGRPHX_FBSTADDE 0x0e 17177354258SRudolf Cornelissen #define NMGRPHX_CRTC_PITCHE 0x0f /* > NM2070 */ 17277354258SRudolf Cornelissen #define NMGRPHX_IFACECTRL1 0x10 17377354258SRudolf Cornelissen #define NMGRPHX_IFACECTRL2 0x11 17477354258SRudolf Cornelissen #define NMGRPHX_0x15 0x15 1750252982aSshatty #define NMGRPHX_PANELCTRL1 0x20 1760252982aSshatty #define NMGRPHX_PANELTYPE 0x21 1770252982aSshatty #define NMGRPHX_PANELCTRL2 0x25 1780252982aSshatty #define NMGRPHX_PANELVCENT1 0x28 1790252982aSshatty #define NMGRPHX_PANELVCENT2 0x29 1800252982aSshatty #define NMGRPHX_PANELVCENT3 0x2a 1810252982aSshatty #define NMGRPHX_PANELCTRL3 0x30 /* > NM2070 */ 1820252982aSshatty #define NMGRPHX_PANELVCENT4 0x32 /* > NM2070 */ 1830252982aSshatty #define NMGRPHX_PANELHCENT1 0x33 /* > NM2070 */ 1840252982aSshatty #define NMGRPHX_PANELHCENT2 0x34 /* > NM2070 */ 1850252982aSshatty #define NMGRPHX_PANELHCENT3 0x35 /* > NM2070 */ 1860252982aSshatty #define NMGRPHX_PANELHCENT4 0x36 /* >= NM2160 */ 1870252982aSshatty #define NMGRPHX_PANELVCENT5 0x37 /* >= NM2200 */ 1880252982aSshatty #define NMGRPHX_PANELHCENT5 0x38 /* >= NM2200 */ 1890252982aSshatty #define NMGRPHX_CURCTRL 0x82 1900252982aSshatty #define NMGRPHX_COLDEPTH 0x90 191b6e8c7e8SRudolf Cornelissen /* mem or core PLL register??? */ 192b6e8c7e8SRudolf Cornelissen #define NMGRPHX_SPEED 0x93 1930252982aSshatty /* (NeoMagic pixelPLL set C registers) */ 1940252982aSshatty #define NMGRPHX_PLLC_NH 0x8f /* >= NM2200 */ 195b6e8c7e8SRudolf Cornelissen #define NMGRPHX_PLLC_NL 0x9b 1960252982aSshatty #define NMGRPHX_PLLC_M 0x9f 197ee2288b7Sshatty /* NeoMagic BES registers: (> NM2070) (accessible via mapped I/O: >= NM2097) */ 198ee2288b7Sshatty #define NMGRPHX_BESCTRL1 0xb0 199ee2288b7Sshatty #define NMGRPHX_HDCOORD21H 0xb1 200ee2288b7Sshatty #define NMGRPHX_HDCOORD1L 0xb2 201ee2288b7Sshatty #define NMGRPHX_HDCOORD2L 0xb3 202ee2288b7Sshatty #define NMGRPHX_VDCOORD21H 0xb4 203ee2288b7Sshatty #define NMGRPHX_VDCOORD1L 0xb5 204ee2288b7Sshatty #define NMGRPHX_VDCOORD2L 0xb6 205ee2288b7Sshatty #define NMGRPHX_BUF1ORGH 0xb7 206ee2288b7Sshatty #define NMGRPHX_BUF1ORGM 0xb8 207ee2288b7Sshatty #define NMGRPHX_BUF1ORGL 0xb9 208ee2288b7Sshatty #define NMGRPHX_BUF1PITCHH 0xba 209ee2288b7Sshatty #define NMGRPHX_BUF1PITCHL 0xbb 210ee2288b7Sshatty #define NMGRPHX_0xbc 0xbc //?? 211ee2288b7Sshatty #define NMGRPHX_0xbd 0xbd //?? 212ee2288b7Sshatty #define NMGRPHX_0xbe 0xbe //?? 213ee2288b7Sshatty #define NMGRPHX_0xbf 0xbf //?? 214ee2288b7Sshatty #define NMGRPHX_XSCALEH 0xc0 215ee2288b7Sshatty #define NMGRPHX_XSCALEL 0xc1 216ee2288b7Sshatty #define NMGRPHX_YSCALEH 0xc2 217ee2288b7Sshatty #define NMGRPHX_YSCALEL 0xc3 218ee2288b7Sshatty #define NMGRPHX_BRIGHTNESS 0xc4 219ee2288b7Sshatty #define NMGRPHX_COLKEY_R 0xc5 220ee2288b7Sshatty #define NMGRPHX_COLKEY_G 0xc6 221ee2288b7Sshatty #define NMGRPHX_COLKEY_B 0xc7 2220252982aSshatty 2230252982aSshatty /* NeoMagic specific PCI cursor registers < NM2200 */ 2240252982aSshatty #define NMCR1_CURCTRL 0x0100 2250252982aSshatty #define NMCR1_CURX 0x0104 2260252982aSshatty #define NMCR1_CURY 0x0108 2270252982aSshatty #define NMCR1_CURBGCOLOR 0x010c 2280252982aSshatty #define NMCR1_CURFGCOLOR 0x0110 2290252982aSshatty #define NMCR1_CURADDRESS 0x0114 2300252982aSshatty /* NeoMagic specific PCI cursor registers >= NM2200 */ 2310252982aSshatty #define NMCR1_22CURCTRL 0x1000 2320252982aSshatty #define NMCR1_22CURX 0x1004 2330252982aSshatty #define NMCR1_22CURY 0x1008 2340252982aSshatty #define NMCR1_22CURBGCOLOR 0x100c 2350252982aSshatty #define NMCR1_22CURFGCOLOR 0x1010 2360252982aSshatty #define NMCR1_22CURADDRESS 0x1014 2370252982aSshatty 2383f618e4cSRudolf Cornelissen /* NeoMagic PCI acceleration registers */ 239d401e5beSRudolf Cornelissen /* all cards, but some registers only on 2090 and later */ 2403f618e4cSRudolf Cornelissen #define NMACC_STATUS 0x0000 24188aa1acdSRudolf Cornelissen #define NMACC_CONTROL 0x0004 242b350e3f1SRudolf Cornelissen #define NMACC_FGCOLOR 0x000c 243d401e5beSRudolf Cornelissen #define NMACC_2090_CLIPLT 0x0018 244d401e5beSRudolf Cornelissen #define NMACC_2090_CLIPRB 0x001c 2453f618e4cSRudolf Cornelissen #define NMACC_SRCSTARTOFF 0x0024 246d401e5beSRudolf Cornelissen #define NMACC_2090_DSTSTARTOFF 0x002c 247d401e5beSRudolf Cornelissen #define NMACC_2090_XYEXT 0x0030 248d401e5beSRudolf Cornelissen /* NM2070 only */ 249d401e5beSRudolf Cornelissen #define NMACC_2070_PLANEMASK 0x0014 250d401e5beSRudolf Cornelissen #define NMACC_2070_XYEXT 0x0018 251d401e5beSRudolf Cornelissen #define NMACC_2070_SRCPITCH 0x001c 252d401e5beSRudolf Cornelissen #define NMACC_2070_SRCBITOFF 0x0020 253d401e5beSRudolf Cornelissen #define NMACC_2070_DSTPITCH 0x0028 254d401e5beSRudolf Cornelissen #define NMACC_2070_DSTBITOFF 0x002c 255d401e5beSRudolf Cornelissen #define NMACC_2070_DSTSTARTOFF 0x0030 2563f618e4cSRudolf Cornelissen 2570252982aSshatty 2580252982aSshatty /* Macros for convenient accesses to the NM chips */ 2590252982aSshatty 260ee2288b7Sshatty /* primary PCI register area */ 2610252982aSshatty #define NM_REG8(r_) ((vuint8 *)regs)[(r_)] 262ee2288b7Sshatty #define NM_REG16(r_) ((vuint16 *)regs)[(r_) >> 1] 2630252982aSshatty #define NM_REG32(r_) ((vuint32 *)regs)[(r_) >> 2] 264ee2288b7Sshatty /* secondary PCI register area */ 265ee2288b7Sshatty #define NM_2REG8(r_) ((vuint8 *)regs2)[(r_)] 266ee2288b7Sshatty #define NM_2REG16(r_) ((vuint16 *)regs2)[(r_) >> 1] 267ee2288b7Sshatty #define NM_2REG32(r_) ((vuint32 *)regs2)[(r_) >> 2] 2680252982aSshatty 2690252982aSshatty /* read and write to PCI config space */ 270a5130410SRudolf Cornelissen #define CFGR(A) (nm_pci_access.offset=NMCFG_##A, ioctl(fd,NM_GET_PCI, &nm_pci_access,sizeof(nm_pci_access)), nm_pci_access.value) 271a5130410SRudolf Cornelissen #define CFGW(A,B) (nm_pci_access.offset=NMCFG_##A, nm_pci_access.value = B, ioctl(fd,NM_SET_PCI,&nm_pci_access,sizeof(nm_pci_access))) 2720252982aSshatty 2733f618e4cSRudolf Cornelissen /* read and write from acceleration engine */ 2740252982aSshatty #define ACCR(A) (NM_REG32(NMACC_##A)) 2753f618e4cSRudolf Cornelissen #define ACCW(A,B) (NM_REG32(NMACC_##A) = (B)) 2760252982aSshatty 2770252982aSshatty /* read and write from first CRTC (mapped) */ 2780252982aSshatty #define CR1R(A) (NM_REG32(NMCR1_##A)) 2790252982aSshatty #define CR1W(A,B) (NM_REG32(NMCR1_##A) = (B)) 2800252982aSshatty 2810252982aSshatty /* read and write from ISA I/O space */ 282a5130410SRudolf Cornelissen #define ISAWB(A,B)(nm_isa_access.adress=NMISA8_##A, nm_isa_access.data = (uint8)B, nm_isa_access.size = 1, ioctl(fd,NM_ISA_OUT, &nm_isa_access,sizeof(nm_isa_access))) 283a5130410SRudolf Cornelissen #define ISAWW(A,B)(nm_isa_access.adress=NMISA16_##A, nm_isa_access.data = B, nm_isa_access.size = 2, ioctl(fd,NM_ISA_OUT, &nm_isa_access,sizeof(nm_isa_access))) 284a5130410SRudolf Cornelissen #define ISARB(A) (nm_isa_access.adress=NMISA8_##A, ioctl(fd,NM_ISA_IN, &nm_isa_access,sizeof(nm_isa_access)), (uint8)nm_isa_access.data) 285a5130410SRudolf Cornelissen #define ISARW(A) (nm_isa_access.adress=NMISA16_##A, ioctl(fd,NM_ISA_IN, &nm_isa_access,sizeof(nm_isa_access)), nm_isa_access.data) 2860252982aSshatty 2870252982aSshatty /* read and write from ISA CRTC indexed registers */ 2880252982aSshatty #define ISACRTCW(A,B)(ISAWW(CRTCIND, ((NMCRTCX_##A) | ((B) << 8)))) 2890252982aSshatty #define ISACRTCR(A) (ISAWB(CRTCIND, (NMCRTCX_##A)), ISARB(CRTCDAT)) 2900252982aSshatty 2910252982aSshatty /* read and write from ISA GRAPHICS indexed registers */ 2920252982aSshatty #define ISAGRPHW(A,B)(ISAWW(GRPHIND, ((NMGRPHX_##A) | ((B) << 8)))) 2930252982aSshatty #define ISAGRPHR(A) (ISAWB(GRPHIND, (NMGRPHX_##A)), ISARB(GRPHDAT)) 2940252982aSshatty 295ee2288b7Sshatty /* read and write from PCI GRAPHICS indexed registers (>= NM2097) */ 296ee2288b7Sshatty #define PCIGRPHW(A,B)(NM_2REG16(NM2PCI16_GRPHIND) = ((NMGRPHX_##A) | ((B) << 8))) 297ee2288b7Sshatty #define PCIGRPHR(A) (NM_2REG8(NM2PCI8_GRPHIND) = (NMGRPHX_##A), NM_2REG8(NM2PCI8_GRPHDAT)) 298ee2288b7Sshatty 2990252982aSshatty /* read and write from ISA SEQUENCER indexed registers */ 3000252982aSshatty #define ISASEQW(A,B)(ISAWW(SEQIND, ((NMSEQX_##A) | ((B) << 8)))) 3010252982aSshatty #define ISASEQR(A) (ISAWB(SEQIND, (NMSEQX_##A)), ISARB(SEQDAT)) 3020252982aSshatty 303ee2288b7Sshatty /* read and write from PCI SEQUENCER indexed registers (>= NM2097) */ 304ee2288b7Sshatty #define PCISEQW(A,B)(NM_2REG16(NM2PCI16_SEQIND) = ((NMSEQX_##A) | ((B) << 8))) 305ee2288b7Sshatty #define PCISEQR(A) (NM_2REG8(NM2PCI8_SEQIND) = (NMSEQX_##A), NM_2REG8(NM2PCI8_SEQDAT)) 306ee2288b7Sshatty 3070252982aSshatty /* read and write from ISA ATTRIBUTE indexed registers */ 3087d2bb07eSshatty #define ISAATBW(A,B)((void)ISARB(INSTAT1), ISAWB(ATTRINDW, ((NMATBX_##A) | 0x20)), ISAWB(ATTRDATW, (B))) 3097d2bb07eSshatty #define ISAATBR(A) ((void)ISARB(INSTAT1), ISAWB(ATTRINDW, ((NMATBX_##A) | 0x20)), ISARB(ATTRDATR)) 310