Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57c2d60e authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

[PATCH] Yet more rio cleaning (1 of 2)



- Remove more unused headers
- Remove various typedefs
- Correct type of PaddrP (physical addresses should be ulong)
- Kill use of bcopy
- More printk cleanups
- Kill true/false
- Clean up direct access to pci BARs

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent db318524
Loading
Loading
Loading
Loading

drivers/char/rio/bootpkt.h

deleted100644 → 0
+0 −61
Original line number Diff line number Diff line


/****************************************************************************
 *******                                                              *******
 *******        B O O T    P A C K E T   H E A D E R   F I L E
 *******                                                              *******
 ****************************************************************************

 Author  : Ian Nandhra
 Date    :

 *
 *  (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 _pkt_h
#define _pkt_h 1

#ifndef lint
#ifdef SCCS
static char *_rio_bootpkt_h_sccs = "@(#)bootpkt.h	1.1";
#endif
#endif

    /*************************************************
     * Overlayed onto the Data fields of a regular
     * Packet
     ************************************************/
typedef struct BOOT_PKT BOOT_PKT;
struct BOOT_PKT {
	short seq_num;
	char data[10];
};


#endif

/*********** end of file ***********/
+1 −109
Original line number Diff line number Diff line
@@ -40,73 +40,7 @@
#endif
#define _cirrus_h 1



/* Bit fields for particular registers */

/* GCR */
#define GCR_SERIAL	0x00	/* Configure as serial channel */
#define GCR_PARALLEL	0x80	/* Configure as parallel channel */

/* 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 */

/* PPR */
#define PPR_DEFAULT	0x31	/* Default value - for a 25Mhz clock gives
				   a timeout period of 1ms */

/* LIVR */
#define	LIVR_EXCEPTION	0x07	/* Receive exception interrupt */

/* CCR */
#define	CCR_RESET	0x80	/* Reset channel */
#define	CCR_CHANGE	0x4e	/* COR's have changed - NB always change all
				   COR's */
#define	CCR_WFLUSH	0x82	/* Flush transmit FIFO and TSR / THR */

#define	CCR_SENDSC1	0x21	/* Send special character one */
#define CCR_SENDSC2	0x22	/* Send special character two */
#define CCR_SENDSC3	0x23	/* Send special character three */
#define CCR_SENDSC4	0x24	/* Send special character four */

#define CCR_TENABLE	0x18	/* Enable transmitter */
#define	CCR_TDISABLE	0x14	/* Disable transmitter */
#define CCR_RENABLE	0x12	/* Enable receiver */
#define CCR_RDISABLE	0x11	/* Disable receiver */

#define	CCR_READY	0x00	/* CCR is ready for another command */

/* CCSR */
#define CCSR_TXENABLE	0x08	/* Transmitter enable */
#define CCSR_RXENABLE	0x80	/* Receiver enable */
#define CCSR_TXFLOWOFF	0x04	/* Transmit flow off */
#define CCSR_TXFLOWON	0x02	/* Transmit flow on */

/* SVRR */
#define	SVRR_RECEIVE	0x01	/* Receive interrupt pending */
#define	SVRR_TRANSMIT	0x02	/* Transmit interrupt pending */
#define	SVRR_MODEM	0x04	/* Modem interrupt pending */

/* CAR */
#define CAR_PORTS	0x03	/* Bit fields for ports */

/* IER */
#define	IER_MODEM	0x80	/* Change in modem status */
#define	IER_RECEIVE	0x10	/* Good data / data exception */
#define IER_TRANSMITR	0x04	/* Transmit ready (FIFO empty) */
#define	IER_TRANSMITE	0x02	/* Transmit empty */
#define IER_TIMEOUT	0x01	/* Timeout on no data */

#define	IER_DEFAULT	0x94	/* Default values */
#define IER_PARALLEL    0x84	/* Default for Parallel */
#define	IER_EMPTY	0x92	/* Transmitter empty rather than ready */

/* COR1 - Driver only */
#define	COR1_INPCK	0x10	/* Check parity of received characters */
/* Bit fields for particular registers shared with driver */

/* COR1 - driver and RTA */
#define	COR1_ODD	0x80	/* Odd parity */
@@ -222,35 +156,6 @@

#define	MSVR1_HOST	0xf3	/* The bits the host wants */

/* MSVR2 */
#define	MSVR2_DSR	0x02	/* DSR output pin (DTR on Cirrus) */

/* MCOR */
#define	MCOR_CD	        0x80	/* CD (DSR on Cirrus) */
#define	MCOR_RTS	0x40	/* RTS (CTS on Cirrus) */
#define	MCOR_RI	        0x20	/* RI */
#define	MCOR_DTR	0x10	/* DTR (CD on Cirrus) */

#define MCOR_DEFAULT    (MCOR_CD | MCOR_RTS | MCOR_RI | MCOR_DTR)
#define MCOR_FULLMODEM  MCOR_DEFAULT
#define MCOR_RJ45       (MCOR_CD | MCOR_RTS | MCOR_DTR)
#define MCOR_RESTRICTED (MCOR_CD | MCOR_RTS)

/* More MCOR - H/W Handshake (flowcontrol) stuff */
#define	MCOR_THRESH8	0x08	/* eight characters then we stop */
#define	MCOR_THRESH9	0x09	/* nine characters then we stop */
#define	MCOR_THRESH10	0x0A	/* ten characters then we stop */
#define	MCOR_THRESH11	0x0B	/* eleven characters then we stop */

#define	MCOR_THRESHBITS 0x0F	/* mask for ANDing out the above */

#define	MCOR_THRESHOLD	MCOR_THRESH9	/* MUST BE GREATER THAN COR3_THRESHOLD */


