aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio/rioinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio/rioinit.c')
-rw-r--r--drivers/char/rio/rioinit.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c
index 24d2992154cc..99f3df02b61c 100644
--- a/drivers/char/rio/rioinit.c
+++ b/drivers/char/rio/rioinit.c
@@ -33,7 +33,6 @@
33static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; 33static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
34#endif 34#endif
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/slab.h> 37#include <linux/slab.h>
39#include <linux/errno.h> 38#include <linux/errno.h>
@@ -79,7 +78,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
79 78
80int RIOPCIinit(struct rio_info *p, int Mode); 79int RIOPCIinit(struct rio_info *p, int Mode);
81 80
82static int RIOScrub(int, u8 *, int); 81static int RIOScrub(int, u8 __iomem *, int);
83 82
84 83
85/** 84/**
@@ -92,10 +91,10 @@ static int RIOScrub(int, u8 *, int);
92** bits > 0 indicates 16 bit operation. 91** bits > 0 indicates 16 bit operation.
93*/ 92*/
94 93
95int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode) 94int RIOAssignAT(struct rio_info *p, int Base, void __iomem *virtAddr, int mode)
96{ 95{
97 int bits; 96 int bits;
98 struct DpRam *cardp = (struct DpRam *)virtAddr; 97 struct DpRam __iomem *cardp = (struct DpRam __iomem *)virtAddr;
99 98
100 if ((Base < ONE_MEG) || (mode & BYTE_ACCESS_MODE)) 99 if ((Base < ONE_MEG) || (mode & BYTE_ACCESS_MODE))
101 bits = BYTE_OPERATION; 100 bits = BYTE_OPERATION;
@@ -107,7 +106,7 @@ int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode)
107 ** transient stuff. 106 ** transient stuff.
108 */ 107 */
109 p->RIOHosts[p->RIONumHosts].Caddr = virtAddr; 108 p->RIOHosts[p->RIONumHosts].Caddr = virtAddr;
110 p->RIOHosts[p->RIONumHosts].CardP = (struct DpRam *)virtAddr; 109 p->RIOHosts[p->RIONumHosts].CardP = virtAddr;
111 110
112 /* 111 /*
113 ** Revision 01 AT host cards don't support WORD operations, 112 ** Revision 01 AT host cards don't support WORD operations,
@@ -151,10 +150,10 @@ static u8 val[] = {
151** RAM test a board. 150** RAM test a board.
152** Nothing too complicated, just enough to check it out. 151** Nothing too complicated, just enough to check it out.
153*/ 152*/
154int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slot) 153int RIOBoardTest(unsigned long paddr, void __iomem *caddr, unsigned char type, int slot)
155{ 154{
156 struct DpRam *DpRam = (struct DpRam *)caddr; 155 struct DpRam __iomem *DpRam = caddr;
157 char *ram[4]; 156 void __iomem *ram[4];
158 int size[4]; 157 int size[4];
159 int op, bank; 158 int op, bank;
160 int nbanks; 159 int nbanks;
@@ -179,12 +178,12 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
179 size[2] = DP_SRAM3_SIZE; 178 size[2] = DP_SRAM3_SIZE;
180 size[3] = DP_SCRATCH_SIZE; 179 size[3] = DP_SCRATCH_SIZE;
181 180
182 ram[0] = (char *)&DpRam->DpSram1[0]; 181 ram[0] = DpRam->DpSram1;
183 ram[1] = (char *)&DpRam->DpSram2[0]; 182 ram[1] = DpRam->DpSram2;
184 ram[2] = (char *)&DpRam->DpSram3[0]; 183 ram[2] = DpRam->DpSram3;
185 nbanks = (type == RIO_PCI) ? 3 : 4; 184 nbanks = (type == RIO_PCI) ? 3 : 4;
186 if (nbanks == 4) 185 if (nbanks == 4)
187 ram[3] = (char *)&DpRam->DpScratch[0]; 186 ram[3] = DpRam->DpScratch;
188 187
189 188
190 if (nbanks == 3) { 189 if (nbanks == 3) {
@@ -202,7 +201,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
202 */ 201 */
203 for (op=0; op<TEST_END; op++) { 202 for (op=0; op<TEST_END; op++) {
204 for (bank=0; bank<nbanks; bank++) { 203 for (bank=0; bank<nbanks; bank++) {
205 if (RIOScrub(op, (u8 *)ram[bank], size[bank]) == RIO_FAIL) { 204 if (RIOScrub(op, ram[bank], size[bank]) == RIO_FAIL) {
206 rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n", 205 rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n",
207 bank, op); 206 bank, op);
208 return RIO_FAIL; 207 return RIO_FAIL;
@@ -227,7 +226,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
227** to check that the data from the previous phase was retained. 226** to check that the data from the previous phase was retained.
228*/ 227*/
229 228
230static int RIOScrub(int op, u8 *ram, int size) 229static int RIOScrub(int op, u8 __iomem *ram, int size)
231{ 230{
232 int off; 231 int off;
233 unsigned char oldbyte; 232 unsigned char oldbyte;
@@ -393,7 +392,7 @@ struct rioVersion *RIOVersid(void)
393 return &stVersion; 392 return &stVersion;
394} 393}
395 394
396void RIOHostReset(unsigned int Type, struct DpRam *DpRamP, unsigned int Slot) 395void RIOHostReset(unsigned int Type, struct DpRam __iomem *DpRamP, unsigned int Slot)
397{ 396{
398 /* 397 /*
399 ** Reset the Tpu 398 ** Reset the Tpu