xref: /freebsd/sys/riscv/riscv/busdma_machdep.c (revision acc1a9ef)
1 /*-
2  * Copyright (c) 1997, 1998 Justin T. Gibbs.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions, and the following disclaimer,
9  *    without modification, immediately at the beginning of the file.
10  * 2. The name of the author may not be used to endorse or promote products
11  *    derived from this software without specific prior written permission.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
17  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23  * SUCH DAMAGE.
24  */
25 
26 #include <sys/cdefs.h>
27 __FBSDID("$FreeBSD$");
28 
29 #include <sys/param.h>
30 #include <sys/systm.h>
31 #include <sys/malloc.h>
32 #include <sys/bus.h>
33 #include <sys/kernel.h>
34 #include <sys/ktr.h>
35 #include <sys/lock.h>
36 #include <sys/memdesc.h>
37 #include <sys/mutex.h>
38 #include <sys/uio.h>
39 #include <vm/vm.h>
40 #include <vm/vm_extern.h>
41 #include <vm/pmap.h>
42 
43 #include <machine/bus.h>
44 
45 int
46 _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
47     bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp)
48 {
49 
50 	panic("busdma");
51 }
52 
53 int
54 _bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmamap_t map, struct vm_page **ma,
55     bus_size_t tlen, int ma_offs, int flags, bus_dma_segment_t *segs,
56     int *segp)
57 {
58 
59 	panic("busdma");
60 }
61 
62 int
63 _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
64     bus_size_t buflen, pmap_t pmap, int flags, bus_dma_segment_t *segs,
65     int *segp)
66 {
67 
68 	panic("busdma");
69 }
70 
71 void
72 __bus_dmamap_waitok(bus_dma_tag_t dmat, bus_dmamap_t map,
73     struct memdesc *mem, bus_dmamap_callback_t *callback, void *callback_arg)
74 {
75 
76 	panic("busdma");
77 }
78 
79 bus_dma_segment_t *
80 _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map,
81     bus_dma_segment_t *segs, int nsegs, int error)
82 {
83 
84 	panic("busdma");
85 }
86 
87 /*
88  * Release the mapping held by map.
89  */
90 void
91 _bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t map)
92 {
93 
94 	panic("busdma");
95 }
96 
97 void
98 _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
99 {
100 
101 	panic("busdma");
102 }
103