aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-03-24 06:18:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:29 -0500
commit27c6e526f34760a9c48a90112242b7165064fa85 (patch)
tree40505dbe2ab69e7f8077c7473984deecff0203f3 /drivers/char
parentb6c6b6021ec735bd105e130ac1ee1606575f74c3 (diff)
[PATCH] rio driver rework continued #1
More header cleanups, strip out typedefs and remove cruft. There are a lot of magic macros that can go and also a great deal of abuse of volatile that is not needed any more as this patch set cleans up the misuse of pointer access to ISA and PCI space. It now builds cleanly on 64bit, although there is more work left to do Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/rio/cmdpkt.h48
-rw-r--r--drivers/char/rio/daemon.h67
-rw-r--r--drivers/char/rio/host.h56
-rw-r--r--drivers/char/rio/link.h4
-rw-r--r--drivers/char/rio/linux_compat.h41
-rw-r--r--drivers/char/rio/port.h2
-rw-r--r--drivers/char/rio/riodrvr.h48
-rw-r--r--drivers/char/rio/rup.h4
-rw-r--r--drivers/char/rio/top.h4
-rw-r--r--drivers/char/rio/typdef.h11
10 files changed, 118 insertions, 167 deletions
diff --git a/drivers/char/rio/cmdpkt.h b/drivers/char/rio/cmdpkt.h
index b6445d3f1416..357ae5722436 100644
--- a/drivers/char/rio/cmdpkt.h
+++ b/drivers/char/rio/cmdpkt.h
@@ -118,45 +118,45 @@ struct PktCmd_M {
118 union { 118 union {
119 struct { 119 struct {
120 struct { 120 struct {
121 uchar PcCommand; 121 u8 PcCommand;
122 union { 122 union {
123 uchar PcPhbNum; 123 u8 PcPhbNum;
124 uchar PcLinkNum; 124 u8 PcLinkNum;
125 uchar PcIDNum; 125 u8 PcIDNum;
126 } U0; 126 } U0;
127 } CmdHdr; 127 } CmdHdr;
128 struct { 128 struct {
129 ushort NumPackets; 129 u16 NumPackets;
130 ushort LoadBase; 130 u16 LoadBase;
131 ushort CodeSize; 131 u16 CodeSize;
132 } PcBootSequence; 132 } PcBootSequence;
133 } S1; 133 } S1;
134 struct { 134 struct {
135 ushort PcSequence; 135 u16 PcSequence;
136 uchar PcBootData[RTA_BOOT_DATA_SIZE]; 136 u8 PcBootData[RTA_BOOT_DATA_SIZE];
137 } S2; 137 } S2;
138 struct { 138 struct {
139 ushort __crud__; 139 u16 __crud__;
140 uchar PcUniqNum[4]; /* this is really a uint. */ 140 u8 PcUniqNum[4]; /* this is really a uint. */
141 uchar PcModuleTypes; /* what modules are fitted */ 141 u8 PcModuleTypes; /* what modules are fitted */
142 } S3; 142 } S3;
143 struct { 143 struct {
144 ushort __cmd_hdr__; 144 u16 __cmd_hdr__;
145 uchar __undefined__; 145 u8 __undefined__;
146 uchar PcModemStatus; 146 u8 PcModemStatus;
147 uchar PcPortStatus; 147 u8 PcPortStatus;
148 uchar PcSubCommand; 148 u8 PcSubCommand;
149 ushort PcSubAddr; 149 u16 PcSubAddr;
150 uchar PcSubData[64]; 150 u8 PcSubData[64];
151 } S4; 151 } S4;
152 struct { 152 struct {
153 ushort __cmd_hdr__; 153 u16 __cmd_hdr__;
154 uchar PcCommandText[1]; 154 u8 PcCommandText[1];
155 uchar __crud__[20]; 155 u8 __crud__[20];
156 uchar PcIDNum2; /* Tacked on end */ 156 u8 PcIDNum2; /* Tacked on end */
157 } S5; 157 } S5;
158 struct { 158 struct {
159 ushort __cmd_hdr__; 159 u16 __cmd_hdr__;
160 struct Top Topology[LINKS_PER_UNIT]; 160 struct Top Topology[LINKS_PER_UNIT];
161 } S6; 161 } S6;
162 } U1; 162 } U1;
diff --git a/drivers/char/rio/daemon.h b/drivers/char/rio/daemon.h
index 28a991bd4fe6..5818a8aa46e0 100644
--- a/drivers/char/rio/daemon.h
+++ b/drivers/char/rio/daemon.h
@@ -45,15 +45,15 @@ static char *_daemon_h_sccs_ = "@(#)daemon.h 1.3";
45*/ 45*/
46 46
47struct Error { 47struct Error {
48 uint Error; 48 unsigned int Error;
49 uint Entry; 49 unsigned int Entry;
50 uint Other; 50 unsigned int Other;
51}; 51};
52 52
53struct DownLoad { 53struct DownLoad {
54 char *DataP; 54 char *DataP;
55 uint Count; 55 unsigned int Count;
56 uint ProductCode; 56 unsigned int ProductCode;
57}; 57};
58 58
59/* 59/*
@@ -68,69 +68,64 @@ struct DownLoad {
68#endif 68#endif
69 69
70struct PortSetup { 70struct PortSetup {
71 uint From; /* Set/Clear XP & IXANY Control from this port.... */ 71 unsigned int From; /* Set/Clear XP & IXANY Control from this port.... */
72 uint To; /* .... to this port */ 72 unsigned int To; /* .... to this port */
73 uint XpCps; /* at this speed */ 73 unsigned int XpCps; /* at this speed */
74 char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */ 74 char XpOn[MAX_XP_CTRL_LEN]; /* this is the start string */
75 char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */ 75 char XpOff[MAX_XP_CTRL_LEN]; /* this is the stop string */
76 uchar IxAny; /* enable/disable IXANY */ 76 u8 IxAny; /* enable/disable IXANY */
77 uchar IxOn; /* enable/disable IXON */ 77 u8 IxOn; /* enable/disable IXON */
78 uchar Lock; /* lock port params */ 78 u8 Lock; /* lock port params */
79 uchar Store; /* store params across closes */ 79 u8 Store; /* store params across closes */
80 uchar Drain; /* close only when drained */ 80 u8 Drain; /* close only when drained */
81}; 81};
82 82
83struct LpbReq { 83struct LpbReq {
84 uint Host; 84 unsigned int Host;
85 uint Link; 85 unsigned int Link;
86 struct LPB *LpbP; 86 struct LPB *LpbP;
87}; 87};
88 88
89struct RupReq { 89struct RupReq {
90 uint HostNum; 90 unsigned int HostNum;
91 uint RupNum; 91 unsigned int RupNum;
92 struct RUP *RupP; 92 struct RUP *RupP;
93}; 93};
94 94
95struct PortReq { 95struct PortReq {
96 uint SysPort; 96 unsigned int SysPort;
97 struct Port *PortP; 97 struct Port *PortP;
98}; 98};
99 99
100struct StreamInfo { 100struct StreamInfo {
101 uint SysPort; 101 unsigned int SysPort;
102#if 0
103 queue_t RQueue;
104 queue_t WQueue;
105#else
106 int RQueue; 102 int RQueue;
107 int WQueue; 103 int WQueue;
108#endif
109}; 104};
110 105
111struct HostReq { 106struct HostReq {
112 uint HostNum; 107 unsigned int HostNum;
113 struct Host *HostP; 108 struct Host *HostP;
114}; 109};
115 110
116struct HostDpRam { 111struct HostDpRam {
117 uint HostNum; 112 unsigned int HostNum;
118 struct DpRam *DpRamP; 113 struct DpRam *DpRamP;
119}; 114};
120 115
121struct DebugCtrl { 116struct DebugCtrl {
122 uint SysPort; 117 unsigned int SysPort;
123 uint Debug; 118 unsigned int Debug;
124 uint Wait; 119 unsigned int Wait;
125}; 120};
126 121
127struct MapInfo { 122struct MapInfo {
128 uint FirstPort; /* 8 ports, starting from this (tty) number */ 123 unsigned int FirstPort; /* 8 ports, starting from this (tty) number */
129 uint RtaUnique; /* reside on this RTA (unique number) */ 124 unsigned int RtaUnique; /* reside on this RTA (unique number) */
130}; 125};
131 126
132struct MapIn { 127struct MapIn {
133 uint NumEntries; /* How many port sets are we mapping? */ 128 unsigned int NumEntries; /* How many port sets are we mapping? */
134 struct MapInfo *MapInfoP; /* Pointer to (user space) info */ 129 struct MapInfo *MapInfoP; /* Pointer to (user space) info */
135}; 130};
136 131
@@ -147,13 +142,13 @@ struct SpecialRupCmd {
147}; 142};
148 143
149struct IdentifyRta { 144struct IdentifyRta {
150 ulong RtaUnique; 145 unsigned long RtaUnique;
151 uchar ID; 146 u8 ID;
152}; 147};
153 148
154struct KillNeighbour { 149struct KillNeighbour {
155 ulong UniqueNum; 150 unsigned long UniqueNum;
156 uchar Link; 151 u8 Link;
157}; 152};
158 153
159struct rioVersion { 154struct rioVersion {
diff --git a/drivers/char/rio/host.h b/drivers/char/rio/host.h
index f7dfcedf7d45..79a55301f06b 100644
--- a/drivers/char/rio/host.h
+++ b/drivers/char/rio/host.h
@@ -50,22 +50,20 @@ static char *_host_h_sccs_ = "@(#)host.h 1.2";
50** the host. 50** the host.
51*/ 51*/
52struct Host { 52struct Host {
53 uchar Type; /* RIO_EISA, RIO_MCA, ... */ 53 unsigned char Type; /* RIO_EISA, RIO_MCA, ... */
54 uchar Ivec; /* POLLED or ivec number */ 54 unsigned char Ivec; /* POLLED or ivec number */
55 uchar Mode; /* Control stuff */ 55 unsigned char Mode; /* Control stuff */
56 uchar Slot; /* Slot */ 56 unsigned char Slot; /* Slot */
57 volatile caddr_t Caddr; /* KV address of DPRAM */ 57 caddr_t Caddr; /* KV address of DPRAM */
58 volatile struct DpRam *CardP; /* KV address of DPRAM, with overlay */ 58 struct DpRam *CardP; /* KV address of DPRAM, with overlay */
59 paddr_t PaddrP; /* Phys. address of DPRAM */ 59 paddr_t PaddrP; /* Phys. address of DPRAM */
60 char Name[MAX_NAME_LEN]; /* The name of the host */ 60 char Name[MAX_NAME_LEN]; /* The name of the host */
61 uint UniqueNum; /* host unique number */ 61 unsigned int UniqueNum; /* host unique number */
62 spinlock_t HostLock; /* Lock structure for MPX */ 62 spinlock_t HostLock; /* Lock structure for MPX */
63 /*struct pci_devinfo PciDevInfo; *//* PCI Bus/Device/Function stuff */ 63 unsigned int WorkToBeDone; /* set to true each interrupt */
64 /*struct lockb HostLock; *//* Lock structure for MPX */ 64 unsigned int InIntr; /* Being serviced? */
65 uint WorkToBeDone; /* set to true each interrupt */ 65 unsigned int IntSrvDone; /* host's interrupt has been serviced */
66 uint InIntr; /* Being serviced? */ 66 void (*Copy) (void *, void *, int); /* copy func */
67 uint IntSrvDone; /* host's interrupt has been serviced */
68 int (*Copy) (caddr_t, caddr_t, int); /* copy func */
69 struct timer_list timer; 67 struct timer_list timer;
70 /* 68 /*
71 ** I M P O R T A N T ! 69 ** I M P O R T A N T !
@@ -74,7 +72,7 @@ struct Host {
74 ** a RIO_HOST_FOAD command. 72 ** a RIO_HOST_FOAD command.
75 */ 73 */
76 74
77 ulong Flags; /* Whats going down */ 75 unsigned long Flags; /* Whats going down */
78#define RC_WAITING 0 76#define RC_WAITING 0
79#define RC_STARTUP 1 77#define RC_STARTUP 1
80#define RC_RUNNING 2 78#define RC_RUNNING 2
@@ -88,28 +86,28 @@ struct Host {
88** Boot mode applies to the way in which hosts in this system will 86** Boot mode applies to the way in which hosts in this system will
89** boot RTAs 87** boot RTAs
90*/ 88*/
91#define RC_BOOT_ALL 0x8 /* Boot all RTAs attached */ 89#define RC_BOOT_ALL 0x8 /* Boot all RTAs attached */
92#define RC_BOOT_OWN 0x10 /* Only boot RTAs bound to this system */ 90#define RC_BOOT_OWN 0x10 /* Only boot RTAs bound to this system */
93#define RC_BOOT_NONE 0x20 /* Don't boot any RTAs (slave mode) */ 91#define RC_BOOT_NONE 0x20 /* Don't boot any RTAs (slave mode) */
94 92
95 struct Top Topology[LINKS_PER_UNIT]; /* one per link */ 93 struct Top Topology[LINKS_PER_UNIT]; /* one per link */
96 struct Map Mapping[MAX_RUP]; /* Mappings for host */ 94 struct Map Mapping[MAX_RUP]; /* Mappings for host */
97 struct PHB *PhbP; /* Pointer to the PHB array */ 95 struct PHB *PhbP; /* Pointer to the PHB array */
98 ushort *PhbNumP; /* Ptr to Number of PHB's */ 96 unsigned short *PhbNumP; /* Ptr to Number of PHB's */
99 struct LPB *LinkStrP; /* Link Structure Array */ 97 struct LPB *LinkStrP; /* Link Structure Array */
100 struct RUP *RupP; /* Sixteen real rups here */ 98 struct RUP *RupP; /* Sixteen real rups here */
101 struct PARM_MAP *ParmMapP; /* points to the parmmap */ 99 struct PARM_MAP *ParmMapP; /* points to the parmmap */
102 uint ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */ 100 unsigned int ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
103 uint NumExtraBooted; /* how many of the above */ 101 unsigned int NumExtraBooted; /* how many of the above */
104 /* 102 /*
105 ** Twenty logical rups. 103 ** Twenty logical rups.
106 ** The first sixteen are the real Rup entries (above), the last four 104 ** The first sixteen are the real Rup entries (above), the last four
107 ** are the link RUPs. 105 ** are the link RUPs.
108 */ 106 */
109 struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT]; 107 struct UnixRup UnixRups[MAX_RUP + LINKS_PER_UNIT];
110 int timeout_id; /* For calling 100 ms delays */ 108 int timeout_id; /* For calling 100 ms delays */
111 int timeout_sem; /* For calling 100 ms delays */ 109 int timeout_sem; /* For calling 100 ms delays */
112 long locks; /* long req'd for set_bit --RR */ 110 long locks; /* long req'd for set_bit --RR */
113 char ____end_marker____; 111 char ____end_marker____;
114}; 112};
115#define Control CardP->DpControl 113#define Control CardP->DpControl
diff --git a/drivers/char/rio/link.h b/drivers/char/rio/link.h
index 6a64b5a5b3d0..87a87b1ec01d 100644
--- a/drivers/char/rio/link.h
+++ b/drivers/char/rio/link.h
@@ -68,8 +68,8 @@ struct LPB {
68 u16 mon_ltt; 68 u16 mon_ltt;
69 u16 mon_lrt; 69 u16 mon_lrt;
70 u16 WaitNoBoot; /* Secs to hold off booting */ 70 u16 WaitNoBoot; /* Secs to hold off booting */
71 PKT_ptr add_packet_list; /* Add packets to here */ 71 u16 add_packet_list; /* Add packets to here */
72 PKT_ptr remove_packet_list; /* Send packets from here */ 72 u16 remove_packet_list; /* Send packets from here */
73 73
74 Channel_ptr lrt_fail_chan; /* Lrt's failure channel */ 74 Channel_ptr lrt_fail_chan; /* Lrt's failure channel */
75 Channel_ptr ltt_fail_chan; /* Ltt's failure channel */ 75 Channel_ptr ltt_fail_chan; /* Ltt's failure channel */
diff --git a/drivers/char/rio/linux_compat.h b/drivers/char/rio/linux_compat.h
index 17a14c4a3420..ebbe3ea873e8 100644
--- a/drivers/char/rio/linux_compat.h
+++ b/drivers/char/rio/linux_compat.h
@@ -19,56 +19,16 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20 20
21 21
22#define disable(oldspl) save_flags (oldspl)
23#define restore(oldspl) restore_flags (oldspl)
24
25#define sysbrk(x) kmalloc ((x),in_interrupt()? GFP_ATOMIC : GFP_KERNEL)
26#define sysfree(p,size) kfree ((p))
27
28#define WBYTE(p,v) writeb(v, &p)
29#define RBYTE(p) readb (&p)
30#define WWORD(p,v) writew(v, &p)
31#define RWORD(p) readw(&p)
32#define WINDW(p,v) writew(v, p)
33#define RINDW(p) readw(p)
34
35#define DEBUG_ALL 22#define DEBUG_ALL
36 23
37#define cprintf printk
38
39#ifdef __KERNEL__
40#define INKERNEL
41#endif
42
43struct ttystatics { 24struct ttystatics {
44 struct termios tm; 25 struct termios tm;
45}; 26};
46 27
47#define bzero(d, n) memset((d), 0, (n))
48#define bcopy(src, dest, n) memcpy ((dest), (src), (n)) 28#define bcopy(src, dest, n) memcpy ((dest), (src), (n))
49 29
50#define SEM_SIGIGNORE 0x1234 30#define SEM_SIGIGNORE 0x1234
51 31
52#ifdef DEBUG_SEM
53#define swait(a,b) printk ("waiting: " __FILE__ " line %d\n", __LINE__)
54#define ssignal(sem) printk ("signalling: " __FILE__ " line %d\n", __LINE__)
55
56#define sreset(sem) printk ("sreset: " __FILE__ "\n")
57#define sem_init(sem,v) printk ("sreset: " __FILE__ "\n")
58#endif
59
60
61#define getpid() (current->pid)
62
63#define QSIZE SERIAL_XMIT_SIZE
64
65#define pseterr(errno) return (- errno)
66
67#define V_CBAUD CBAUD
68
69/* For one reason or another rioboot.c uses delay instead of RIODelay. */
70#define delay(x,y) RIODelay(NULL, y)
71
72extern int rio_debug; 32extern int rio_debug;
73 33
74#define RIO_DEBUG_INIT 0x000001 34#define RIO_DEBUG_INIT 0x000001
@@ -91,6 +51,7 @@ extern int rio_debug;
91#define RIO_DEBUG_DELAY 0x020000 51#define RIO_DEBUG_DELAY 0x020000
92#define RIO_DEBUG_MOD_COUNT 0x040000 52#define RIO_DEBUG_MOD_COUNT 0x040000
93 53
54
94/* Copied over from riowinif.h . This is ugly. The winif file declares 55/* Copied over from riowinif.h . This is ugly. The winif file declares
95also much other stuff which is incompatible with the headers from 56also much other stuff which is incompatible with the headers from
96the older driver. The older driver includes "brates.h" which shadows 57the older driver. The older driver includes "brates.h" which shadows
diff --git a/drivers/char/rio/port.h b/drivers/char/rio/port.h
index 4f1108fe9b1a..9b5fa3eb0402 100644
--- a/drivers/char/rio/port.h
+++ b/drivers/char/rio/port.h
@@ -40,7 +40,7 @@ struct Port {
40 struct gs_port gs; 40 struct gs_port gs;
41 int PortNum; /* RIO port no., 0-511 */ 41 int PortNum; /* RIO port no., 0-511 */
42 struct Host *HostP; 42 struct Host *HostP;
43 volatile caddr_t Caddr; 43 caddr_t Caddr;
44 unsigned short HostPort; /* Port number on host card */ 44 unsigned short HostPort; /* Port number on host card */
45 unsigned char RupNum; /* Number of RUP for port */ 45 unsigned char RupNum; /* Number of RUP for port */
46 unsigned char ID2; /* Second ID of RTA for port */ 46 unsigned char ID2; /* Second ID of RTA for port */
diff --git a/drivers/char/rio/riodrvr.h b/drivers/char/rio/riodrvr.h
index 663ee0914ed7..3cffe275f216 100644
--- a/drivers/char/rio/riodrvr.h
+++ b/drivers/char/rio/riodrvr.h
@@ -72,42 +72,42 @@ struct rio_info {
72*/ 72*/
73 int RIOHalted; /* halted ? */ 73 int RIOHalted; /* halted ? */
74 int RIORtaDisCons; /* RTA connections/disconnections */ 74 int RIORtaDisCons; /* RTA connections/disconnections */
75 uint RIOReadCheck; /* Rio read check */ 75 unsigned int RIOReadCheck; /* Rio read check */
76 uint RIONoMessage; /* To display message or not */ 76 unsigned int RIONoMessage; /* To display message or not */
77 uint RIONumBootPkts; /* how many packets for an RTA */ 77 unsigned int RIONumBootPkts; /* how many packets for an RTA */
78 uint RIOBootCount; /* size of RTA code */ 78 unsigned int RIOBootCount; /* size of RTA code */
79 uint RIOBooting; /* count of outstanding boots */ 79 unsigned int RIOBooting; /* count of outstanding boots */
80 uint RIOSystemUp; /* Booted ?? */ 80 unsigned int RIOSystemUp; /* Booted ?? */
81 uint RIOCounting; /* for counting interrupts */ 81 unsigned int RIOCounting; /* for counting interrupts */
82 uint RIOIntCount; /* # of intr since last check */ 82 unsigned int RIOIntCount; /* # of intr since last check */
83 uint RIOTxCount; /* number of xmit intrs */ 83 unsigned int RIOTxCount; /* number of xmit intrs */
84 uint RIORxCount; /* number of rx intrs */ 84 unsigned int RIORxCount; /* number of rx intrs */
85 uint RIORupCount; /* number of rup intrs */ 85 unsigned int RIORupCount; /* number of rup intrs */
86 int RIXTimer; 86 int RIXTimer;
87 int RIOBufferSize; /* Buffersize */ 87 int RIOBufferSize; /* Buffersize */
88 int RIOBufferMask; /* Buffersize */ 88 int RIOBufferMask; /* Buffersize */
89 89
90 int RIOFirstMajor; /* First host card's major no */ 90 int RIOFirstMajor; /* First host card's major no */
91 91
92 uint RIOLastPortsMapped; /* highest port number known */ 92 unsigned int RIOLastPortsMapped; /* highest port number known */
93 uint RIOFirstPortsMapped; /* lowest port number known */ 93 unsigned int RIOFirstPortsMapped; /* lowest port number known */
94 94
95 uint RIOLastPortsBooted; /* highest port number running */ 95 unsigned int RIOLastPortsBooted; /* highest port number running */
96 uint RIOFirstPortsBooted; /* lowest port number running */ 96 unsigned int RIOFirstPortsBooted; /* lowest port number running */
97 97
98 uint RIOLastPortsOpened; /* highest port number running */ 98 unsigned int RIOLastPortsOpened; /* highest port number running */
99 uint RIOFirstPortsOpened; /* lowest port number running */ 99 unsigned int RIOFirstPortsOpened; /* lowest port number running */
100 100
101 /* Flag to say that the topology information has been changed. */ 101 /* Flag to say that the topology information has been changed. */
102 uint RIOQuickCheck; 102 unsigned int RIOQuickCheck;
103 uint CdRegister; /* ??? */ 103 unsigned int CdRegister; /* ??? */
104 int RIOSignalProcess; /* Signalling process */ 104 int RIOSignalProcess; /* Signalling process */
105 int rio_debug; /* To debug ... */ 105 int rio_debug; /* To debug ... */
106 int RIODebugWait; /* For what ??? */ 106 int RIODebugWait; /* For what ??? */
107 int tpri; /* Thread prio */ 107 int tpri; /* Thread prio */
108 int tid; /* Thread id */ 108 int tid; /* Thread id */
109 uint _RIO_Polled; /* Counter for polling */ 109 unsigned int _RIO_Polled; /* Counter for polling */
110 uint _RIO_Interrupted; /* Counter for interrupt */ 110 unsigned int _RIO_Interrupted; /* Counter for interrupt */
111 int intr_tid; /* iointset return value */ 111 int intr_tid; /* iointset return value */
112 int TxEnSem; /* TxEnable Semaphore */ 112 int TxEnSem; /* TxEnable Semaphore */
113 113
@@ -121,9 +121,9 @@ struct rio_info {
121 struct Map RIOSavedTable[TOTAL_MAP_ENTRIES]; 121 struct Map RIOSavedTable[TOTAL_MAP_ENTRIES];
122 122
123 /* RTA to host binding table for master/slave operation */ 123 /* RTA to host binding table for master/slave operation */
124 ulong RIOBindTab[MAX_RTA_BINDINGS]; 124 unsigned long RIOBindTab[MAX_RTA_BINDINGS];
125 /* RTA memory dump variable */ 125 /* RTA memory dump variable */
126 uchar RIOMemDump[MEMDUMP_SIZE]; 126 unsigned char RIOMemDump[MEMDUMP_SIZE];
127 struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES]; 127 struct ModuleInfo RIOModuleTypes[MAX_MODULE_TYPES];
128 128
129}; 129};
@@ -138,7 +138,5 @@ struct rio_info {
138 138
139 139
140#define RIO_RESET_INT 0x7d80 140#define RIO_RESET_INT 0x7d80
141#define WRBYTE(x,y) *(volatile unsigned char *)((x)) = \
142 (unsigned char)(y)
143 141
144#endif /* __riodrvr.h */ 142#endif /* __riodrvr.h */
diff --git a/drivers/char/rio/rup.h b/drivers/char/rio/rup.h
index 40c617436bd1..4ae90cb207a9 100644
--- a/drivers/char/rio/rup.h
+++ b/drivers/char/rio/rup.h
@@ -53,8 +53,8 @@
53#define RUP_NO_OWNER 0xff /* RUP not owned by any process */ 53#define RUP_NO_OWNER 0xff /* RUP not owned by any process */
54 54
55struct RUP { 55struct RUP {
56 PKT_ptr txpkt; /* Outgoing packet */ 56 u16 txpkt; /* Outgoing packet */
57 PKT_ptr rxpkt; /* Incoming packet */ 57 u16 rxpkt; /* Incoming packet */
58 u16 link; /* Which link to send down? */ 58 u16 link; /* Which link to send down? */
59 u8 rup_dest_unit[2]; /* Destination unit */ 59 u8 rup_dest_unit[2]; /* Destination unit */
60 u16 handshake; /* For handshaking */ 60 u16 handshake; /* For handshaking */
diff --git a/drivers/char/rio/top.h b/drivers/char/rio/top.h
index d15a11dc4f73..fe60430cf099 100644
--- a/drivers/char/rio/top.h
+++ b/drivers/char/rio/top.h
@@ -41,8 +41,8 @@ static char *_top_h_sccs_ = "@(#)top.h 1.2";
41** Topology information 41** Topology information
42*/ 42*/
43struct Top { 43struct Top {
44 uchar Unit; 44 u8 Unit;
45 uchar Link; 45 u8 Link;
46}; 46};
47 47
48#endif /* __rio_top_h__ */ 48#endif /* __rio_top_h__ */
diff --git a/drivers/char/rio/typdef.h b/drivers/char/rio/typdef.h
index 840c2498a59d..f40c1df7db1f 100644
--- a/drivers/char/rio/typdef.h
+++ b/drivers/char/rio/typdef.h
@@ -39,10 +39,10 @@
39** These types are ONLY to be used for refering to data structures 39** These types are ONLY to be used for refering to data structures
40** on the RIO Host card! 40** on the RIO Host card!
41*/ 41*/
42typedef volatile u8 BYTE; 42typedef u8 BYTE;
43typedef volatile u16 WORD; 43typedef u16 WORD;
44typedef volatile u32 DWORD; 44typedef u32 DWORD;
45typedef volatile u16 RIOP; 45typedef u16 RIOP;
46 46
47 47
48/* 48/*
@@ -57,8 +57,7 @@ typedef unsigned short ushort_t;
57typedef unsigned char uchar_t; 57typedef unsigned char uchar_t;
58typedef unsigned char queue_t; 58typedef unsigned char queue_t;
59typedef unsigned char mblk_t; 59typedef unsigned char mblk_t;
60typedef unsigned int paddr_t; 60typedef unsigned long paddr_t;
61typedef unsigned char uchar;
62 61
63#define TPNULL ((ushort)(0x8000)) 62#define TPNULL ((ushort)(0x8000))
64 63