Lines Matching defs:busdma

58 	struct proto_busdma *busdma;
64 proto_busdma_tag_create(struct proto_busdma *busdma, struct proto_tag *parent,
110 LIST_INSERT_HEAD(&busdma->tags, tag, tags);
116 proto_busdma_tag_destroy(struct proto_busdma *busdma, struct proto_tag *tag)
134 proto_busdma_tag_lookup(struct proto_busdma *busdma, u_long key)
138 LIST_FOREACH(tag, &busdma->tags, tags) {
146 proto_busdma_md_destroy_internal(struct proto_busdma *busdma,
174 proto_busdma_mem_alloc(struct proto_busdma *busdma, struct proto_tag *tag,
184 error = bus_dma_tag_create(busdma->bd_roottag, tag->align, tag->bndry,
198 pcb.busdma = busdma;
210 LIST_INSERT_HEAD(&busdma->mds, md, mds);
220 proto_busdma_mem_free(struct proto_busdma *busdma, struct proto_md *md)
225 return (proto_busdma_md_destroy_internal(busdma, md));
229 proto_busdma_md_create(struct proto_busdma *busdma, struct proto_tag *tag,
238 error = bus_dma_tag_create(busdma->bd_roottag, tag->align, tag->bndry,
253 LIST_INSERT_HEAD(&busdma->mds, md, mds);
259 proto_busdma_md_destroy(struct proto_busdma *busdma, struct proto_md *md)
264 return (proto_busdma_md_destroy_internal(busdma, md));
278 proto_busdma_md_load(struct proto_busdma *busdma, struct proto_md *md,
297 pcb.busdma = busdma;
314 proto_busdma_md_unload(struct proto_busdma *busdma, struct proto_md *md)
325 proto_busdma_sync(struct proto_busdma *busdma, struct proto_md *md,
341 proto_busdma_md_lookup(struct proto_busdma *busdma, u_long key)
345 LIST_FOREACH(md, &busdma->mds, mds) {
355 struct proto_busdma *busdma;
357 busdma = malloc(sizeof(*busdma), M_PROTO_BUSDMA, M_WAITOK | M_ZERO);
358 return (busdma);
362 proto_busdma_detach(struct proto_softc *sc, struct proto_busdma *busdma)
365 proto_busdma_cleanup(sc, busdma);
366 free(busdma, M_PROTO_BUSDMA);
371 proto_busdma_cleanup(struct proto_softc *sc, struct proto_busdma *busdma)
376 LIST_FOREACH_SAFE(md, &busdma->mds, mds, md1)
377 proto_busdma_md_destroy_internal(busdma, md);
378 LIST_FOREACH_SAFE(tag, &busdma->tags, tags, tag1)
379 proto_busdma_tag_destroy(busdma, tag);
384 proto_busdma_ioctl(struct proto_softc *sc, struct proto_busdma *busdma,
394 busdma->bd_roottag = bus_get_dma_tag(sc->sc_dev);
395 error = proto_busdma_tag_create(busdma, NULL, ioc);
398 tag = proto_busdma_tag_lookup(busdma, ioc->key);
403 error = proto_busdma_tag_create(busdma, tag, ioc);
406 tag = proto_busdma_tag_lookup(busdma, ioc->key);
411 error = proto_busdma_tag_destroy(busdma, tag);
414 tag = proto_busdma_tag_lookup(busdma, ioc->u.md.tag);
419 error = proto_busdma_mem_alloc(busdma, tag, ioc);
422 md = proto_busdma_md_lookup(busdma, ioc->key);
427 error = proto_busdma_mem_free(busdma, md);
430 tag = proto_busdma_tag_lookup(busdma, ioc->u.md.tag);
435 error = proto_busdma_md_create(busdma, tag, ioc);
438 md = proto_busdma_md_lookup(busdma, ioc->key);
443 error = proto_busdma_md_destroy(busdma, md);
446 md = proto_busdma_md_lookup(busdma, ioc->key);
451 error = proto_busdma_md_load(busdma, md, ioc, td);
454 md = proto_busdma_md_lookup(busdma, ioc->key);
459 error = proto_busdma_md_unload(busdma, md);
462 md = proto_busdma_md_lookup(busdma, ioc->key);
467 error = proto_busdma_sync(busdma, md, ioc);
477 proto_busdma_mmap_allowed(struct proto_busdma *busdma, vm_paddr_t physaddr)
481 LIST_FOREACH(md, &busdma->mds, mds) {