btvmei.c revision 1.20 1 /* $NetBSD: btvmei.c,v 1.20 2009/03/14 15:36:19 dsl Exp $ */
2
3 /*
4 * Copyright (c) 1999
5 * Matthias Drochner. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 */
30
31 #include <sys/cdefs.h>
32 __KERNEL_RCSID(0, "$NetBSD: btvmei.c,v 1.20 2009/03/14 15:36:19 dsl Exp $");
33
34 #include <sys/param.h>
35 #include <sys/systm.h>
36 #include <sys/kernel.h>
37 #include <sys/device.h>
38 #include <sys/proc.h>
39 #include <sys/malloc.h>
40
41 #include <sys/bus.h>
42 #include <sys/extent.h>
43
44 #include <dev/pci/pcireg.h>
45 #include <dev/pci/pcivar.h>
46 #include <dev/pci/pcidevs.h>
47
48 #include <dev/vme/vmereg.h>
49 #include <dev/vme/vmevar.h>
50
51 #include <dev/pci/btvmeireg.h>
52 #include <dev/pci/btvmeivar.h>
53
54 static int b3_617_match(struct device *, struct cfdata *, void *);
55 static void b3_617_attach(struct device *, struct device *, void *);
56 #ifdef notyet
57 static int b3_617_detach(struct device *);
58 #endif
59 void b3_617_slaveconfig(struct device *, struct vme_attach_args *);
60
61 static void b3_617_vmeintr(struct b3_617_softc *, unsigned char);
62
63 /*
64 * mapping ressources, needed for deallocation
65 */
66 struct b3_617_vmeresc {
67 bus_space_handle_t handle;
68 bus_size_t len;
69 int firstpage, maplen;
70 };
71
72 CFATTACH_DECL(btvmei, sizeof(struct b3_617_softc),
73 b3_617_match, b3_617_attach, NULL, NULL);
74
75 static int
76 b3_617_match(struct device *parent, struct cfdata *match, void *aux)
77 {
78 struct pci_attach_args *pa = aux;
79
80 if ((PCI_VENDOR(pa->pa_id) != PCI_VENDOR_BIT3)
81 || (PCI_PRODUCT(pa->pa_id) != PCI_PRODUCT_BIT3_PCIVME617))
82 return (0);
83 return (1);
84 }
85
86 static void
87 b3_617_attach(parent, self, aux)
88 struct device *parent, *self;
89 void *aux;
90 {
91 struct b3_617_softc *sc = (struct b3_617_softc*)self;
92 struct pci_attach_args *pa = aux;
93 pci_chipset_tag_t pc = pa->pa_pc;
94
95 int rev;
96
97 pci_intr_handle_t ih;
98 const char *intrstr;
99 struct vmebus_attach_args vaa;
100
101 aprint_naive(": VME bus adapter\n");
102
103 sc->sc_pc = pc;
104 sc->sc_dmat = pa->pa_dmat;
105
106 rev = PCI_REVISION(pci_conf_read(pc, pa->pa_tag, PCI_CLASS_REG));
107 aprint_normal(": BIT3 PCI-VME 617 rev %d\n", rev);
108
109 /*
110 * Map CSR and mapping table spaces.
111 * Don't map VME window; parts are mapped as needed to
112 * save kernel virtual memory space
113 */
114 if (pci_mapreg_map(pa, 0x14,
115 PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT,
116 0, &sc->csrt, &sc->csrh, NULL, NULL) &&
117 pci_mapreg_map(pa, 0x10,
118 PCI_MAPREG_TYPE_IO,
119 0, &sc->csrt, &sc->csrh, NULL, NULL)) {
120 aprint_error_dev(self, "can't map CSR space\n");
121 return;
122 }
123
124 if (pci_mapreg_map(pa, 0x18,
125 PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT,
126 0, &sc->mapt, &sc->maph, NULL, NULL)) {
127 aprint_error_dev(self, "can't map map space\n");
128 return;
129 }
130
131 if (pci_mapreg_info(pc, pa->pa_tag, 0x1c,
132 PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT,
133 &sc->vmepbase, 0, 0)) {
134 aprint_error_dev(self, "can't get VME range\n");
135 return;
136 }
137 sc->sc_vmet = pa->pa_memt; /* XXX needed for VME mappings */
138
139 /* Map and establish the interrupt. */
140 if (pci_intr_map(pa, &ih)) {
141 aprint_error_dev(&sc->sc_dev, "couldn't map interrupt\n");
142 return;
143 }
144 intrstr = pci_intr_string(pc, ih);
145 /*
146 * Use a low interrupt level (the lowest?).
147 * We will raise before calling a subdevice's handler.
148 */
149 sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, b3_617_intr, sc);
150 if (sc->sc_ih == NULL) {
151 aprint_error_dev(&sc->sc_dev, "couldn't establish interrupt");
152 if (intrstr != NULL)
153 aprint_normal(" at %s", intrstr);
154 aprint_normal("\n");
155 return;
156 }
157 aprint_normal_dev(&sc->sc_dev, "interrupting at %s\n", intrstr);
158
159 if (b3_617_init(sc))
160 return;
161
162 /*
163 * set up all the tags for use by VME devices
164 */
165 sc->sc_vct.cookie = self;
166 sc->sc_vct.vct_probe = b3_617_vme_probe;
167 sc->sc_vct.vct_map = b3_617_map_vme;
168 sc->sc_vct.vct_unmap = b3_617_unmap_vme;
169 sc->sc_vct.vct_int_map = b3_617_map_vmeint;
170 sc->sc_vct.vct_int_establish = b3_617_establish_vmeint;
171 sc->sc_vct.vct_int_disestablish = b3_617_disestablish_vmeint;
172 sc->sc_vct.vct_dmamap_create = b3_617_dmamap_create;
173 sc->sc_vct.vct_dmamap_destroy = b3_617_dmamap_destroy;
174 sc->sc_vct.vct_dmamem_alloc = b3_617_dmamem_alloc;
175 sc->sc_vct.vct_dmamem_free = b3_617_dmamem_free;
176
177 vaa.va_vct = &(sc->sc_vct);
178 vaa.va_bdt = pa->pa_dmat;
179 vaa.va_slaveconfig = b3_617_slaveconfig;
180
181 sc->csrwindow.offset = -1;
182 sc->dmawindow24.offset = -1;
183 sc->dmawindow32.offset = -1;
184 config_found(self, &vaa, 0);
185 }
186
187 #ifdef notyet
188 static int
189 b3_617_detach(struct device *dev)
190 {
191 struct b3_617_softc *sc = (struct b3_617_softc *)dev;
192
193 b3_617_halt(sc);
194
195 if (sc->sc_ih)
196 pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
197
198 bus_space_unmap(sc->sc_bc, sc->csrbase, 32);
199 bus_space_unmap(sc->sc_bc, sc->mapbase, 64*1024);
200
201 return(0);
202 }
203 #endif
204
205 void
206 b3_617_slaveconfig(struct device *dev, struct vme_attach_args *va)
207 {
208 struct b3_617_softc *sc = (struct b3_617_softc *)dev;
209 vme_chipset_tag_t vmect;
210 int i, res;
211 const char *name = 0; /* XXX gcc! */
212
213 vmect = &sc->sc_vct;
214 if (!va)
215 goto freeit;
216
217 #ifdef DIAGNOSTIC
218 if (vmect != va->va_vct)
219 panic("pcivme_slaveconfig: chipset tag?");
220 #endif
221
222 for (i = 0; i < va->numcfranges; i++) {
223 res = vme_space_alloc(vmect, va->r[i].offset,
224 va->r[i].size, va->r[i].am);
225 if (res)
226 panic("%s: can't alloc slave window %x/%x/%x",
227 device_xname(dev), va->r[i].offset,
228 va->r[i].size, va->r[i].am);
229
230 switch (va->r[i].am & VME_AM_ADRSIZEMASK) {
231 /* structure assignments! */
232 case VME_AM_A16:
233 sc->csrwindow = va->r[i];
234 name = "VME CSR";
235 break;
236 case VME_AM_A24:
237 sc->dmawindow24 = va->r[i];
238 name = "A24 DMA";
239 break;
240 case VME_AM_A32:
241 sc->dmawindow32 = va->r[i];
242 name = "A32 DMA";
243 break;
244 }
245 printf("%s: %s window: %x-%x\n", device_xname(dev),
246 name, va->r[i].offset,
247 va->r[i].offset + va->r[i].size - 1);
248 }
249 return;
250
251 freeit:
252 if (sc->csrwindow.offset != -1)
253 vme_space_free(vmect, sc->csrwindow.offset,
254 sc->csrwindow.size, sc->csrwindow.am);
255 if (sc->dmawindow32.offset != -1)
256 vme_space_free(vmect, sc->dmawindow32.offset,
257 sc->dmawindow32.size, sc->dmawindow32.am);
258 if (sc->dmawindow24.offset != -1)
259 vme_space_free(vmect, sc->dmawindow24.offset,
260 sc->dmawindow24.size, sc->dmawindow24.am);
261 }
262
263 int
264 b3_617_reset(struct b3_617_softc *sc)
265 {
266 unsigned char status;
267
268 /* reset sequence, ch 5.2 */
269 status = read_csr_byte(sc, LOC_STATUS);
270 if (status & LSR_NO_CONNECT) {
271 printf("%s: not connected\n", device_xname(&sc->sc_dev));
272 return (-1);
273 }
274 status = read_csr_byte(sc, REM_STATUS); /* discard */
275 write_csr_byte(sc, LOC_CMD1, LC1_CLR_ERROR);
276 status = read_csr_byte(sc, LOC_STATUS);
277 if (status & LSR_CERROR_MASK) {
278 char sbuf[sizeof(BIT3_LSR_BITS) + 64];
279
280 snprintb(sbuf, sizeof(sbuf), BIT3_LSR_BITS, status);
281 printf("%s: interface error, lsr=%s\n", device_xname(&sc->sc_dev),
282 sbuf);
283 return (-1);
284 }
285 return (0);
286 }
287
288 int
289 b3_617_init(struct b3_617_softc *sc)
290 {
291 unsigned int i;
292
293 if (b3_617_reset(sc))
294 return (-1);
295
296 /* all maps invalid */
297 for (i = MR_PCI_VME; i < MR_PCI_VME + MR_PCI_VME_SIZE; i += 4)
298 write_mapmem(sc, i, MR_RAM_INVALID);
299 for (i = MR_VME_PCI; i < MR_VME_PCI + MR_VME_PCI_SIZE; i += 4)
300 write_mapmem(sc, i, MR_RAM_INVALID);
301 for (i = MR_DMA_PCI; i < MR_DMA_PCI + MR_DMA_PCI_SIZE; i += 4)
302 write_mapmem(sc, i, MR_RAM_INVALID);
303
304 /*
305 * set up scatter page allocation control
306 */
307 sc->vmeext = extent_create("pcivme", MR_PCI_VME,
308 MR_PCI_VME + MR_PCI_VME_SIZE - 1, M_DEVBUF,
309 sc->vmemap, sizeof(sc->vmemap),
310 EX_NOCOALESCE);
311 #if 0
312 sc->pciext = extent_create("vmepci", MR_VME_PCI,
313 MR_VME_PCI + MR_VME_PCI_SIZE - 1, M_DEVBUF,
314 sc->pcimap, sizeof(sc->pcimap),
315 EX_NOCOALESCE);
316 sc->dmaext = extent_create("dmapci", MR_DMA_PCI,
317 MR_DMA_PCI + MR_DMA_PCI_SIZE - 1, M_DEVBUF,
318 sc->dmamap, sizeof(sc->dmamap),
319 EX_NOCOALESCE);
320 #endif
321
322 /*
323 * init int handler queue,
324 * enable interrupts if PCI interrupt available
325 */
326 TAILQ_INIT(&(sc->intrhdls));
327 sc->strayintrs = 0;
328
329 if (sc->sc_ih)
330 write_csr_byte(sc, LOC_INT_CTRL, LIC_INT_ENABLE);
331 /* no error ints */
332 write_csr_byte(sc, REM_CMD2, 0); /* enables VME IRQ */
333
334 return (0);
335 }
336
337 #ifdef notyet /* for detach */
338 void
339 b3_617_halt(struct b3_617_softc *sc)
340 {
341 /*
342 * because detach code checks for existence of children,
343 * all ressources (mappings, VME IRQs, DMA requests)
344 * should be deallocated at this point
345 */
346
347 /* disable IRQ */
348 write_csr_byte(sc, LOC_INT_CTRL, 0);
349 }
350 #endif
351
352 static void
353 b3_617_vmeintr(struct b3_617_softc *sc, unsigned char lstat)
354 {
355 int level;
356
357 for (level = 7; level >= 1; level--) {
358 unsigned char vector;
359 struct b3_617_vmeintrhand *ih;
360 int found;
361
362 if (!(lstat & (1 << level)))
363 continue;
364
365 write_csr_byte(sc, REM_CMD1, level);
366 vector = read_csr_byte(sc, REM_IACK);
367
368 found = 0;
369
370 for (ih = sc->intrhdls.tqh_first; ih;
371 ih = ih->ih_next.tqe_next) {
372 if ((ih->ih_level == level) &&
373 ((ih->ih_vector == -1) ||
374 (ih->ih_vector == vector))) {
375 int s, res;
376 /*
377 * We should raise the interrupt level
378 * to ih->ih_prior here. How to do this
379 * machine-independently?
380 * To be safe, raise to the maximum.
381 */
382 s = splhigh();
383 found |= (res = (*(ih->ih_fun))(ih->ih_arg));
384 splx(s);
385 if (res)
386 ih->ih_count++;
387 if (res == 1)
388 break;
389 }
390 }
391 if (!found)
392 sc->strayintrs++;
393 }
394 }
395
396 #define sc ((struct b3_617_softc*)vsc)
397
398 int
399 b3_617_map_vme(void *vsc, vme_addr_t vmeaddr, vme_size_t len, vme_am_t am, vme_datasize_t datasizes, vme_swap_t swap, bus_space_tag_t *tag, bus_space_handle_t *handle, vme_mapresc_t *resc)
400 {
401 vme_addr_t vmebase, vmeend, va;
402 unsigned long maplen, first, i;
403 u_int32_t mapreg;
404 bus_addr_t pcibase;
405 int res;
406 struct b3_617_vmeresc *r;
407
408 /* first mapped address */
409 vmebase = vmeaddr & ~(VME_PAGESIZE - 1);
410 /* base of last mapped page */
411 vmeend = (vmeaddr + len - 1) & ~(VME_PAGESIZE - 1);
412 /* bytes in scatter table required */
413 maplen = ((vmeend - vmebase) / VME_PAGESIZE + 1) * 4;
414
415 if (extent_alloc(sc->vmeext, maplen, 4, 0, EX_FAST, &first))
416 return (ENOMEM);
417
418 /*
419 * set up adapter mapping registers
420 */
421 mapreg = (am << MR_AMOD_SHIFT) | MR_FC_RRAM | swap;
422
423 for (i = first, va = vmebase;
424 i < first + maplen;
425 i += 4, va += VME_PAGESIZE) {
426 write_mapmem(sc, i, mapreg | va);
427 #ifdef BIT3DEBUG
428 printf("mapreg@%lx=%x\n", i, read_mapmem(sc, i));
429 #endif
430 }
431
432 #ifdef DIAGNOSTIC
433 if (va != vmeend + VME_PAGESIZE)
434 panic("b3_617_map_pci_vme: botch");
435 #endif
436 /*
437 * map needed range in PCI space
438 */
439 pcibase = sc->vmepbase + (first - MR_PCI_VME) / 4 * VME_PAGESIZE
440 + (vmeaddr & (VME_PAGESIZE - 1));
441
442 if ((res = bus_space_map(sc->sc_vmet, pcibase, len, 0, handle))) {
443 for (i = first; i < first + maplen; i += 4)
444 write_mapmem(sc, i, MR_RAM_INVALID);
445 extent_free(sc->vmeext, first, maplen, 0);
446 return (res);
447 }
448
449 *tag = sc->sc_vmet;
450
451 /*
452 * save all data needed for later unmapping
453 */
454 r = malloc(sizeof(*r), M_DEVBUF, M_NOWAIT); /* XXX check! */
455 r->handle = *handle;
456 r->len = len;
457 r->firstpage = first;
458 r->maplen = maplen;
459 *resc = r;
460 return (0);
461 }
462
463 void
464 b3_617_unmap_vme(void *vsc, vme_mapresc_t resc)
465 {
466 unsigned long i;
467 struct b3_617_vmeresc *r = resc;
468
469 /* unmap PCI window */
470 bus_space_unmap(sc->sc_vmet, r->handle, r->len);
471
472 for (i = r->firstpage; i < r->firstpage + r->maplen; i += 4)
473 write_mapmem(sc, i, MR_RAM_INVALID);
474
475 extent_free(sc->vmeext, r->firstpage, r->maplen, 0);
476
477 free(r, M_DEVBUF);
478 }
479
480 int
481 b3_617_vme_probe(vsc, addr, len, am, datasize, callback, cbarg)
482 void *vsc;
483 vme_addr_t addr;
484 vme_size_t len;
485 vme_am_t am;
486 vme_datasize_t datasize;
487 int (*callback)(void *, bus_space_tag_t, bus_space_handle_t);
488 void *cbarg;
489 {
490 bus_space_tag_t tag;
491 bus_space_handle_t handle;
492 vme_mapresc_t resc;
493 int res, i;
494 volatile u_int32_t dummy;
495 int status;
496
497 res = b3_617_map_vme(vsc, addr, len, am, 0, 0,
498 &tag, &handle, &resc);
499 if (res)
500 return (res);
501
502 if (read_csr_byte(sc, LOC_STATUS) & LSR_ERROR_MASK) {
503 printf("b3_617_vme_badaddr: error bit not clean - resetting\n");
504 write_csr_byte(sc, LOC_CMD1, LC1_CLR_ERROR);
505 }
506
507 if (callback)
508 res = (*callback)(cbarg, tag, handle);
509 else {
510 for (i = 0; i < len;) {
511 switch (datasize) {
512 case VME_D8:
513 dummy = bus_space_read_1(tag, handle, i);
514 i++;
515 break;
516 case VME_D16:
517 dummy = bus_space_read_2(tag, handle, i);
518 i += 2;
519 break;
520 case VME_D32:
521 dummy = bus_space_read_4(tag, handle, i);
522 i += 4;
523 break;
524 default:
525 panic("b3_617_vme_probe: invalid datasize %x",
526 datasize);
527 }
528 }
529 }
530
531 if ((status = read_csr_byte(sc, LOC_STATUS)) & LSR_ERROR_MASK) {
532 #ifdef BIT3DEBUG
533 printf("b3_617_vme_badaddr: caught error %x\n", status);
534 #endif
535 write_csr_byte(sc, LOC_CMD1, LC1_CLR_ERROR);
536 res = EIO;
537 }
538
539 b3_617_unmap_vme(vsc, resc);
540 return (res);
541 }
542
543 int
544 b3_617_map_vmeint(vsc, level, vector, handlep)
545 void *vsc;
546 int level, vector;
547 vme_intr_handle_t *handlep;
548 {
549 if (!sc->sc_ih) {
550 printf("%s: b3_617_map_vmeint: no IRQ\n",
551 device_xname(&sc->sc_dev));
552 return (ENXIO);
553 }
554 /*
555 * We should check whether the interface can pass this interrupt
556 * level at all, but we don't know much about the jumper setting.
557 */
558 *handlep = (void *)(long)((level << 8) | vector); /* XXX */
559 return (0);
560 }
561
562 void *
563 b3_617_establish_vmeint(vsc, handle, prior, func, arg)
564 void *vsc;
565 vme_intr_handle_t handle;
566 int prior;
567 int (*func)(void *);
568 void *arg;
569 {
570 struct b3_617_vmeintrhand *ih;
571 long lv;
572 int s;
573
574 /* no point in sleeping unless someone can free memory. */
575 ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK);
576 if (ih == NULL)
577 panic("b3_617_map_vmeint: can't malloc handler info");
578
579 lv = (long)handle; /* XXX */
580
581 ih->ih_fun = func;
582 ih->ih_arg = arg;
583 ih->ih_level = lv >> 8;
584 ih->ih_vector = lv & 0xff;
585 ih->ih_prior = prior;
586 ih->ih_count = 0;
587
588 s = splhigh();
589 TAILQ_INSERT_TAIL(&(sc->intrhdls), ih, ih_next);
590 splx(s);
591
592 return (ih);
593 }
594
595 void
596 b3_617_disestablish_vmeint(void *vsc, void *cookie)
597 {
598 struct b3_617_vmeintrhand *ih = cookie;
599 int s;
600
601 if (!ih) {
602 printf("b3_617_unmap_vmeint: NULL arg\n");
603 return;
604 }
605
606 s = splhigh();
607 TAILQ_REMOVE(&(sc->intrhdls), ih, ih_next);
608 splx(s);
609
610 free(ih, M_DEVBUF);
611 }
612
613 int
614 b3_617_intr(void *vsc)
615 {
616 int handled = 0;
617
618 /* follows ch. 5.5.5 (reordered for speed) */
619 while (read_csr_byte(sc, LOC_INT_CTRL) & LIC_INT_PENDING) {
620 unsigned char lstat;
621
622 handled = 1;
623
624 /* no error interrupts! */
625
626 lstat = read_csr_byte(sc, LDMA_CMD);
627 if ((lstat & LDC_DMA_DONE) && (lstat & LDC_DMA_INT_ENABLE)) {
628 /* DMA done indicator flag */
629 write_csr_byte(sc, LDMA_CMD, lstat & (~LDC_DMA_DONE));
630 #if 0
631 b3_617_cntlrdma_done(sc);
632 #endif
633 continue;
634 }
635
636 lstat = read_csr_byte(sc, LOC_INT_STATUS);
637 if (lstat & LIS_CINT_MASK) {
638 /* VME backplane interrupt, ch. 5.5.3 */
639 b3_617_vmeintr(sc, lstat);
640 }
641
642 /* for now, ignore "mailbox interrupts" */
643
644 lstat = read_csr_byte(sc, LOC_STATUS);
645 if (lstat & LSR_PR_STATUS) {
646 /* PR interrupt received from REMOTE */
647 write_csr_byte(sc, LOC_CMD1, LC1_CLR_PR_INT);
648 continue;
649 }
650
651 lstat = read_csr_byte(sc, REM_STATUS);
652 if (lstat & RSR_PT_STATUS) {
653 /* PT interrupt is set */
654 write_csr_byte(sc, REM_CMD1, RC1_CLR_PT_INT);
655 continue;
656 }
657 }
658 return (handled);
659 }
660
661 int
662 b3_617_dmamap_create(vsc, len, am, datasize, swap,
663 nsegs, segsz, bound,
664 flags, mapp)
665 void *vsc;
666 vme_size_t len;
667 vme_am_t am;
668 vme_datasize_t datasize;
669 vme_swap_t swap;
670 int nsegs;
671 vme_size_t segsz;
672 vme_addr_t bound;
673 int flags;
674 bus_dmamap_t *mapp;
675 {
676 return (EINVAL);
677 }
678
679 void
680 b3_617_dmamap_destroy(void *vsc, bus_dmamap_t map)
681 {
682 }
683
684 int
685 b3_617_dmamem_alloc(vsc, len, am, datasizes, swap,
686 segs, nsegs, rsegs, flags)
687 void *vsc;
688 vme_size_t len;
689 vme_am_t am;
690 vme_datasize_t datasizes;
691 vme_swap_t swap;
692 bus_dma_segment_t *segs;
693 int nsegs;
694 int *rsegs;
695 int flags;
696 {
697 return (EINVAL);
698 }
699
700 void
701 b3_617_dmamem_free(void *vsc, bus_dma_segment_t *segs, int nsegs)
702 {
703 }
704
705 #undef sc
706