1 #define FDC_BSIZE 512 2 #define FDC_MAXIOSIZE NBPG /* XXX should be MAXBSIZE */ 3 4 #define FDC_NSTATUS 10 5 6 #if !defined(LOCORE) 7 struct fdcio { 8 /* 9 * 82072 (sun4c) and 82077 (sun4m) controllers have different 10 * register layout; so we cache some here. 11 */ 12 volatile u_int8_t *fdcio_reg_msr; 13 volatile u_int8_t *fdcio_reg_fifo; 14 volatile u_int8_t *fdcio_reg_dor; /* 82077 only */ 15 16 /* 17 * Interrupt state. 18 */ 19 int fdcio_istate; 20 21 /* 22 * IO state. 23 */ 24 char *fdcio_data; /* pseudo-dma data */ 25 int fdcio_tc; /* pseudo-dma Terminal Count */ 26 u_char fdcio_status[FDC_NSTATUS]; /* copy of registers */ 27 int fdcio_nstat; /* # of valid status bytes */ 28 }; 29 #endif /* LOCORE */ 30 31 /* istate values */ 32 #define ISTATE_IDLE 0 /* No HW interrupt expected */ 33 #define ISTATE_SPURIOUS 1 /* Spurious HW interrupt detected */ 34 #define ISTATE_SENSEI 2 /* Do SENSEI on next HW interrupt */ 35 #define ISTATE_DMA 3 /* Pseudo-DMA in progress */ 36 37 #define FDIOCEJECT _IO('f', 24) 38 39