Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / rump / dev / wip / libusb / bus_dma.c
blob4263c03b3965aedd355cb8b0287ff40a99062ef9
1 /* $NetBSD$ */
3 #include <sys/param.h>
4 #include <sys/types.h>
5 #include <sys/conf.h>
6 #include <sys/device.h>
7 #include <sys/kmem.h>
9 #include <machine/bus.h>
12 * bus dma "implementation" for rump. needs "a little" more work
15 int
16 bus_dmamap_create(bus_dma_tag_t tag, bus_size_t sz, int flag, bus_size_t bsz,
17 bus_size_t bsz2, int i, bus_dmamap_t *ptr)
20 return 0;
23 void
24 bus_dmamap_destroy(bus_dma_tag_t tag, bus_dmamap_t map)
27 panic("unimplemented %s", __func__);
30 int
31 bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t a, void *b, bus_size_t c,
32 struct proc *d, int e)
35 return 0;
38 void
39 bus_dmamap_unload(bus_dma_tag_t a, bus_dmamap_t b)
42 panic("unimplemented %s", __func__);
45 void
46 bus_dmamap_sync(bus_dma_tag_t a, bus_dmamap_t b, bus_addr_t c,
47 bus_size_t d, int e)
50 panic("unimplemented %s", __func__);
53 int
54 bus_dmamem_alloc(bus_dma_tag_t tag, bus_size_t size, bus_size_t align,
55 bus_size_t boundary, bus_dma_segment_t *segs, int nsegs,
56 int *rsegs, int flags)
59 *rsegs = nsegs;
60 return 0;
63 void
64 bus_dmamem_free(bus_dma_tag_t a, bus_dma_segment_t *b, int c)
67 panic("unimplemented %s", __func__);
70 int
71 bus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs,
72 size_t size, void **kvap, int flags)
75 KASSERT(nsegs == 1);
76 *kvap = kmem_alloc(size, KM_SLEEP);
77 return 0;
80 void
81 bus_dmamem_unmap(bus_dma_tag_t a, void *kva, size_t b)
84 panic("unimplemented %s", __func__);