2 .\" Copyright (c) 2006, Sun Microsystems, Inc.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH DDI_DMA_BUF_SETUP 9F "Jan 16, 2006"
8 ddi_dma_buf_setup \- easier DMA setup for use with buffer structures
13 #include <sys/sunddi.h>
17 \fBint\fR \fBddi_dma_buf_setup\fR(\fBdev_info_t *\fR\fIdip\fR, \fBstruct buf *\fR\fIbp\fR, \fBuint_t\fR \fIflags\fR,
18 \fBint (*\fR\fIwaitfp\fR) (caddr_t),, \fBcaddr_t\fR \fIarg\fR, \fBddi_dma_lim_t *\fR\fIlim\fR,
19 \fBddi_dma_handle_t *\fR\fIhandlep\fR);
25 This interface is obsolete. \fBddi_dma_buf_bind_handle\fR(9F) should be used
34 A pointer to the device's \fBdev_info\fR structure.
43 A pointer to a system buffer structure (see \fBbuf\fR(9S)).
52 Flags that go into a \fBddi_dma_req\fR structure (see \fBddi_dma_req\fR(9S)).
61 The address of a function to call back later if resources aren't available now.
62 The special function addresses \fBDDI_DMA_SLEEP\fR and \fBDDI_DMA_DONTWAIT\fR
63 (see \fBddi_dma_req\fR(9S)) are taken to mean, respectively, wait until
64 resources are available, or do not wait at all and do not schedule a callback.
73 Argument to be passed to a callback function, if such a function is specified.
82 A pointer to a \fBDMA\fR limits structure for this device (see
83 \fBddi_dma_lim_sparc\fR(9S) or \fBddi_dma_lim_x86\fR(9S)). If this pointer is
84 \fINULL\fR, a default set of \fBDMA\fR limits is assumed.
93 Pointer to a \fBDMA\fR handle. See \fBddi_dma_setup\fR(9F) for a discussion of
100 The \fBddi_dma_buf_setup()\fR function is an interface to
101 \fBddi_dma_setup\fR(9F). It uses its arguments to construct an appropriate
102 \fBddi_dma_req\fR structure and calls \fBddi_dma_setup()\fR with it.
106 See \fBddi_dma_setup\fR(9F) for the possible return values for this function.
110 The \fBddi_dma_buf_setup()\fR function can be called from user, interrupt, or
111 kernel context, except when \fIwaitfp\fR is set to \fBDDI_DMA_SLEEP\fR, in
112 which case it cannot be called from interrupt context.
116 See \fBattributes\fR(5) for a description of the following attributes:
124 ATTRIBUTE TYPE ATTRIBUTE VALUE
126 Stability Level Obsolete
132 \fBattributes\fR(5), \fBddi_dma_addr_setup\fR(9F), \fBddi_dma_free\fR(9F),
133 \fBddi_dma_htoc\fR(9F), \fBddi_dma_setup\fR(9F), \fBddi_dma_sync\fR(9F),
134 \fBphysio\fR(9F), \fBbuf\fR(9S), \fBddi_dma_lim_sparc\fR(9S),
135 \fBddi_dma_lim_x86\fR(9S), \fBddi_dma_req\fR(9S)
138 \fIWriting Device Drivers\fR