Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / ddi_put8.9f
blobae1bfe2ae2e1c5da77f5d0f5dbb0b0e97059016d
1 '\" te
2 .\"  Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved
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_PUT8 9F "Nov 1, 2005"
7 .SH NAME
8 ddi_put8, ddi_put16, ddi_put32, ddi_put64, ddi_putb, ddi_putl, ddi_putll,
9 ddi_putw \- write data to the mapped memory address, device register or
10 allocated DMA memory address
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/ddi.h>
15 #include <sys/sunddi.h>
19 \fBvoid\fR \fBddi_put8\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint8_t\fR \fI*dev_addr\fR,
20      \fBuint8_t\fR \fIvalue\fR);
21 .fi
23 .LP
24 .nf
25 \fBvoid\fR \fBddi_put16\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint16_t\fR \fI*dev_addr\fR,
26      \fBuint16_t\fR \fIvalue\fR);
27 .fi
29 .LP
30 .nf
31 \fBvoid\fR \fBddi_put32\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint32_t\fR \fI*dev_addr\fR,
32      \fBuint32_t\fR \fIvalue\fR);
33 .fi
35 .LP
36 .nf
37 \fBvoid\fR \fBddi_put64\fR(\fBddi_acc_handle_t\fR \fIhandle\fR, \fBuint64_t\fR \fI*dev_addr\fR,
38      \fBuint64_t\fR \fIvalue\fR);
39 .fi
41 .SH INTERFACE LEVEL
42 .sp
43 .LP
44 Solaris DDI specific (Solaris DDI). The \fBddi_putb()\fR, \fBddi_putl()\fR,
45 \fBddi_putll()\fR, and \fBddi_putw()\fR functions are obsolete. The
46 \fBddi_put8()\fR function replaces \fBddi_putb()\fR. The \fBddi_put32()\fR
47 function replaces \fBddi_putl()\fR. The \fBddi_put64()\fR function replaces
48 \fBddi_putll()\fR. The \fBddi_put16()\fR function replaces \fBddi_putw()\fR.
49 .SH PARAMETERS
50 .sp
51 .ne 2
52 .na
53 \fB\fIhandle\fR\fR
54 .ad
55 .RS 12n
56 The data access handle returned from setup calls, such as
57 \fBddi_regs_map_setup\fR(9F).
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fB\fIvalue\fR\fR
64 .ad
65 .RS 12n
66 The data to be written to the device.
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fIdev_addr\fR\fR
73 .ad
74 .RS 12n
75 Base device address.
76 .RE
78 .SH DESCRIPTION
79 .sp
80 .LP
81 These routines generate a write of various sizes to the mapped memory or device
82 register. The \fBddi_put8()\fR, \fBddi_put16()\fR, \fBddi_put32()\fR, and
83 \fBddi_put64()\fR functions write 8 bits, 16 bits, 32 bits and 64 bits of data,
84 respectively, to the device address, \fIdev_addr\fR.
85 .sp
86 .LP
87 Each individual datum will automatically be translated to maintain a consistent
88 view between the host and the device based on the encoded information in the
89 data access handle. The translation may involve byte-swapping if the host and
90 the device have incompatible endian characteristics.
91 .sp
92 .LP
93 For certain bus types, you can call these \fBDDI\fR functions from a
94 high-interrupt context. These types include \fBISA\fR and SBus buses.  See
95 \fBsysbus\fR(4), \fBisa\fR(4), and \fBsbus\fR(4) for details. For the PCI bus,
96 you can, under certain conditions, call these \fBDDI\fR functions from a
97 high-interrupt context. See \fBpci\fR(4).
98 .SH CONTEXT
99 .sp
101 These functions can be called from user, kernel, or interrupt context.
102 .SH ATTRIBUTES
105 See \fBattributes\fR(5) for descriptions of the following attributes:
110 box;
111 c | c
112 l | l .
113 ATTRIBUTE TYPE  ATTRIBUTE VALUE
115 Interface Stability     T{
116 \fBddi_putb()\fR, \fBddi_putl()\fR, \fBddi_putll()\fR, and \fBddi_putw()\fR are Obsolete \fBddi_put8()\fR, \fBddi_put16()\fR, \fBddi_put32()\fR, \fBddi_put64()\fR are Committed
120 .SH SEE ALSO
123 \fBddi_get8\fR(9F), \fBddi_regs_map_free\fR(9F), \fBddi_regs_map_setup\fR(9F),
124 \fBddi_rep_get8\fR(9F), \fBddi_rep_put8\fR(9F), \fBddi_device_acc_attr\fR(9S)