diff options
Diffstat (limited to 'drivers/char/rio/rioinit.c')
-rw-r--r-- | drivers/char/rio/rioinit.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c index 1d73c4646bb..24d2992154c 100644 --- a/drivers/char/rio/rioinit.c +++ b/drivers/char/rio/rioinit.c | |||
@@ -51,15 +51,12 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; | |||
51 | 51 | ||
52 | 52 | ||
53 | #include "linux_compat.h" | 53 | #include "linux_compat.h" |
54 | #include "typdef.h" | ||
55 | #include "pkt.h" | 54 | #include "pkt.h" |
56 | #include "daemon.h" | 55 | #include "daemon.h" |
57 | #include "rio.h" | 56 | #include "rio.h" |
58 | #include "riospace.h" | 57 | #include "riospace.h" |
59 | #include "top.h" | ||
60 | #include "cmdpkt.h" | 58 | #include "cmdpkt.h" |
61 | #include "map.h" | 59 | #include "map.h" |
62 | #include "riotypes.h" | ||
63 | #include "rup.h" | 60 | #include "rup.h" |
64 | #include "port.h" | 61 | #include "port.h" |
65 | #include "riodrvr.h" | 62 | #include "riodrvr.h" |
@@ -72,19 +69,17 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; | |||
72 | #include "unixrup.h" | 69 | #include "unixrup.h" |
73 | #include "board.h" | 70 | #include "board.h" |
74 | #include "host.h" | 71 | #include "host.h" |
75 | #include "error.h" | ||
76 | #include "phb.h" | 72 | #include "phb.h" |
77 | #include "link.h" | 73 | #include "link.h" |
78 | #include "cmdblk.h" | 74 | #include "cmdblk.h" |
79 | #include "route.h" | 75 | #include "route.h" |
80 | #include "control.h" | ||
81 | #include "cirrus.h" | 76 | #include "cirrus.h" |
82 | #include "rioioctl.h" | 77 | #include "rioioctl.h" |
83 | #include "rio_linux.h" | 78 | #include "rio_linux.h" |
84 | 79 | ||
85 | int RIOPCIinit(struct rio_info *p, int Mode); | 80 | int RIOPCIinit(struct rio_info *p, int Mode); |
86 | 81 | ||
87 | static int RIOScrub(int, BYTE *, int); | 82 | static int RIOScrub(int, u8 *, int); |
88 | 83 | ||
89 | 84 | ||
90 | /** | 85 | /** |
@@ -156,7 +151,7 @@ static u8 val[] = { | |||
156 | ** RAM test a board. | 151 | ** RAM test a board. |
157 | ** Nothing too complicated, just enough to check it out. | 152 | ** Nothing too complicated, just enough to check it out. |
158 | */ | 153 | */ |
159 | int RIOBoardTest(paddr_t paddr, caddr_t caddr, unsigned char type, int slot) | 154 | int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slot) |
160 | { | 155 | { |
161 | struct DpRam *DpRam = (struct DpRam *)caddr; | 156 | struct DpRam *DpRam = (struct DpRam *)caddr; |
162 | char *ram[4]; | 157 | char *ram[4]; |
@@ -164,7 +159,7 @@ int RIOBoardTest(paddr_t paddr, caddr_t caddr, unsigned char type, int slot) | |||
164 | int op, bank; | 159 | int op, bank; |
165 | int nbanks; | 160 | int nbanks; |
166 | 161 | ||
167 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Reset host type=%d, DpRam=0x%p, slot=%d\n", | 162 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Reset host type=%d, DpRam=%p, slot=%d\n", |
168 | type, DpRam, slot); | 163 | type, DpRam, slot); |
169 | 164 | ||
170 | RIOHostReset(type, DpRam, slot); | 165 | RIOHostReset(type, DpRam, slot); |
@@ -193,10 +188,10 @@ int RIOBoardTest(paddr_t paddr, caddr_t caddr, unsigned char type, int slot) | |||
193 | 188 | ||
194 | 189 | ||
195 | if (nbanks == 3) { | 190 | if (nbanks == 3) { |
196 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Memory: 0x%p(0x%x), 0x%p(0x%x), 0x%p(0x%x)\n", | 191 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Memory: %p(0x%x), %p(0x%x), %p(0x%x)\n", |
197 | ram[0], size[0], ram[1], size[1], ram[2], size[2]); | 192 | ram[0], size[0], ram[1], size[1], ram[2], size[2]); |
198 | } else { | 193 | } else { |
199 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: 0x%p(0x%x), 0x%p(0x%x), 0x%p(0x%x), 0x%p(0x%x)\n", | 194 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: %p(0x%x), %p(0x%x), %p(0x%x), %p(0x%x)\n", |
200 | ram[0], size[0], ram[1], size[1], ram[2], size[2], ram[3], size[3]); | 195 | ram[0], size[0], ram[1], size[1], ram[2], size[2], ram[3], size[3]); |
201 | } | 196 | } |
202 | 197 | ||
@@ -207,7 +202,7 @@ int RIOBoardTest(paddr_t paddr, caddr_t caddr, unsigned char type, int slot) | |||
207 | */ | 202 | */ |
208 | for (op=0; op<TEST_END; op++) { | 203 | for (op=0; op<TEST_END; op++) { |
209 | for (bank=0; bank<nbanks; bank++) { | 204 | for (bank=0; bank<nbanks; bank++) { |
210 | if (RIOScrub(op, (BYTE *)ram[bank], size[bank]) == RIO_FAIL) { | 205 | if (RIOScrub(op, (u8 *)ram[bank], size[bank]) == RIO_FAIL) { |
211 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n", | 206 | rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n", |
212 | bank, op); | 207 | bank, op); |
213 | return RIO_FAIL; | 208 | return RIO_FAIL; |
@@ -216,7 +211,7 @@ int RIOBoardTest(paddr_t paddr, caddr_t caddr, unsigned char type, int slot) | |||
216 | } | 211 | } |
217 | 212 | ||
218 | rio_dprintk (RIO_DEBUG_INIT, "Test completed\n"); | 213 | rio_dprintk (RIO_DEBUG_INIT, "Test completed\n"); |
219 | return RIO_SUCCESS; | 214 | return 0; |
220 | } | 215 | } |
221 | 216 | ||
222 | 217 | ||
@@ -232,7 +227,7 @@ int RIOBoardTest(paddr_t paddr, caddr_t caddr, unsigned char type, int slot) | |||
232 | ** to check that the data from the previous phase was retained. | 227 | ** to check that the data from the previous phase was retained. |
233 | */ | 228 | */ |
234 | 229 | ||
235 | static int RIOScrub(int op, BYTE *ram, int size) | 230 | static int RIOScrub(int op, u8 *ram, int size) |
236 | { | 231 | { |
237 | int off; | 232 | int off; |
238 | unsigned char oldbyte; | 233 | unsigned char oldbyte; |
@@ -364,7 +359,7 @@ static int RIOScrub(int op, BYTE *ram, int size) | |||
364 | } | 359 | } |
365 | writew(newword, ram + off); | 360 | writew(newword, ram + off); |
366 | } | 361 | } |
367 | return RIO_SUCCESS; | 362 | return 0; |
368 | } | 363 | } |
369 | 364 | ||
370 | 365 | ||