#ifndef _IDR_VAR_H #define _IDR_VAR_H #endif /* IKON Corporation 2617 Western Ave. Seattle, WA 98121 (206) 728-6465 Structure definition file for Solaris 2.0 driver for Sbus DR11-W emulator Model 10103 21 October, 1992 BETA release */ /************************************************************************ * * * This driver is provided at no charge to IKON's customers * * in the hope that it will assist them in understanding and * * using IKON's Sbus DR11-W emulator (Model 10103). This code * * is intended to be a working and (relatively!) bug free driver * * when running on the machine and OS rev available to IKON. * * IKON will attempt to keep this code running on current OS and * * hardware from SUN - and others - but does not guarantee this. * * The user is encouraged to contact IKON with comments, * * suggestions, and BUG REPORTS. * ************************************************************************/ /*================ DATA STRUCTURES ===================================*/ struct dmaio_regs { u_long Dmacsr ; /* control and status register */ u_long Dmaar ; /* address register */ u_long Dmabcr ; /* byte count register */ u_long dma_unused ; /* unused register */ }; /* THERE IS PROBABLY A MORE ELEGANT WAY TO ACCOMPLISH THE FOLLOWING - BUT RATHER THAN WORRY ABOUT ALIGNMENT - WE WILL DO IT THE HARD WAY */ struct idr_regs { /* DR11 working registers */ u_char Idr_mode ; /* mode register */ u_char idr_unused0 ; /* pad to next reg */ u_char idr_unused1 ; u_char idr_unused2 ; u_char idr_unused3[12] ; /* 16 byte offset between regs */ u_char Idr_latch ; /* latched functions */ u_char idr_unused4 ; u_char idr_unused5 ; u_char idr_unused6 ; u_char idr_unused7[12] ; u_char Idr_p_stat ; /* w=pulses, r=status/flags */ u_char idr_unused8 ; u_char idr_unused9 ; u_char idr_unused10 ; u_char idr_unused11[12] ; u_char Idr_dhi ; /* data, high byte */ u_char idr_unused12 ; u_char idr_unused13 ; u_char idr_unused14 ; u_char idr_unused15[12] ; u_char Idr_dlow ; /* data, low byte */ u_char idr_unused16 ; u_char idr_unused17 ; u_char idr_unused18 ; u_char idr_unused19[12] ; u_char Idr_rhi ; /* high 4 bits of range */ u_char idr_unused20 ; u_char idr_unused21 ; u_char idr_unused22 ; u_char idr_unused23[12] ; u_char Idr_rmid ; /* mid 8 bits of range */ u_char idr_unused24 ; u_char idr_unused25 ; u_char idr_unused26 ; u_char idr_unused27[12] ; u_char Idr_rlow ; /* low 8 bits of range */ u_char idr_unused28 ; u_char idr_unused29 ; u_char idr_unused30 ; u_char idr_unused31[12] ; /* pad to 128 bytes. */ } ; struct idr_unit { dev_info_t *dip ; /* devinfo pointer */ kmutex_t mutex ; /* mutex lock for this instance */ kcondvar_t cv ; /* conditional var for this inst*/ ddi_iblock_cookie_t iblock_cookie ; /* for mutexes */ struct dmaio_regs *dma_regs_p ; /* device control regs */ struct idr_regs *idr_regs_p ; /* points to working regs */ struct buf *buf_p ; /* will point at buffer in use */ u_int unit_open ; /* 1 = open */ volatile u_int unit_flags ; /* our flag bits here */ u_int dma_time ; /* dma timeout # in secs */ u_int attn_time ; /* attention wait timeout # */ u_int rdy_time ; /* ready wait timeout # */ u_int range_resid ; /* remaining count to xfer */ /* may be used for multi-dma */ /* per dr11 blocks (unused?) */ u_int read_fcn ; /* use at read start */ u_int write_fcn ; /* use at write start */ u_int read_pulse ; /* pulse at read start */ u_int write_pulse ; /* pulse at write start */ } ;