/* IKON Corporation 2617 Western Ave. Seattle, WA 98121 (206) 728-6465 structure definition file for Solaris 2.0 driver for Sbus hardcopy boards BETA release 20 October, 1992 */ /************************************************************************ * * * 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 hardcopy interface products. 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 ihcp_regs { /* hardcopy working registers */ u_char Ihcp_lf ; /* latched functions */ u_char ihcp_unused0 ; /* pad to next reg */ u_char ihcp_unused1 ; u_char ihcp_unused2 ; u_char ihcp_unused3[12] ; /* 16 byte offset between regs */ u_char Ihcp_is_do ; /* interface status/data out */ u_char ihcp_unused4 ; u_char ihcp_unused5 ; u_char ihcp_unused6 ; u_char ihcp_unused7[12] ; u_char Ihcp_ds_co ; /* device status/command out */ u_char ihcp_unused8 ; u_char ihcp_unused9 ; u_char ihcp_unused10 ; u_char ihcp_unused11[12] ; u_char Ihcp_ri ; /* reset interrupt flag */ u_char ihcp_unused12 ; u_char ihcp_unused13 ; u_char ihcp_unused14 ; u_char ihcp_unused15[12] ; u_char Ihcp_sa ; /* software ack */ u_char ihcp_unused16 ; u_char ihcp_unused17 ; u_char ihcp_unused18 ; u_char ihcp_unused19[12] ; u_char Ihcp_mc ; /* master clear board */ u_char ihcp_unused20 ; u_char ihcp_unused21 ; u_char ihcp_unused22 ; u_char ihcp_unused23[12] ; u_char Ihcp_test0 ; /* factory use !!! */ u_char ihcp_unused24 ; u_char ihcp_unused25 ; u_char ihcp_unused26 ; u_char ihcp_unused27[12] ; u_char Ihcp_test1 ; /* more factory use. more !!! */ u_char ihcp_unused28 ; u_char ihcp_unused29 ; u_char ihcp_unused30 ; u_char ihcp_unused31[12] ; /* pad to 128 bytes. */ } ; struct ihcp_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 ; /* points to DMA control regs */ struct ihcp_regs *ihcp_regs_p ; /* points to working regs */ struct buf *buf_p ; /* will point at buffer in use */ u_char unit_open ; /* 1 = open */ u_char open_inhibit ; /* 1 = open not allowed */ u_char mode ; /* copy of print/plot mode */ u_char spare_0 ; /* alignment byte */ volatile u_int unit_flags ; /* our flag bits here */ u_int dma_time ; /* dma timeout # in secs */ u_int fifo_time ; /* empty and <1/2 full # */ int saved_instance ; /* for future ref & error logging */ } ;