grf_nubus.c revision 1.38 1 /* $NetBSD: grf_nubus.c,v 1.38 1997/12/03 03:05:02 briggs Exp $ */
2
3 /*
4 * Copyright (c) 1995 Allen Briggs. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Allen Briggs.
17 * 4. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 /*
32 * Device-specific routines for handling Nubus-based video cards.
33 */
34
35 #include <sys/param.h>
36
37 #include <sys/device.h>
38 #include <sys/ioctl.h>
39 #include <sys/file.h>
40 #include <sys/malloc.h>
41 #include <sys/mman.h>
42 #include <sys/proc.h>
43 #include <sys/systm.h>
44
45 #include <machine/bus.h>
46 #include <machine/cpu.h>
47 #include <machine/grfioctl.h>
48 #include <machine/viareg.h>
49
50 #include <mac68k/dev/nubus.h>
51 #include <mac68k/dev/grfvar.h>
52
53 static void load_image_data __P((caddr_t data, struct image_data *image));
54
55 static void grfmv_intr_generic_write1 __P((void *vsc, int slot));
56 static void grfmv_intr_generic_write4 __P((void *vsc, int slot));
57 static void grfmv_intr_generic_or4 __P((void *vsc, int slot));
58
59 static void grfmv_intr_cb264 __P((void *vsc, int slot));
60 static void grfmv_intr_cb364 __P((void *vsc, int slot));
61 static void grfmv_intr_cmax __P((void *vsc, int slot));
62 static void grfmv_intr_cti __P((void *vsc, int slot));
63 static void grfmv_intr_radius __P((void *vsc, int slot));
64 static void grfmv_intr_supermacgfx __P((void *vsc, int slot));
65 static void grfmv_intr_lapis __P((void *vsc, int slot));
66
67 static int grfmv_mode __P((struct grf_softc *gp, int cmd, void *arg));
68 static caddr_t grfmv_phys __P((struct grf_softc *gp));
69 static int grfmv_match __P((struct device *, struct cfdata *, void *));
70 static void grfmv_attach __P((struct device *, struct device *, void *));
71
72 struct cfdriver macvid_cd = {
73 NULL, "macvid", DV_DULL
74 };
75
76 struct cfattach macvid_ca = {
77 sizeof(struct grfbus_softc), grfmv_match, grfmv_attach
78 };
79
80 static void
81 load_image_data(data, image)
82 caddr_t data;
83 struct image_data *image;
84 {
85 bcopy(data , &image->size, 4);
86 bcopy(data + 4, &image->offset, 4);
87 bcopy(data + 8, &image->rowbytes, 2);
88 bcopy(data + 10, &image->top, 2);
89 bcopy(data + 12, &image->left, 2);
90 bcopy(data + 14, &image->bottom, 2);
91 bcopy(data + 16, &image->right, 2);
92 bcopy(data + 18, &image->version, 2);
93 bcopy(data + 20, &image->packType, 2);
94 bcopy(data + 22, &image->packSize, 4);
95 bcopy(data + 26, &image->hRes, 4);
96 bcopy(data + 30, &image->vRes, 4);
97 bcopy(data + 34, &image->pixelType, 2);
98 bcopy(data + 36, &image->pixelSize, 2);
99 bcopy(data + 38, &image->cmpCount, 2);
100 bcopy(data + 40, &image->cmpSize, 2);
101 bcopy(data + 42, &image->planeBytes, 4);
102 }
103
104
105 static int
106 grfmv_match(parent, cf, aux)
107 struct device *parent;
108 struct cfdata *cf;
109 void *aux;
110 {
111 struct nubus_attach_args *na = (struct nubus_attach_args *)aux;
112
113 if (na->category != NUBUS_CATEGORY_DISPLAY)
114 return 0;
115
116 if (na->type != NUBUS_TYPE_VIDEO)
117 return 0;
118
119 if (na->drsw != NUBUS_DRSW_APPLE)
120 return 0;
121
122 /*
123 * If we've gotten this far, then we're dealing with a real-live
124 * Apple QuickDraw-compatible display card resource. Now, how to
125 * determine that this is an active resource??? Dunno. But we'll
126 * proceed like it is.
127 */
128
129 return 1;
130 }
131
132 static void
133 grfmv_attach(parent, self, aux)
134 struct device *parent, *self;
135 void *aux;
136 {
137 struct grfbus_softc *sc = (struct grfbus_softc *)self;
138 struct nubus_attach_args *na = (struct nubus_attach_args *)aux;
139 struct image_data image_store, image;
140 struct grfmode *gm;
141 char cardname[CARD_NAME_LEN];
142 nubus_dirent dirent;
143 nubus_dir dir, mode_dir;
144 int mode;
145
146 sc->sc_tag = na->na_tag;
147 sc->card_id = na->drhw;
148
149 bcopy(na->fmt, &sc->sc_slot, sizeof(nubus_slot));
150
151 if (bus_space_map(sc->sc_tag,
152 NUBUS_SLOT2PA(na->slot), NBMEMSIZE, 0, &sc->sc_handle)) {
153 printf(": grfmv_attach: failed to map slot %d\n", na->slot);
154 return;
155 }
156
157 nubus_get_main_dir(&sc->sc_slot, &dir);
158
159 if (nubus_find_rsrc(sc->sc_tag, sc->sc_handle,
160 &sc->sc_slot, &dir, na->rsrcid, &dirent) <= 0) {
161 bad:
162 bus_space_unmap(sc->sc_tag, sc->sc_handle, NBMEMSIZE);
163 return;
164 }
165
166 nubus_get_dir_from_rsrc(&sc->sc_slot, &dirent, &sc->board_dir);
167
168 if (nubus_find_rsrc(sc->sc_tag, sc->sc_handle,
169 &sc->sc_slot, &sc->board_dir, NUBUS_RSRC_TYPE, &dirent) <= 0)
170 if ((na->rsrcid != 128) ||
171 (nubus_find_rsrc(sc->sc_tag, sc->sc_handle,
172 &sc->sc_slot, &dir, 129, &dirent) <= 0))
173 goto bad;
174
175 mode = NUBUS_RSRC_FIRSTMODE;
176 if (nubus_find_rsrc(sc->sc_tag, sc->sc_handle,
177 &sc->sc_slot, &sc->board_dir, mode, &dirent) <= 0) {
178 printf(": probe failed to get board rsrc.\n");
179 goto bad;
180 }
181
182 nubus_get_dir_from_rsrc(&sc->sc_slot, &dirent, &mode_dir);
183
184 if (nubus_find_rsrc(sc->sc_tag, sc->sc_handle,
185 &sc->sc_slot, &mode_dir, VID_PARAMS, &dirent) <= 0) {
186 printf(": probe failed to get mode dir.\n");
187 goto bad;
188 }
189
190 if (nubus_get_ind_data(sc->sc_tag, sc->sc_handle, &sc->sc_slot,
191 &dirent, (caddr_t)&image_store, sizeof(struct image_data)) <= 0) {
192 printf(": probe failed to get indirect mode data.\n");
193 goto bad;
194 }
195
196 /* Need to load display info (and driver?), etc... (?) */
197
198 load_image_data((caddr_t)&image_store, &image);
199
200 gm = &sc->curr_mode;
201 gm->mode_id = mode;
202 gm->fbbase = (caddr_t)sc->sc_handle; /* XXX evil! */
203 gm->fboff = image.offset;
204 gm->rowbytes = image.rowbytes;
205 gm->width = image.right - image.left;
206 gm->height = image.bottom - image.top;
207 gm->fbsize = gm->height * gm->rowbytes;
208 gm->hres = image.hRes;
209 gm->vres = image.vRes;
210 gm->ptype = image.pixelType;
211 gm->psize = image.pixelSize;
212
213 strncpy(cardname, nubus_get_card_name(sc->sc_tag, sc->sc_handle,
214 &sc->sc_slot), CARD_NAME_LEN);
215 cardname[CARD_NAME_LEN-1] = '\0';
216 printf(": %s\n", cardname);
217
218 if (sc->card_id == NUBUS_DRHW_TFB) {
219 /*
220 * This is the Toby card, but apparently some manufacturers
221 * (like Cornerstone) didn't bother to get/use their own
222 * value here, even though the cards are different, so we
223 * so we try to differentiate here.
224 */
225 if (strncmp(cardname, "Samsung 768", 11) == 0)
226 sc->card_id = NUBUS_DRHW_SAM768;
227 else if (strncmp(cardname, "Toby frame", 10) != 0)
228 printf("%s: This display card pretends to be a TFB!\n",
229 sc->sc_dev.dv_xname);
230 }
231
232 switch (sc->card_id) {
233 case NUBUS_DRHW_TFB:
234 case NUBUS_DRHW_M2HRVC:
235 case NUBUS_DRHW_PVC:
236 sc->cli_offset = 0xa0000;
237 sc->cli_value = 0;
238 add_nubus_intr(na->slot, grfmv_intr_generic_write1, sc);
239 break;
240 case NUBUS_DRHW_WVC:
241 sc->cli_offset = 0xa00000;
242 sc->cli_value = 0;
243 add_nubus_intr(na->slot, grfmv_intr_generic_write1, sc);
244 break;
245 case NUBUS_DRHW_COLORMAX:
246 add_nubus_intr(na->slot, grfmv_intr_cmax, sc);
247 break;
248 case NUBUS_DRHW_SE30:
249 /* Do nothing--SE/30 interrupts are disabled */
250 break;
251 case NUBUS_DRHW_MDC:
252 sc->cli_offset = 0x200148;
253 sc->cli_value = 1;
254 add_nubus_intr(na->slot, grfmv_intr_generic_write4, sc);
255
256 /* Enable interrupts; to disable, write 0x7 to this location */
257 bus_space_write_4(sc->sc_tag, sc->sc_handle, 0x20013C, 5);
258 break;
259 case NUBUS_DRHW_CB264:
260 add_nubus_intr(na->slot, grfmv_intr_cb264, sc);
261 break;
262 case NUBUS_DRHW_CB364:
263 add_nubus_intr(na->slot, grfmv_intr_cb364, sc);
264 break;
265 case NUBUS_DRHW_RPC8:
266 sc->cli_offset = 0xfdff8f;
267 sc->cli_value = 0xff;
268 add_nubus_intr(na->slot, grfmv_intr_generic_write1, sc);
269 break;
270 case NUBUS_DRHW_RPC8XJ:
271 add_nubus_intr(na->slot, grfmv_intr_radius, sc);
272 break;
273 case NUBUS_DRHW_FIILX:
274 case NUBUS_DRHW_FIISXDSP:
275 case NUBUS_DRHW_FUTURASX:
276 sc->cli_offset = 0xf05000;
277 sc->cli_value = 0x80;
278 add_nubus_intr(na->slot, grfmv_intr_generic_write1, sc);
279 break;
280 case NUBUS_DRHW_SAM768:
281 add_nubus_intr(na->slot, grfmv_intr_cti, sc);
282 break;
283 case NUBUS_DRHW_SUPRGFX:
284 add_nubus_intr(na->slot, grfmv_intr_supermacgfx, sc);
285 break;
286 case NUBUS_DRHW_SPECTRM8:
287 sc->cli_offset = 0x0de178;
288 sc->cli_value = 0x80;
289 add_nubus_intr(na->slot, grfmv_intr_generic_or4, sc);
290 break;
291 case NUBUS_DRHW_LAPIS:
292 add_nubus_intr(na->slot, grfmv_intr_lapis, sc);
293 break;
294 case NUBUS_DRHW_MICRON:
295 /* What do we know about this one? */
296 default:
297 printf("%s: Unknown video card ID 0x%x --",
298 sc->sc_dev.dv_xname, sc->card_id);
299 printf(" Not installing interrupt routine.\n");
300 break;
301 }
302
303 /* Perform common video attachment. */
304 grf_establish(sc, &sc->sc_slot, grfmv_mode, grfmv_phys);
305 }
306
307 static int
308 grfmv_mode(gp, cmd, arg)
309 struct grf_softc *gp;
310 int cmd;
311 void *arg;
312 {
313 switch (cmd) {
314 case GM_GRFON:
315 case GM_GRFOFF:
316 return 0;
317 case GM_CURRMODE:
318 break;
319 case GM_NEWMODE:
320 break;
321 case GM_LISTMODES:
322 break;
323 }
324 return EINVAL;
325 }
326
327 static caddr_t
328 grfmv_phys(gp)
329 struct grf_softc *gp;
330 {
331 return (caddr_t)NUBUS_SLOT2PA(gp->sc_slot->slot);
332 }
333
334 /* Interrupt handlers... */
335 /*
336 * Generic routine to clear interrupts for cards where it simply takes
337 * a MOV.B to clear the interrupt. The offset and value of this byte
338 * varies between cards.
339 */
340 /*ARGSUSED*/
341 static void
342 grfmv_intr_generic_write1(vsc, slot)
343 void *vsc;
344 int slot;
345 {
346 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
347
348 bus_space_write_1(sc->sc_tag, sc->sc_handle,
349 sc->cli_offset, (u_int8_t)sc->cli_value);
350 }
351
352 /*
353 * Generic routine to clear interrupts for cards where it simply takes
354 * a MOV.L to clear the interrupt. The offset and value of this byte
355 * varies between cards.
356 */
357 /*ARGSUSED*/
358 static void
359 grfmv_intr_generic_write4(vsc, slot)
360 void *vsc;
361 int slot;
362 {
363 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
364
365 bus_space_write_4(sc->sc_tag, sc->sc_handle,
366 sc->cli_offset, sc->cli_value);
367 }
368
369 /*
370 * Generic routine to clear interrupts for cards where it simply takes
371 * an OR.L to clear the interrupt. The offset and value of this byte
372 * varies between cards.
373 */
374 /*ARGSUSED*/
375 static void
376 grfmv_intr_generic_or4(vsc, slot)
377 void *vsc;
378 int slot;
379 {
380 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
381 unsigned long scratch;
382
383 scratch = bus_space_read_4(sc->sc_tag, sc->sc_handle, sc->cli_offset);
384 scratch |= 0x80;
385 bus_space_write_4(sc->sc_tag, sc->sc_handle, sc->cli_offset, scratch);
386 }
387
388 /*
389 * Routine to clear interrupts for the Radius PrecisionColor 8xj card.
390 */
391 /*ARGSUSED*/
392 static void
393 grfmv_intr_radius(vsc, slot)
394 void *vsc;
395 int slot;
396 {
397 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
398 u_int8_t c;
399
400 /*
401 * The value 0x66 was the observed value on one card. It is read
402 * from the driver's information block, so this may not be sufficient.
403 * Then again, we're not setting up any other interrupts...
404 */
405 c = 0x66;
406
407 c |= 0x80;
408 bus_space_write_1(sc->sc_tag, sc->sc_handle, 0xd00403, c);
409 c &= 0x7f;
410 bus_space_write_1(sc->sc_tag, sc->sc_handle, 0xd00403, c);
411 }
412
413 /*
414 * Routine to clear interrupts on Samsung 768x1006 video controller.
415 * This controller was manufactured by Cornerstone Technology, Inc.,
416 * now known as Cornerstone Imaging.
417 *
418 * To clear this interrupt, we apparently have to set, then clear,
419 * bit 2 at byte offset 0x80000 from the card's base.
420 * Information for this provided by Brad Salai <bsalai (at) servtech.com>
421 */
422 /*ARGSUSED*/
423 static void
424 grfmv_intr_cti(vsc, slot)
425 void *vsc;
426 int slot;
427 {
428 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
429 u_int8_t c;
430
431 c = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x80000);
432 c |= 0x02;
433 bus_space_write_1(sc->sc_tag, sc->sc_handle, 0x80000, c);
434 c &= 0xfd;
435 bus_space_write_1(sc->sc_tag, sc->sc_handle, 0x80000, c);
436 }
437
438 /*ARGSUSED*/
439 static void
440 grfmv_intr_cb264(vsc, slot)
441 void *vsc;
442 int slot;
443 {
444 struct grfbus_softc *sc;
445 volatile char *slotbase;
446
447 sc = (struct grfbus_softc *)vsc;
448 slotbase = (volatile char *)sc->sc_handle; /* XXX evil hack */
449 asm volatile(" movl %0,a0
450 movl a0@(0xff6028),d0
451 andl #0x2,d0
452 beq _mv_intr0
453 movql #0x3,d0
454 _mv_intr0:
455 movl a0@(0xff600c),d1
456 andl #0x3,d1
457 cmpl d1,d0
458 beq _mv_intr_fin
459 movl d0,a0@(0xff600c)
460 nop
461 tstb d0
462 beq _mv_intr1
463 movl #0x0002,a0@(0xff6040)
464 movl #0x0102,a0@(0xff6044)
465 movl #0x0105,a0@(0xff6048)
466 movl #0x000e,a0@(0xff604c)
467 movl #0x001c,a0@(0xff6050)
468 movl #0x00bc,a0@(0xff6054)
469 movl #0x00c3,a0@(0xff6058)
470 movl #0x0061,a0@(0xff605c)
471 movl #0x0012,a0@(0xff6060)
472 bra _mv_intr_fin
473 _mv_intr1:
474 movl #0x0002,a0@(0xff6040)
475 movl #0x0209,a0@(0xff6044)
476 movl #0x020c,a0@(0xff6048)
477 movl #0x000f,a0@(0xff604c)
478 movl #0x0027,a0@(0xff6050)
479 movl #0x00c7,a0@(0xff6054)
480 movl #0x00d7,a0@(0xff6058)
481 movl #0x006b,a0@(0xff605c)
482 movl #0x0029,a0@(0xff6060)
483 _mv_intr_fin:
484 movl #0x1,a0@(0xff6014)"
485 : : "g" (slotbase) : "a0","d0","d1");
486 }
487
488 /*
489 * Support for the Colorboard 364 might be more complex than it needs to
490 * be. If we can find more information about this card, this might be
491 * significantly simplified. Contributions welcome... :-)
492 */
493 /*ARGSUSED*/
494 static void
495 grfmv_intr_cb364(vsc, slot)
496 void *vsc;
497 int slot;
498 {
499 struct grfbus_softc *sc;
500 volatile char *slotbase;
501
502 sc = (struct grfbus_softc *)vsc;
503 slotbase = (volatile char *)sc->sc_handle; /* XXX evil hack */
504 asm volatile(" movl %0,a0
505 movl a0@(0xfe6028),d0
506 andl #0x2,d0
507 beq _cb364_intr4
508 movql #0x3,d0
509 movl a0@(0xfe6018),d1
510 movl #0x3,a0@(0xfe6018)
511 movw a0@(0xfe7010),d2
512 movl d1,a0@(0xfe6018)
513 movl a0@(0xfe6020),d1
514 btst #0x06,d2
515 beq _cb364_intr0
516 btst #0x00,d1
517 beq _cb364_intr5
518 bsr _cb364_intr1
519 bra _cb364_intr_out
520 _cb364_intr0:
521 btst #0x00,d1
522 bne _cb364_intr5
523 bsr _cb364_intr1
524 bra _cb364_intr_out
525 _cb364_intr1:
526 movl d0,a0@(0xfe600c)
527 nop
528 tstb d0
529 beq _cb364_intr3
530 movl #0x0002,a0@(0xfe6040)
531 movl #0x0105,a0@(0xfe6048)
532 movl #0x000e,a0@(0xfe604c)
533 movl #0x00c3,a0@(0xfe6058)
534 movl #0x0061,a0@(0xfe605c)
535 btst #0x06,d2
536 beq _cb364_intr2
537 movl #0x001c,a0@(0xfe6050)
538 movl #0x00bc,a0@(0xfe6054)
539 movl #0x0012,a0@(0xfe6060)
540 movl #0x000e,a0@(0xfe6044)
541 movl #0x00c3,a0@(0xfe6064)
542 movl #0x0061,a0@(0xfe6020)
543 rts
544 _cb364_intr2:
545 movl #0x0016,a0@(0xfe6050)
546 movl #0x00b6,a0@(0xfe6054)
547 movl #0x0011,a0@(0xfe6060)
548 movl #0x0101,a0@(0xfe6044)
549 movl #0x00bf,a0@(0xfe6064)
550 movl #0x0001,a0@(0xfe6020)
551 rts
552 _cb364_intr3:
553 movl #0x0002,a0@(0xfe6040)
554 movl #0x0209,a0@(0xfe6044)
555 movl #0x020c,a0@(0xfe6048)
556 movl #0x000f,a0@(0xfe604c)
557 movl #0x0027,a0@(0xfe6050)
558 movl #0x00c7,a0@(0xfe6054)
559 movl #0x00d7,a0@(0xfe6058)
560 movl #0x006b,a0@(0xfe605c)
561 movl #0x0029,a0@(0xfe6060)
562 oril #0x0040,a0@(0xfe6064)
563 movl #0x0000,a0@(0xfe6020)
564 rts
565 _cb364_intr4:
566 movq #0x00,d0
567 _cb364_intr5:
568 movl a0@(0xfe600c),d1
569 andl #0x3,d1
570 cmpl d1,d0
571 beq _cb364_intr_out
572 bsr _cb364_intr1
573 _cb364_intr_out:
574 movl #0x1,a0@(0xfe6014)
575 _cb364_intr_quit:
576 " : : "g" (slotbase) : "a0","d0","d1","d2");
577 }
578
579 /*
580 * Interrupt clearing routine for SuperMac GFX card.
581 */
582 /*ARGSUSED*/
583 static void
584 grfmv_intr_supermacgfx(vsc, slot)
585 void *vsc;
586 int slot;
587 {
588 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
589 u_int8_t dummy;
590
591 dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xE70D3);
592 }
593
594 /*
595 * Routine to clear interrupts for the Sigma Designs ColorMax card.
596 */
597 /*ARGSUSED*/
598 static void
599 grfmv_intr_cmax(vsc, slot)
600 void *vsc;
601 int slot;
602 {
603 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
604 u_int32_t dummy;
605
606 dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
607 dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
608 }
609
610 /*
611 * Routine to clear interrupts for the Lapis ProColorServer 8 PDS card
612 * (for the SE/30).
613 */
614 /*ARGSUSED*/
615 static void
616 grfmv_intr_lapis(vsc, slot)
617 void *vsc;
618 int slot;
619 {
620 struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
621
622 bus_space_write_1(sc->sc_tag, sc->sc_handle, 0xff7000, 0x08);
623 bus_space_write_1(sc->sc_tag, sc->sc_handle, 0xff7000, 0x0C);
624 }
625