diff options
Diffstat (limited to 'drivers/char/rio')
76 files changed, 6238 insertions, 12018 deletions
diff --git a/drivers/char/rio/board.h b/drivers/char/rio/board.h index 0b397e1c8f1..29c98020409 100644 --- a/drivers/char/rio/board.h +++ b/drivers/char/rio/board.h @@ -52,63 +52,57 @@ static char *_board_h_sccs_ = "@(#)board.h 1.2"; /* ** The shape of the Host Control area, at offset 0x7C00, Write Only */ -struct s_Ctrl -{ - BYTE DpCtl; /* 7C00 */ - BYTE Dp_Unused2_[127]; - BYTE DpIntSet; /* 7C80 */ - BYTE Dp_Unused3_[127]; - BYTE DpTpuReset; /* 7D00 */ - BYTE Dp_Unused4_[127]; - BYTE DpIntReset; /* 7D80 */ - BYTE Dp_Unused5_[127]; +struct s_Ctrl { + BYTE DpCtl; /* 7C00 */ + BYTE Dp_Unused2_[127]; + BYTE DpIntSet; /* 7C80 */ + BYTE Dp_Unused3_[127]; + BYTE DpTpuReset; /* 7D00 */ + BYTE Dp_Unused4_[127]; + BYTE DpIntReset; /* 7D80 */ + BYTE Dp_Unused5_[127]; }; /* ** The PROM data area on the host (0x7C00), Read Only */ -struct s_Prom -{ - WORD DpSlxCode[2]; - WORD DpRev; - WORD Dp_Unused6_; - WORD DpUniq[4]; - WORD DpJahre; - WORD DpWoche; - WORD DpHwFeature[5]; - WORD DpOemId; - WORD DpSiggy[16]; +struct s_Prom { + WORD DpSlxCode[2]; + WORD DpRev; + WORD Dp_Unused6_; + WORD DpUniq[4]; + WORD DpJahre; + WORD DpWoche; + WORD DpHwFeature[5]; + WORD DpOemId; + WORD DpSiggy[16]; }; /* ** Union of the Ctrl and Prom areas */ -union u_CtrlProm /* This is the control/PROM area (0x7C00) */ -{ - struct s_Ctrl DpCtrl; - struct s_Prom DpProm; +union u_CtrlProm { /* This is the control/PROM area (0x7C00) */ + struct s_Ctrl DpCtrl; + struct s_Prom DpProm; }; /* ** The top end of memory! */ -struct s_ParmMapS /* Area containing Parm Map Pointer */ -{ - BYTE Dp_Unused8_[DP_PARMMAP_ADDR]; - WORD DpParmMapAd; +struct s_ParmMapS { /* Area containing Parm Map Pointer */ + BYTE Dp_Unused8_[DP_PARMMAP_ADDR]; + WORD DpParmMapAd; }; -struct s_StartUpS -{ - BYTE Dp_Unused9_[DP_STARTUP_ADDR]; - BYTE Dp_LongJump[0x4]; - BYTE Dp_Unused10_[2]; - BYTE Dp_ShortJump[0x2]; +struct s_StartUpS { + BYTE Dp_Unused9_[DP_STARTUP_ADDR]; + BYTE Dp_LongJump[0x4]; + BYTE Dp_Unused10_[2]; + BYTE Dp_ShortJump[0x2]; }; -union u_Sram2ParmMap /* This is the top of memory (0x7E00-0x7FFF) */ -{ - BYTE DpSramMem[DP_SRAM2_SIZE]; +union u_Sram2ParmMap { /* This is the top of memory (0x7E00-0x7FFF) */ + BYTE DpSramMem[DP_SRAM2_SIZE]; struct s_ParmMapS DpParmMapS; struct s_StartUpS DpStartUpS; }; @@ -116,13 +110,12 @@ union u_Sram2ParmMap /* This is the top of memory (0x7E00-0x7FFF) */ /* ** This is the DP RAM overlay. */ -struct DpRam -{ - BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */ - union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */ - union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */ - BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */ - BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */ +struct DpRam { + BYTE DpSram1[DP_SRAM1_SIZE]; /* 0000 - 7BFF */ + union u_CtrlProm DpCtrlProm; /* 7C00 - 7DFF */ + union u_Sram2ParmMap DpSram2ParmMap; /* 7E00 - 7FFF */ + BYTE DpScratch[DP_SCRATCH_SIZE]; /* 8000 - 8FFF */ + BYTE DpSram3[DP_SRAM3_SIZE]; /* 9000 - FFFF */ }; #define DpControl DpCtrlProm.DpCtrl.DpCtl diff --git a/drivers/char/rio/bootpkt.h b/drivers/char/rio/bootpkt.h index c329aeb7c87..602266e0c08 100644 --- a/drivers/char/rio/bootpkt.h +++ b/drivers/char/rio/bootpkt.h @@ -41,7 +41,7 @@ #ifndef lint #ifdef SCCS -static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1" ; +static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1"; #endif #endif @@ -49,14 +49,13 @@ static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h 1.1" ; * Overlayed onto the Data fields of a regular * Packet ************************************************/ -typedef struct BOOT_PKT BOOT_PKT ; +typedef struct BOOT_PKT BOOT_PKT; struct BOOT_PKT { - short seq_num ; - char data[10] ; - } ; + short seq_num; + char data[10]; +}; #endif /*********** end of file ***********/ - diff --git a/drivers/char/rio/brates.h b/drivers/char/rio/brates.h deleted file mode 100644 index bd4fc84ec6c..00000000000 --- a/drivers/char/rio/brates.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** - ******* ******* - ******* BRATES.H ******* - ******* ******* - **************************************************************************** - - Author : Jeremy Rolls - Date : 1 Nov 1990 - - * - * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Version : 0.01 - - - Mods - ---------------------------------------------------------------------------- - Date By Description - ---------------------------------------------------------------------------- - - ***************************************************************************/ - -#ifndef _brates_h -#ifndef lint -/* static char * _brates_h_sccs = "@(#)brates.h 1.4"; */ -#endif -#define _brates_h 1 -/* List of baud rate defines. Most are borrowed from /usr/include/sys/termio.h -*/ -#ifndef INKERNEL - -#define B0 0x00 -#define B50 0x01 -#define B75 0x02 -#define B110 0x03 -#define B134 0x04 -#define B150 0x05 -#define B200 0x06 -#define B300 0x07 -#define B600 0x08 -#define B1200 0x09 -#define B1800 0x0a -#define B2400 0x0b -#define B4800 0x0c -#define B9600 0x0d -#define B19200 0x0e -#define B38400 0x0f - -#endif - -/* -** The following baudrates may or may not be defined -** on various UNIX systems. -** If they are not then we define them. -** If they are then we do not define them ;-) -** -** This is appalling that we use same definitions as UNIX -** for our own download code as there is no garuntee that -** B57600 will be defined as 0x11 by a UNIX system.... -** Arghhhhh!!!!!!!!!!!!!! -*/ -#if !defined(B56000) -#define B56000 0x10 -#endif - -#if !defined(B57600) -#define B57600 0x11 -#endif - -#if !defined(B64000) -#define B64000 0x12 -#endif - -#if !defined(B115200) -#define B115200 0x13 -#endif - - -#if !defined(B2000) -#define B2000 0x14 -#endif - - -#define MAX_RATE B2000 - -struct baud_rate /* Tag for baud rates */ -{ - /* short host_rate,*/ /* As passed by the driver */ - short divisor, /* The divisor */ - prescaler; /* The pre-scaler */ -}; - -#endif diff --git a/drivers/char/rio/chan.h b/drivers/char/rio/chan.h deleted file mode 100644 index 5b306543328..00000000000 --- a/drivers/char/rio/chan.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#ifndef _chan_h -#define _chan_h - -#ifndef lint -#ifdef SCCS -static char *_rio_chan_h_sccs = "@(#)chan.h 1.1" ; -#endif -#endif - -#define Link0 0 -#define Link1 1 -#define Link2 2 -#define Link3 3 - -#endif diff --git a/drivers/char/rio/cirrus.h b/drivers/char/rio/cirrus.h index cf056a990f1..217ff09f2fa 100644 --- a/drivers/char/rio/cirrus.h +++ b/drivers/char/rio/cirrus.h @@ -73,20 +73,20 @@ #define TIMER_TICK 0x82 #define STOP_BREAK 0x83 #define BASE(a) ((a) < 4 ? (short*)CIRRUS_FIRST : ((a) < 8 ? (short *)CIRRUS_SECOND : ((a) < 12 ? (short*)CIRRUS_THIRD : (short *)CIRRUS_FOURTH))) -#define txack1 ((short *)0x7104) -#define rxack1 ((short *)0x7102) +#define txack1 ((short *)0x7104) +#define rxack1 ((short *)0x7102) #define mdack1 ((short *)0x7106) -#define txack2 ((short *)0x7006) -#define rxack2 ((short *)0x7004) -#define mdack2 ((short *)0x7100) +#define txack2 ((short *)0x7006) +#define rxack2 ((short *)0x7004) +#define mdack2 ((short *)0x7100) #define int_latch ((short *) 0x7800) -#define int_status ((short *) 0x7c00) -#define tx1_pending 0x20 -#define rx1_pending 0x10 -#define md1_pending 0x40 -#define tx2_pending 0x02 -#define rx2_pending 0x01 -#define md2_pending 0x40 +#define int_status ((short *) 0x7c00) +#define tx1_pending 0x20 +#define rx1_pending 0x10 +#define md1_pending 0x40 +#define tx2_pending 0x02 +#define rx2_pending 0x01 +#define md2_pending 0x40 #define module1_bits 0x07 #define module1_modern 0x08 #define module2_bits 0x70 @@ -113,65 +113,65 @@ NB. These registers are relative values on 8 bit boundaries whereas on the RTA's the CIRRUS registers are on word boundaries. Use pointer arithmetic (short *) to obtain the real addresses required */ -#define ccr 0x05 /* Channel Command Register */ -#define ier 0x06 /* Interrupt Enable Register */ -#define cor1 0x08 /* Channel Option Register 1 */ -#define cor2 0x09 /* Channel Option Register 2 */ -#define cor3 0x0a /* Channel Option Register 3 */ -#define cor4 0x1e /* Channel Option Register 4 */ -#define cor5 0x1f /* Channel Option Register 5 */ - -#define ccsr 0x0b /* Channel Control Status Register */ -#define rdcr 0x0e /* Receive Data Count Register */ -#define tdcr 0x12 /* Transmit Data Count Register */ -#define mcor1 0x15 /* Modem Change Option Register 1 */ -#define mcor2 0x16 /* Modem Change Option Regsiter 2 */ - -#define livr 0x18 /* Local Interrupt Vector Register */ -#define schr1 0x1a /* Special Character Register 1 */ -#define schr2 0x1b /* Special Character Register 2 */ -#define schr3 0x1c /* Special Character Register 3 */ -#define schr4 0x1d /* Special Character Register 4 */ - -#define rtr 0x20 /* Receive Timer Register */ -#define rtpr 0x21 /* Receive Timeout Period Register */ -#define lnc 0x24 /* Lnext character */ - -#define rivr 0x43 /* Receive Interrupt Vector Register */ -#define tivr 0x42 /* Transmit Interrupt Vector Register */ -#define mivr 0x41 /* Modem Interrupt Vector Register */ -#define gfrcr 0x40 /* Global Firmware Revision code Reg */ -#define ricr 0x44 /* Receive Interrupting Channel Reg */ -#define ticr 0x45 /* Transmit Interrupting Channel Reg */ -#define micr 0x46 /* Modem Interrupting Channel Register */ - -#define gcr 0x4b /* Global configuration register*/ -#define misr 0x4c /* Modem interrupt status register */ +#define ccr 0x05 /* Channel Command Register */ +#define ier 0x06 /* Interrupt Enable Register */ +#define cor1 0x08 /* Channel Option Register 1 */ +#define cor2 0x09 /* Channel Option Register 2 */ +#define cor3 0x0a /* Channel Option Register 3 */ +#define cor4 0x1e /* Channel Option Register 4 */ +#define cor5 0x1f /* Channel Option Register 5 */ + +#define ccsr 0x0b /* Channel Control Status Register */ +#define rdcr 0x0e /* Receive Data Count Register */ +#define tdcr 0x12 /* Transmit Data Count Register */ +#define mcor1 0x15 /* Modem Change Option Register 1 */ +#define mcor2 0x16 /* Modem Change Option Regsiter 2 */ + +#define livr 0x18 /* Local Interrupt Vector Register */ +#define schr1 0x1a /* Special Character Register 1 */ +#define schr2 0x1b /* Special Character Register 2 */ +#define schr3 0x1c /* Special Character Register 3 */ +#define schr4 0x1d /* Special Character Register 4 */ + +#define rtr 0x20 /* Receive Timer Register */ +#define rtpr 0x21 /* Receive Timeout Period Register */ +#define lnc 0x24 /* Lnext character */ + +#define rivr 0x43 /* Receive Interrupt Vector Register */ +#define tivr 0x42 /* Transmit Interrupt Vector Register */ +#define mivr 0x41 /* Modem Interrupt Vector Register */ +#define gfrcr 0x40 /* Global Firmware Revision code Reg */ +#define ricr 0x44 /* Receive Interrupting Channel Reg */ +#define ticr 0x45 /* Transmit Interrupting Channel Reg */ +#define micr 0x46 /* Modem Interrupting Channel Register */ + +#define gcr 0x4b /* Global configuration register */ +#define misr 0x4c /* Modem interrupt status register */ #define rbusr 0x59 #define tbusr 0x5a #define mbusr 0x5b -#define eoir 0x60 /* End Of Interrupt Register */ -#define rdsr 0x62 /* Receive Data / Status Register */ -#define tdr 0x63 /* Transmit Data Register */ -#define svrr 0x67 /* Service Request Register */ +#define eoir 0x60 /* End Of Interrupt Register */ +#define rdsr 0x62 /* Receive Data / Status Register */ +#define tdr 0x63 /* Transmit Data Register */ +#define svrr 0x67 /* Service Request Register */ -#define car 0x68 /* Channel Access Register */ -#define mir 0x69 /* Modem Interrupt Register */ -#define tir 0x6a /* Transmit Interrupt Register */ -#define rir 0x6b /* Receive Interrupt Register */ -#define msvr1 0x6c /* Modem Signal Value Register 1 */ -#define msvr2 0x6d /* Modem Signal Value Register 2*/ -#define psvr 0x6f /* Printer Signal Value Register*/ +#define car 0x68 /* Channel Access Register */ +#define mir 0x69 /* Modem Interrupt Register */ +#define tir 0x6a /* Transmit Interrupt Register */ +#define rir 0x6b /* Receive Interrupt Register */ +#define msvr1 0x6c /* Modem Signal Value Register 1 */ +#define msvr2 0x6d /* Modem Signal Value Register 2 */ +#define psvr 0x6f /* Printer Signal Value Register */ -#define tbpr 0x72 /* Transmit Baud Rate Period Register */ -#define tcor 0x76 /* Transmit Clock Option Register */ +#define tbpr 0x72 /* Transmit Baud Rate Period Register */ +#define tcor 0x76 /* Transmit Clock Option Register */ -#define rbpr 0x78 /* Receive Baud Rate Period Register */ -#define rber 0x7a /* Receive Baud Rate Extension Register */ -#define rcor 0x7c /* Receive Clock Option Register*/ -#define ppr 0x7e /* Prescalar Period Register */ +#define rbpr 0x78 /* Receive Baud Rate Period Register */ +#define rber 0x7a /* Receive Baud Rate Extension Register */ +#define rcor 0x7c /* Receive Clock Option Register */ +#define ppr 0x7e /* Prescalar Period Register */ /* Misc registers used for forcing the 1400 out of its reset woes */ #define airl 0x6d @@ -192,10 +192,10 @@ /* RDSR - when status read from FIFO */ #define RDSR_BREAK 0x08 /* Break received */ -#define RDSR_TIMEOUT 0x80 /* No new data timeout */ -#define RDSR_SC1 0x10 /* Special char 1 (tx XON) matched */ -#define RDSR_SC2 0x20 /* Special char 2 (tx XOFF) matched */ -#define RDSR_SC12_MASK 0x30 /* Mask for special chars 1 and 2 */ +#define RDSR_TIMEOUT 0x80 /* No new data timeout */ +#define RDSR_SC1 0x10 /* Special char 1 (tx XON) matched */ +#define RDSR_SC2 0x20 /* Special char 2 (tx XOFF) matched */ +#define RDSR_SC12_MASK 0x30 /* Mask for special chars 1 and 2 */ /* PPR */ #define PPR_DEFAULT 0x31 /* Default value - for a 25Mhz clock gives @@ -244,7 +244,7 @@ #define IER_TIMEOUT 0x01 /* Timeout on no data */ #define IER_DEFAULT 0x94 /* Default values */ -#define IER_PARALLEL 0x84 /* Default for Parallel */ +#define IER_PARALLEL 0x84 /* Default for Parallel */ #define IER_EMPTY 0x92 /* Transmitter empty rather than ready */ /* COR1 - Driver only */ @@ -264,11 +264,11 @@ #define COR1_7BITS 0x02 /* 7 data bits */ #define COR1_8BITS 0x03 /* 8 data bits */ -#define COR1_HOST 0xef /* Safe host bits */ +#define COR1_HOST 0xef /* Safe host bits */ /* RTA only */ -#define COR1_CINPCK 0x00 /* Check parity of received characters */ -#define COR1_CNINPCK 0x10 /* Don't check parity */ +#define COR1_CINPCK 0x00 /* Check parity of received characters */ +#define COR1_CNINPCK 0x10 /* Don't check parity */ /* COR2 bits for both RTA and driver use */ #define COR2_IXANY 0x80 /* IXANY - any character is XON */ @@ -293,9 +293,9 @@ |