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 Alan Cox <[email protected]>
drivers/char/rio/bootpkt.h +0 -61
@@ -1,61 +0,0 @@ - - -/**************************************************************************** -******* ******* -******* 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 ***********/
drivers/char/rio/cirrus.h +1 -109
128 lines not on this page · raw message
drivers/char/rio/control.h +0 -61
61 lines not on this page · raw message
drivers/char/rio/defaults.h +0 -51
51 lines not on this page · raw message
drivers/char/rio/error.h +0 -82
82 lines not on this page · raw message
drivers/char/rio/func.h +2 -5
@@ -49,7 +49,7 @@int RIOBootRup (struct rio_info *,unsigned int ,struct Host *,struct PKT *);int RIOBootOk (struct rio_info *,struct Host *,unsigned long );int RIORtaBound (struct rio_info *,unsigned int ); -void FillSlot (int ,int ,unsigned int ,struct Host *); +void rio_fill_host_slot (int ,int ,unsigned int ,struct Host *);/* riocmd.c */ int RIOFoadRta (struct Host *,struct Map *);
@@ -66,7 +66,6 @@int RIOWFlushMark (unsigned long ,struct CmdBlk *);int RIORFlushEnable (unsigned long ,struct CmdBlk *);int RIOUnUse (unsigned long ,struct CmdBlk *); -void ShowPacket (unsigned int ,struct PKT *);/* rioctrl.c */ int riocontrol (struct rio_info *,dev_t ,int ,caddr_t ,int );
@@ -79,13 +78,11 @@int RIODoAT (struct rio_info *,int ,int );caddr_t RIOCheckForATCard (int );int RIOAssignAT (struct rio_info *,int ,caddr_t ,int ); -int RIOBoardTest (paddr_t ,caddr_t ,unsigned char ,int ); +int RIOBoardTest (unsigned long ,caddr_t ,unsigned char ,int );void RIOAllocDataStructs (struct rio_info *);void RIOSetupDataStructs (struct rio_info *);int RIODefaultName (struct rio_info *,struct Host *,unsigned int );struct rioVersion *RIOVersid (void ); -int RIOMapin (paddr_t ,int ,caddr_t *); -void RIOMapout (paddr_t ,long ,caddr_t );void RIOHostReset (unsigned int ,struct DpRam *,unsigned int );/* riointr.c */
drivers/char/rio/host.h +1 -1
@@ -56,7 +56,7 @@unsigned char Slot;/* Slot */ caddr_t Caddr;/* KV address of DPRAM */ struct DpRam *CardP;/* KV address of DPRAM, with overlay */ -paddr_t PaddrP;/* Phys. address of DPRAM */ +unsigned long PaddrP;/* Phys. address of DPRAM */ char Name[MAX_NAME_LEN ];/* The name of the host */ unsigned int UniqueNum;/* host unique number */ spinlock_t HostLock;/* Lock structure for MPX */
drivers/char/rio/link.h +6 -6
@@ -50,8 +50,8 @@struct LPB {u16 link_number;/* Link Number */ -Channel_ptr in_ch;/* Link In Channel */ -Channel_ptr out_ch;/* Link Out Channel */ +u16 in_ch;/* Link In Channel */ +u16 out_ch;/* Link Out Channel */ u8 attached_serial[4 ];/* Attached serial number */ u8 attached_host_serial[4 ];/* Serial number of Host who
@@ -59,8 +59,8 @@u16 descheduled;/* Currently Descheduled */ u16 state;/* Current state */ u16 send_poll;/* Send a Poll Packet */ -Process_ptr ltt_p;/* Process Descriptor */ -Process_ptr lrt_p;/* Process Descriptor */ +u16 ltt_p;/* Process Descriptor */ +u16 lrt_p;/* Process Descriptor */ u16 lrt_status;/* Current lrt status */ u16 ltt_status;/* Current ltt status */ u16 timeout;/* Timeout value */
@@ -71,8 +71,8 @@u16 add_packet_list;/* Add packets to here */ u16 remove_packet_list;/* Send packets from here */ -Channel_ptr lrt_fail_chan;/* Lrt's failure channel */ -Channel_ptr ltt_fail_chan;/* Ltt's failure channel */ +u16 lrt_fail_chan;/* Lrt's failure channel */ +u16 ltt_fail_chan;/* Ltt's failure channel */ /* RUP structure for HOST to driver communications */ struct RUP rup;
drivers/char/rio/linux_compat.h +0 -4
@@ -25,10 +25,6 @@struct termios tm; }; -#define bcopy (src, dest, n) memcpy ((dest), (src), (n)) - -#define SEM_SIGIGNORE 0x1234 -extern int rio_debug;#define RIO_DEBUG_INIT 0x000001
drivers/char/rio/list.h +0 -56
56 lines not on this page · raw message
drivers/char/rio/map.h +6 -6
@@ -47,17 +47,17 @@#define MAX_NAME_LEN 32struct Map { -uint HostUniqueNum;/* Supporting hosts unique number */ -uint RtaUniqueNum;/* Unique number */ +unsigned int HostUniqueNum;/* Supporting hosts unique number */ +unsigned int RtaUniqueNum;/* Unique number */ /* ** The next two IDs must be swapped on big-endian architectures ** when using a v2.04 /etc/rio/config with a v3.00 driver (when ** upgrading for example). */ -ushort ID;/* ID used in the subnet */ -ushort ID2;/* ID of 2nd block of 8 for 16 port */ -ulong Flags;/* Booted, ID Given, Disconnected */ -ulong SysPort;/* First tty mapped to this port */ +unsigned short ID;/* ID used in the subnet */ +unsigned short ID2;/* ID of 2nd block of 8 for 16 port */ +unsigned long Flags;/* Booted, ID Given, Disconnected */ +unsigned long SysPort;/* First tty mapped to this port */ struct Top Topology[LINKS_PER_UNIT ];/* ID connected to each link */ char Name[MAX_NAME_LEN ];/* Cute name by which RTA is known */ };
drivers/char/rio/param.h +12 -12
@@ -43,18 +43,18 @@*/ struct phb_param { -BYTE Cmd;/* It is very important that these line up */ -BYTE Cor1;/* with what is expected at the other end. */ -BYTE Cor2;/* to confirm that you've got it right, */ -BYTE Cor4;/* check with cirrus/cirrus.h */ -BYTE Cor5; -BYTE TxXon;/* Transmit X-On character */ -BYTE TxXoff;/* Transmit X-Off character */ -BYTE RxXon;/* Receive X-On character */ -BYTE RxXoff;/* Receive X-Off character */ -BYTE LNext;/* Literal-next character */ -BYTE TxBaud;/* Transmit baudrate */ -BYTE RxBaud;/* Receive baudrate */ +u8 Cmd;/* It is very important that these line up */ +u8 Cor1;/* with what is expected at the other end. */ +u8 Cor2;/* to confirm that you've got it right, */ +u8 Cor4;/* check with cirrus/cirrus.h */ +u8 Cor5; +u8 TxXon;/* Transmit X-On character */ +u8 TxXoff;/* Transmit X-Off character */ +u8 RxXon;/* Receive X-On character */ +u8 RxXoff;/* Receive X-Off character */ +u8 LNext;/* Literal-next character */ +u8 TxBaud;/* Transmit baudrate */ +u8 RxBaud;/* Receive baudrate */ };#endif
drivers/char/rio/parmmap.h +7 -7
@@ -47,17 +47,17 @@typedef struct PARM_MAP PARM_MAP ;struct PARM_MAP { -PHB_ptr phb_ptr;/* Pointer to the PHB array */ +u16 phb_ptr;/* Pointer to the PHB array */ u16 phb_num_ptr;/* Ptr to Number of PHB's */ -FREE_LIST_ptr free_list;/* Free List pointer */ -FREE_LIST_ptr free_list_end;/* Free List End pointer */ -Q_BUF_ptr_ptr q_free_list_ptr;/* Ptr to Q_BUF variable */ +u16 free_list;/* Free List pointer */ +u16 free_list_end;/* Free List End pointer */ +u16 q_free_list_ptr;/* Ptr to Q_BUF variable */ u16 unit_id_ptr;/* Unit Id */ -LPB_ptr link_str_ptr;/* Link Structure Array */ +u16 link_str_ptr;/* Link Structure Array */ u16 bootloader_1;/* 1st Stage Boot Loader */ u16 bootloader_2;/* 2nd Stage Boot Loader */ u16 port_route_map_ptr;/* Port Route Map */ -ROUTE_STR_ptr route_ptr;/* Unit Route Map */ +u16 route_ptr;/* Unit Route Map */ u16 map_present;/* Route Map present */ s16 pkt_num;/* Total number of packets */ s16 q_num;/* Total number of Q packets */
@@ -70,7 +70,7 @@u16 rx_limit;/* For high / low watermarks */ s16 links;/* Links to use */ s16 timer;/* Interrupts per second */ -RUP_ptr rups;/* Pointer to the RUPs */ +u16 rups;/* Pointer to the RUPs */ u16 max_phb;/* Mostly for debugging */ u16 living;/* Just increments!! */ u16 init_done;/* Initialisation over */
drivers/char/rio/phb.h +1 -1
@@ -117,7 +117,7 @@* the start. The pointer tx_add points to a SPACE to put a Packet. * The pointer tx_remove points to the next Packet to remove *************************************************************************/ -typedef struct PHB PHB ; +struct PHB {u8 source;u8 handshake;
drivers/char/rio/qbuf.h +0 -62
62 lines not on this page · raw message