diff options
Diffstat (limited to 'sys/ia64/include/bus.h')
-rw-r--r-- | sys/ia64/include/bus.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/ia64/include/bus.h b/sys/ia64/include/bus.h index bc15d08..7a5c0f4 100644 --- a/sys/ia64/include/bus.h +++ b/sys/ia64/include/bus.h @@ -905,6 +905,17 @@ typedef struct bus_dma_segment { typedef int bus_dma_filter_t(void *, bus_addr_t); /* + * A function that performs driver-specific syncronization on behalf of + * busdma. + */ +typedef enum { + BUS_DMA_LOCK = 0x01, + BUS_DMA_UNLOCK = 0x02, +} bus_dma_lock_op_t; + +typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); + +/* * Allocate a device specific dma_tag encapsulating the constraints of * the parent tag in addition to other restrictions specified: * @@ -928,7 +939,8 @@ typedef int bus_dma_filter_t(void *, bus_addr_t); int bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignemnt, bus_size_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, bus_dma_filter_t *filtfunc, void *filtfuncarg, bus_size_t maxsize, - int nsegments, bus_size_t maxsegsz, int flags, bus_dma_tag_t *dmat); + int nsegments, bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc, + void *lockfuncarg, bus_dma_tag_t *dmat); int bus_dma_tag_destroy(bus_dma_tag_t dmat); @@ -1016,4 +1028,8 @@ bus_dmamap_unload(bus_dma_tag_t dmat, bus_dmamap_t dmamap) _bus_dmamap_unload(dmat, dmamap); } +/* + * Generic helper function for manipulating mutexes. + */ +void busdma_lock_mutex(void *arg, bus_dma_lock_op_t op); #endif /* _MACHINE_BUS_H_ */ |