/* RTPR */
#define RTPR_DEFAULT	0x02	/* Default */


/* Defines for the subscripts of a CONFIG packet */
#define	CONFIG_COR1	1	/* Option register 1 */
#define	CONFIG_COR2	2	/* Option register 2 */
@@ -264,19 +169,6 @@
#define	CONFIG_TXBAUD	10	/* Tx baud rate */
#define	CONFIG_RXBAUD	11	/* Rx baud rate */

/* Port status stuff */
#define	IDLE_CLOSED	0	/* Closed */
#define IDLE_OPEN	1	/* Idle open */
#define IDLE_BREAK	2	/* Idle on break */

/* Subscript of MODEM STATUS packet */
#define	MODEM_VALUE	3	/* Current values of handshake pins */
/* Subscript of SBREAK packet */
#define BREAK_LENGTH	1	/* Length of a break in slices of 0.01 seconds
				   0 = stay on break until an EBREAK command
				   is sent */


#define	PRE_EMPTIVE	0x80	/* Pre-emptive bit in command field */

/* Packet types going from Host to remote - with the exception of OPEN, MOPEN,

drivers/char/rio/control.h

deleted100644 → 0
+0 −61
Original line number Diff line number Diff line


/****************************************************************************
 *******                                                              *******
 *******           C O N T R O L   P A C K E T   H E A D E R S
 *******                                                              *******
 ****************************************************************************

 Author  : Jon Brawn
 Date    :

 *
 *  (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 _control_h
#define _control_h

#ifndef lint
/* static char *_rio_control_h_sccs = "@(#)control.h	1.4"; */
#endif

#define	CONTROL		'^'
#define IFOAD		( CONTROL + 1 )
#define	IDENTIFY	( CONTROL + 2 )
#define	ZOMBIE		( CONTROL + 3 )
#define	UFOAD		( CONTROL + 4 )
#define IWAIT		( CONTROL + 5 )

#define	IFOAD_MAGIC	0xF0AD	/* of course */
#define	ZOMBIE_MAGIC	(~0xDEAD)	/* not dead -> zombie */
#define	UFOAD_MAGIC	0xD1E	/* kill-your-neighbour */
#define	IWAIT_MAGIC	0xB1DE	/* Bide your time */

#endif

/*********** end of file ***********/

drivers/char/rio/defaults.h

deleted100644 → 0
+0 −51
Original line number Diff line number Diff line

/****************************************************************************
 *******                                                              *******
 *******                     D E F A U L T S
 *******                                                              *******
 ****************************************************************************

 Author  : Ian Nandhra
 Date    :

 *
 *  (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 lint
#ifdef SCCS
static char *_rio_defaults_h_sccs = "@(#)defaults.h	1.1";
#endif
#endif


#define MILLISECOND           (int) (1000/64)	/* 15.625 low ticks */
#define SECOND                (int) 15625	/* Low priority ticks */

#define LINK_TIMEOUT          (int) (POLL_PERIOD / 2)


/*********** end of file ***********/

drivers/char/rio/error.h

deleted100644 → 0
+0 −82
Original line number Diff line number Diff line

/****************************************************************************
 *******                                                              *******
 *******     E R R O R  H E A D E R   F I L E
 *******                                                              *******
 ****************************************************************************

 Author  : Ian Nandhra
 Date    :

 *
 *  (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 lint
/* static char *_rio_error_h_sccs = "@(#)error.h	1.3"; */
#endif

#define E_NO_ERROR                       ((ushort) 0)
#define E_PROCESS_NOT_INIT               ((ushort) 1)
#define E_LINK_TIMEOUT                   ((ushort) 2)
#define E_NO_ROUTE                       ((ushort) 3)
#define E_CONFUSED                       ((ushort) 4)
#define E_HOME                           ((ushort) 5)
#define E_CSUM_FAIL                      ((ushort) 6)
#define E_DISCONNECTED                   ((ushort) 7)
#define E_BAD_RUP                        ((ushort) 8)
#define E_NO_VIRGIN                      ((ushort) 9)
#define E_BOOT_RUP_BUSY                  ((ushort) 10)



    /*************************************************
     * Parsed to mem_halt()
     ************************************************/
#define E_CHANALLOC                      ((ushort) 0x80)
#define E_POLL_ALLOC                     ((ushort) 0x81)
#define E_LTTWAKE                        ((ushort) 0x82)
#define E_LTT_ALLOC                      ((ushort) 0x83)
#define E_LRT_ALLOC                      ((ushort) 0x84)
#define E_CIRRUS                         ((ushort) 0x85)
#define E_MONITOR                        ((ushort) 0x86)
#define E_PHB_ALLOC                      ((ushort) 0x87)
#define E_ARRAY_ALLOC                    ((ushort) 0x88)
#define E_QBUF_ALLOC                     ((ushort) 0x89)
#define E_PKT_ALLOC                      ((ushort) 0x8a)
#define E_GET_TX_Q_BUF                   ((ushort) 0x8b)
#define E_GET_RX_Q_BUF                   ((ushort) 0x8c)
#define E_MEM_OUT                        ((ushort) 0x8d)
#define E_MMU_INIT                       ((ushort) 0x8e)
#define E_LTT_INIT                       ((ushort) 0x8f)
#define E_LRT_INIT                       ((ushort) 0x90)
#define E_LINK_RUN                       ((ushort) 0x91)
#define E_MONITOR_ALLOC                  ((ushort) 0x92)
#define E_MONITOR_INIT                   ((ushort) 0x93)
#define E_POLL_INIT                      ((ushort) 0x94)


/*********** end of file ***********/
Loading