1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright (c) 1989-1998,2000 by Sun Microsystems, Inc. 24*7c478bd9Sstevel@tonic-gate * All rights reserved. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_FDREG_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_FDREG_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 33*7c478bd9Sstevel@tonic-gate extern "C" { 34*7c478bd9Sstevel@tonic-gate #endif 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate /* 38*7c478bd9Sstevel@tonic-gate * Floppy Controller Registers 39*7c478bd9Sstevel@tonic-gate */ 40*7c478bd9Sstevel@tonic-gate #ifndef _ASM 41*7c478bd9Sstevel@tonic-gate union fdcreg { 42*7c478bd9Sstevel@tonic-gate volatile struct { 43*7c478bd9Sstevel@tonic-gate uchar_t fdc_control; 44*7c478bd9Sstevel@tonic-gate uchar_t fdc_fifo; 45*7c478bd9Sstevel@tonic-gate } fdc_82072_reg; 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate volatile struct fdc_82077_reg { 48*7c478bd9Sstevel@tonic-gate uchar_t fdc_filler1[2]; 49*7c478bd9Sstevel@tonic-gate uchar_t fdc_dor; /* Digital Output Register */ 50*7c478bd9Sstevel@tonic-gate uchar_t fdc_filler2; 51*7c478bd9Sstevel@tonic-gate uchar_t fdc_control; /* DSR on write, MSR on read */ 52*7c478bd9Sstevel@tonic-gate #define fdc_msr fdc_control 53*7c478bd9Sstevel@tonic-gate #define fdc_dsr fdc_control 54*7c478bd9Sstevel@tonic-gate uchar_t fdc_fifo; 55*7c478bd9Sstevel@tonic-gate uchar_t fdc_filler3; 56*7c478bd9Sstevel@tonic-gate uchar_t fdc_dir; /* Digital Input Register */ 57*7c478bd9Sstevel@tonic-gate #define fdc_ccr fdc_dir 58*7c478bd9Sstevel@tonic-gate } fdc_82077_reg; 59*7c478bd9Sstevel@tonic-gate }; 60*7c478bd9Sstevel@tonic-gate #endif /* !_ASM */ 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate /* DSR - data rate select register */ 63*7c478bd9Sstevel@tonic-gate #define SWR 0x80 /* software reset */ 64*7c478bd9Sstevel@tonic-gate #define PD 0x40 /* power down */ 65*7c478bd9Sstevel@tonic-gate #define EPL 0x20 /* enable phase lock loop */ 66*7c478bd9Sstevel@tonic-gate #define PRECOMPMSK 0x1c /* precomp mask */ 67*7c478bd9Sstevel@tonic-gate #define DRSELMSK 0x3 /* data rate select mask */ 68*7c478bd9Sstevel@tonic-gate 69*7c478bd9Sstevel@tonic-gate /* MSR - main status register */ 70*7c478bd9Sstevel@tonic-gate #define RQM 0x80 /* request for master - chip needs attention */ 71*7c478bd9Sstevel@tonic-gate #define DIO 0x40 /* data in/out - 1 = remove bytes from fifo */ 72*7c478bd9Sstevel@tonic-gate #define NDM 0x20 /* non-dma mode - 1 during execution phase */ 73*7c478bd9Sstevel@tonic-gate #define CB 0x10 /* controller busy - command in progress */ 74*7c478bd9Sstevel@tonic-gate 75*7c478bd9Sstevel@tonic-gate /* command types */ 76*7c478bd9Sstevel@tonic-gate #define GPLN 0x1b /* gap length for read/write command */ 77*7c478bd9Sstevel@tonic-gate #define GPLF 0x54 /* gap length for format command */ 78*7c478bd9Sstevel@tonic-gate #define FDATA 0xe5 /* fill data fields during format */ 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gate /* commands */ 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gate /* 0x00-0x01 not defined */ 83*7c478bd9Sstevel@tonic-gate #define RDTRK 0x02 84*7c478bd9Sstevel@tonic-gate #define SPECIFY 0x03 85*7c478bd9Sstevel@tonic-gate #define SNSDSTAT 0x04 86*7c478bd9Sstevel@tonic-gate #define WRTCMD 0x05 87*7c478bd9Sstevel@tonic-gate #define RDCMD 0x06 88*7c478bd9Sstevel@tonic-gate #define RECALIBRATE 0x07 89*7c478bd9Sstevel@tonic-gate #define SNSISTAT 0x08 /* Sense Interrupt Status */ 90*7c478bd9Sstevel@tonic-gate #define WRTDEL 0x09 /* Write Deleted Data Sector */ 91*7c478bd9Sstevel@tonic-gate #define RDID 0x0A /* Read Identifier */ 92*7c478bd9Sstevel@tonic-gate #define MTONOFF 0x0B /* motor on/off */ 93*7c478bd9Sstevel@tonic-gate #define RDDEL 0x0C /* Read Deleted Data Sector */ 94*7c478bd9Sstevel@tonic-gate #define FMTTRK 0x0D /* Format Track */ 95*7c478bd9Sstevel@tonic-gate #define DUMPREG 0x0E /* Dump Registers */ 96*7c478bd9Sstevel@tonic-gate #define SEEK 0x0F /* Seek */ 97*7c478bd9Sstevel@tonic-gate /* 0x10-0x12 not defined */ 98*7c478bd9Sstevel@tonic-gate #define CONFIGURE 0x13 99*7c478bd9Sstevel@tonic-gate /* 0x14-0x1F not defined */ 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate /* Modifier bits for the command byte */ 102*7c478bd9Sstevel@tonic-gate #define MT 0x80 103*7c478bd9Sstevel@tonic-gate #define MFM 0x40 104*7c478bd9Sstevel@tonic-gate #define SK 0x20 105*7c478bd9Sstevel@tonic-gate #define MOT 0x80 106*7c478bd9Sstevel@tonic-gate #define IPS 0x80 /* Used for South Bridge superI/O */ 107*7c478bd9Sstevel@tonic-gate 108*7c478bd9Sstevel@tonic-gate 109*7c478bd9Sstevel@tonic-gate #define SSSDTL 0xff /* special sector size */ 110*7c478bd9Sstevel@tonic-gate 111*7c478bd9Sstevel@tonic-gate #define NCBRW 0x09 /* number cmd bytes for read/write cmds */ 112*7c478bd9Sstevel@tonic-gate #define NRBRW 0x07 /* number result bytes for read/write cmds */ 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate /* results */ 115*7c478bd9Sstevel@tonic-gate /* status reg0 */ 116*7c478bd9Sstevel@tonic-gate #define IC_SR0 0xc0 /* interrupt code */ 117*7c478bd9Sstevel@tonic-gate #define SE_SR0 0x20 /* seek end */ 118*7c478bd9Sstevel@tonic-gate #define EC_SR0 0x10 /* equipment check */ 119*7c478bd9Sstevel@tonic-gate #define NR_SR0 0x08 /* not ready */ 120*7c478bd9Sstevel@tonic-gate #define H_SR0 0x04 /* head address */ 121*7c478bd9Sstevel@tonic-gate #define DS_SR0 0x03 /* drive select */ 122*7c478bd9Sstevel@tonic-gate 123*7c478bd9Sstevel@tonic-gate /* status reg1 */ 124*7c478bd9Sstevel@tonic-gate #define EN_SR1 0x80 /* end of cylinder */ 125*7c478bd9Sstevel@tonic-gate #define DE_SR1 0x20 /* data error */ 126*7c478bd9Sstevel@tonic-gate #define OR_SR1 0x10 /* overrun/underrun */ 127*7c478bd9Sstevel@tonic-gate #define ND_SR1 0x04 /* no data */ 128*7c478bd9Sstevel@tonic-gate #define NW_SR1 0x02 /* not writable */ 129*7c478bd9Sstevel@tonic-gate #define MA_SR1 0x01 /* missing address mark */ 130*7c478bd9Sstevel@tonic-gate #define TO_SR1 0x08 /* Timeout */ 131*7c478bd9Sstevel@tonic-gate 132*7c478bd9Sstevel@tonic-gate /* status reg3 */ 133*7c478bd9Sstevel@tonic-gate #define WP_SR3 0x40 /* write protected */ 134*7c478bd9Sstevel@tonic-gate #define T0_SR3 0x10 /* track zero */ 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gate /* DOR - Digital Output register - 82077 only */ 137*7c478bd9Sstevel@tonic-gate #define EJECT 0x80 /* eject diskette - was in Auxio */ 138*7c478bd9Sstevel@tonic-gate #define EJECT_DMA 0x20 /* eject diskette - on DMA platform */ 139*7c478bd9Sstevel@tonic-gate #define MOTEN(unit) (unit ? 0x30 : 0x10) /* motor enable bit */ 140*7c478bd9Sstevel@tonic-gate #define DMAGATE 0x8 /* must be high to enable interrupts */ 141*7c478bd9Sstevel@tonic-gate #define RESET 0x4 /* reset bit */ 142*7c478bd9Sstevel@tonic-gate #define DRVSEL 0x1 /* drive select */ 143*7c478bd9Sstevel@tonic-gate 144*7c478bd9Sstevel@tonic-gate /* DIR - Digital Input register - 82077 only */ 145*7c478bd9Sstevel@tonic-gate #define DSKCHG 0x80 /* diskette was changed - was in Auxio */ 146*7c478bd9Sstevel@tonic-gate 147*7c478bd9Sstevel@tonic-gate #define DRV_MASK 0x03 /* drive mask for the second command byte */ 148*7c478bd9Sstevel@tonic-gate 149*7c478bd9Sstevel@tonic-gate #ifndef _ASM 150*7c478bd9Sstevel@tonic-gate #define Moton_delay (drv_usectohz(750000)) /* motor on delay */ 151*7c478bd9Sstevel@tonic-gate /* 0.75 seconds */ 152*7c478bd9Sstevel@tonic-gate #define Motoff_delay (6 * drv_usectohz(1000000)) /* motor off delay */ 153*7c478bd9Sstevel@tonic-gate /* 6 seconds */ 154*7c478bd9Sstevel@tonic-gate 155*7c478bd9Sstevel@tonic-gate /* Macros to set and retrieve data from the controller registers */ 156*7c478bd9Sstevel@tonic-gate #define Msr(fdc) ddi_get8(fdc->c_handlep_cont, \ 157*7c478bd9Sstevel@tonic-gate ((uint8_t *)fdc->c_control)) 158*7c478bd9Sstevel@tonic-gate #define Dsr(fdc, val) ddi_put8(fdc->c_handlep_cont, \ 159*7c478bd9Sstevel@tonic-gate ((uint8_t *)fdc->c_control),\ 160*7c478bd9Sstevel@tonic-gate ((uint8_t)val)) 161*7c478bd9Sstevel@tonic-gate #define Dir(fdc) ddi_get8(fdc->c_handlep_cont, \ 162*7c478bd9Sstevel@tonic-gate ((uint8_t *)fdc->c_dir)) 163*7c478bd9Sstevel@tonic-gate #define Fifo(fdc) ddi_get8(fdc->c_handlep_cont, \ 164*7c478bd9Sstevel@tonic-gate ((uint8_t *)fdc->c_fifo)) 165*7c478bd9Sstevel@tonic-gate #define Set_Fifo(fdc, val) ddi_put8(fdc->c_handlep_cont, \ 166*7c478bd9Sstevel@tonic-gate ((uint8_t *)fdc->c_fifo), \ 167*7c478bd9Sstevel@tonic-gate ((uint8_t)val)) 168*7c478bd9Sstevel@tonic-gate #define Dor(fdc) ddi_get8(fdc->c_handlep_cont, ((uint8_t *)fdc->c_dor)) 169*7c478bd9Sstevel@tonic-gate #define Set_dor(fdc, val, flag) \ 170*7c478bd9Sstevel@tonic-gate { if (flag) \ 171*7c478bd9Sstevel@tonic-gate ddi_put8(fdc->c_handlep_cont, ((uint8_t *)fdc->c_dor), \ 172*7c478bd9Sstevel@tonic-gate ((uint8_t)(Dor(fdc) | (val)))); \ 173*7c478bd9Sstevel@tonic-gate else \ 174*7c478bd9Sstevel@tonic-gate ddi_put8(fdc->c_handlep_cont, ((uint8_t *)fdc->c_dor), \ 175*7c478bd9Sstevel@tonic-gate ((uint8_t)(Dor(fdc) & ~(val)))); } 176*7c478bd9Sstevel@tonic-gate #endif /* !_ASM */ 177*7c478bd9Sstevel@tonic-gate 178*7c478bd9Sstevel@tonic-gate /* 179*7c478bd9Sstevel@tonic-gate * Auxio Registers 180*7c478bd9Sstevel@tonic-gate */ 181*7c478bd9Sstevel@tonic-gate 182*7c478bd9Sstevel@tonic-gate /* 183*7c478bd9Sstevel@tonic-gate * Definitions and structures for the floppy Auxiliary Input/Output register 184*7c478bd9Sstevel@tonic-gate * for the muchio, slavio, and cheerio I/O subsystem chips 185*7c478bd9Sstevel@tonic-gate * 186*7c478bd9Sstevel@tonic-gate * In general, muchio is found on sun4c, slavio is found on sun4m and sun4u 187*7c478bd9Sstevel@tonic-gate * with Sbus. Cheerio is found on sun4u with a PCI bus. 188*7c478bd9Sstevel@tonic-gate * 189*7c478bd9Sstevel@tonic-gate * 190*7c478bd9Sstevel@tonic-gate * 191*7c478bd9Sstevel@tonic-gate * 07 06 05 04 03 02 01 00 192*7c478bd9Sstevel@tonic-gate * muchio 1 1 DEN CHG SEL TC EJCT LED 193*7c478bd9Sstevel@tonic-gate * slavio 1 1 DEN 0 IMUX 0 TC LED 194*7c478bd9Sstevel@tonic-gate * 195*7c478bd9Sstevel@tonic-gate * The auxio register is designed poorly from a software perspective. 196*7c478bd9Sstevel@tonic-gate * a) it supports other functions as well as floppy 197*7c478bd9Sstevel@tonic-gate * b) TC is at a different bit position for muchio versus sun4m 198*7c478bd9Sstevel@tonic-gate * 199*7c478bd9Sstevel@tonic-gate * The cheerio auxio register is only for the floppy and it is a 32 bit 200*7c478bd9Sstevel@tonic-gate * register. It does not contain a TC because the cheerio supports 201*7c478bd9Sstevel@tonic-gate * floppy DMA. Please note that on the slavio auxio, the Digital 202*7c478bd9Sstevel@tonic-gate * Output register of the floppy controller contains a Density Select bit. 203*7c478bd9Sstevel@tonic-gate * On the cheerio, this bit is muxed with another 204*7c478bd9Sstevel@tonic-gate * signal. So, the cheerio auxio register contains a density select bit. 205*7c478bd9Sstevel@tonic-gate * 206*7c478bd9Sstevel@tonic-gate * cheerio auxio bit name bit# 207*7c478bd9Sstevel@tonic-gate * ------------------------------ 208*7c478bd9Sstevel@tonic-gate * Floppy density sense 0 209*7c478bd9Sstevel@tonic-gate * Floppy desnity select 1 210*7c478bd9Sstevel@tonic-gate * Unused 31:1 211*7c478bd9Sstevel@tonic-gate * 212*7c478bd9Sstevel@tonic-gate */ 213*7c478bd9Sstevel@tonic-gate 214*7c478bd9Sstevel@tonic-gate /* 215*7c478bd9Sstevel@tonic-gate * muchio/slavio: Bits of the auxio register 216*7c478bd9Sstevel@tonic-gate * - when writing to the auxio register, the bits represented by 217*7c478bd9Sstevel@tonic-gate * AUX_MBO and AUX_MBO4M must be one 218*7c478bd9Sstevel@tonic-gate */ 219*7c478bd9Sstevel@tonic-gate 220*7c478bd9Sstevel@tonic-gate #define AUX_MBO 0xF0 /* Must be written with ones */ 221*7c478bd9Sstevel@tonic-gate #define AUX_MBO4M 0xC0 /* Must be written with ones */ 222*7c478bd9Sstevel@tonic-gate 223*7c478bd9Sstevel@tonic-gate #define AUX_TC4M 0x02 /* 4m Floppy termnal count */ 224*7c478bd9Sstevel@tonic-gate /* 1 = transfer over */ 225*7c478bd9Sstevel@tonic-gate #define AUX_TC 0x04 /* 4c Floppy terminal count */ 226*7c478bd9Sstevel@tonic-gate /* 1 = transfer over */ 227*7c478bd9Sstevel@tonic-gate #define AUX_DENSITY 0x20 /* Floppy density (input value) */ 228*7c478bd9Sstevel@tonic-gate /* 1 = high, 0 = low */ 229*7c478bd9Sstevel@tonic-gate 230*7c478bd9Sstevel@tonic-gate 231*7c478bd9Sstevel@tonic-gate /* 232*7c478bd9Sstevel@tonic-gate * muchio additional floppy auxio bits 233*7c478bd9Sstevel@tonic-gate * slavio uses internal dor for these bits 234*7c478bd9Sstevel@tonic-gate */ 235*7c478bd9Sstevel@tonic-gate 236*7c478bd9Sstevel@tonic-gate #define AUX_DISKCHG 0x10 /* Floppy diskette change (input) */ 237*7c478bd9Sstevel@tonic-gate /* 1 = new diskette inserted */ 238*7c478bd9Sstevel@tonic-gate #define AUX_DRVSELECT 0x08 /* Floppy drive select (output) */ 239*7c478bd9Sstevel@tonic-gate /* 1 = selected, 0 = deselected */ 240*7c478bd9Sstevel@tonic-gate #define AUX_EJECT 0x02 /* Floppy eject (output,NON inverted) */ 241*7c478bd9Sstevel@tonic-gate /* 0 = eject the diskette */ 242*7c478bd9Sstevel@tonic-gate /* 243*7c478bd9Sstevel@tonic-gate * cheerio additional floppy auxio bits 244*7c478bd9Sstevel@tonic-gate */ 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate #define AUX_MEDIUM_DENSITY 0x0 /* Use medium density */ 247*7c478bd9Sstevel@tonic-gate #define AUX_HIGH_DENSITY 0x2 248*7c478bd9Sstevel@tonic-gate 249*7c478bd9Sstevel@tonic-gate /* 250*7c478bd9Sstevel@tonic-gate * macros to set the Cheerio auxio registers. 251*7c478bd9Sstevel@tonic-gate */ 252*7c478bd9Sstevel@tonic-gate 253*7c478bd9Sstevel@tonic-gate #define Set_auxio(fdc, val) ddi_put32(fdc->c_handlep_aux, \ 254*7c478bd9Sstevel@tonic-gate ((uint32_t *)fdc->c_auxio_reg), \ 255*7c478bd9Sstevel@tonic-gate ((uint32_t)(val))) 256*7c478bd9Sstevel@tonic-gate 257*7c478bd9Sstevel@tonic-gate #define Get_auxio(fdc) ddi_get32(fdc->c_handlep_aux, \ 258*7c478bd9Sstevel@tonic-gate ((uint32_t *)fdc->c_auxio_reg)) 259*7c478bd9Sstevel@tonic-gate 260*7c478bd9Sstevel@tonic-gate /* 261*7c478bd9Sstevel@tonic-gate * DMA registers (sun4u only) 262*7c478bd9Sstevel@tonic-gate */ 263*7c478bd9Sstevel@tonic-gate #ifndef _ASM 264*7c478bd9Sstevel@tonic-gate struct cheerio_dma_reg { 265*7c478bd9Sstevel@tonic-gate uint_t fdc_dcsr; /* Data Control Status Register */ 266*7c478bd9Sstevel@tonic-gate uint_t fdc_dacr; /* DMA Address Count Registers */ 267*7c478bd9Sstevel@tonic-gate uint_t fdc_dbcr; /* DMA Byte Count Register */ 268*7c478bd9Sstevel@tonic-gate }; 269*7c478bd9Sstevel@tonic-gate 270*7c478bd9Sstevel@tonic-gate #define ISA_REG_LEN 0x500 /* South Bridge dma regs span */ 271*7c478bd9Sstevel@tonic-gate /* complete 0x500 isa registers. */ 272*7c478bd9Sstevel@tonic-gate 273*7c478bd9Sstevel@tonic-gate struct sb_dma_reg { 274*7c478bd9Sstevel@tonic-gate uchar_t sb_dma_regs[ISA_REG_LEN]; 275*7c478bd9Sstevel@tonic-gate }; 276*7c478bd9Sstevel@tonic-gate struct fdc_dma_reg { 277*7c478bd9Sstevel@tonic-gate uchar_t fdc_dma_regs[ISA_REG_LEN]; /* registers from isa config space */ 278*7c478bd9Sstevel@tonic-gate }; 279*7c478bd9Sstevel@tonic-gate 280*7c478bd9Sstevel@tonic-gate 281*7c478bd9Sstevel@tonic-gate #endif /* !_ASM */ 282*7c478bd9Sstevel@tonic-gate 283*7c478bd9Sstevel@tonic-gate 284*7c478bd9Sstevel@tonic-gate 285*7c478bd9Sstevel@tonic-gate /* 286*7c478bd9Sstevel@tonic-gate * DMA Control and Status Register(DCSR) definitions. See Cheerio spec 287*7c478bd9Sstevel@tonic-gate * for more details 288*7c478bd9Sstevel@tonic-gate */ 289*7c478bd9Sstevel@tonic-gate #define DCSR_INT_PEND 0x00000001 /* 1= floppy interrupts */ 290*7c478bd9Sstevel@tonic-gate #define DCSR_ERR_PEND 0x00000002 /* 1= host bus error detected */ 291*7c478bd9Sstevel@tonic-gate #define DCSR_INT_EN 0x00000010 /* 1= enable floppy interrupts */ 292*7c478bd9Sstevel@tonic-gate #define DCSR_RESET 0x00000080 /* 1= resets the DCSR */ 293*7c478bd9Sstevel@tonic-gate #define DCSR_WRITE 0x00000100 /* DMA direction; 1 = memory */ 294*7c478bd9Sstevel@tonic-gate #define DCSR_EN_DMA 0x00000200 /* 1= enable DMA */ 295*7c478bd9Sstevel@tonic-gate #define DCSR_CYC_PEND 0x00000400 /* 1 = DMA pending */ 296*7c478bd9Sstevel@tonic-gate #define DCSR_EN_CNT 0x00002000 /* 1= enables byte counter */ 297*7c478bd9Sstevel@tonic-gate #define DCSR_TC 0x00004000 /* 1= Terminal Count occurred */ 298*7c478bd9Sstevel@tonic-gate #define DCSR_CSR_DRAIN 0x00000000 /* 1= disable draining */ 299*7c478bd9Sstevel@tonic-gate #define DCSR_BURST_0 0x00080000 /* Burst Size bit 0 */ 300*7c478bd9Sstevel@tonic-gate #define DCSR_BURST_1 0x00040000 /* Burst Size bit 1 */ 301*7c478bd9Sstevel@tonic-gate #define DCSR_DIAG 0x00000000 /* 1= diag enable */ 302*7c478bd9Sstevel@tonic-gate #define DCSR_TCI_DIS 0x00800000 /* 1= TC won't cause interrupt */ 303*7c478bd9Sstevel@tonic-gate #define DCSR_INIT_BITS DCSR_INT_EN | DCSR_EN_CNT | DCSR_CSR_DRAIN \ 304*7c478bd9Sstevel@tonic-gate | fd_burstsize \ 305*7c478bd9Sstevel@tonic-gate | DCSR_TCI_DIS | DCSR_EN_DMA 306*7c478bd9Sstevel@tonic-gate 307*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 308*7c478bd9Sstevel@tonic-gate } 309*7c478bd9Sstevel@tonic-gate #endif 310*7c478bd9Sstevel@tonic-gate 311*7c478bd9Sstevel@tonic-gate #endif /* !_SYS_FDREG_H */ 312