blob: f59cb89d08eae099baff601203cdeeeb2dc9e751 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
'\" te
.\" Copyright (c) 1995, Sun Microsystems, Inc. , All Rights Reserved
.\" 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.
.\" 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.
.\" 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]
.TH PCI_CONFIG_SETUP 9F "Mar 27, 2016"
.SH NAME
pci_config_setup, pci_config_teardown \- setup or tear down the resources for
enabling accesses to the PCI Local Bus Configuration space
.SH SYNOPSIS
.LP
.nf
#include <sys/ddi.h>
#include <sys/sunddi.h>
\fBint\fR \fBpci_config_setup\fR(\fBdev_info_t\fR \fI*dip\fR, \fBddi_acc_handle_t\fR \fI*handle\fR);
.fi
.LP
.nf
\fBvoid\fR \fBpci_config_teardown\fR(\fBddi_acc_handle_t\fR \fI*handle\fR);
.fi
.SH INTERFACE LEVEL
.LP
Solaris DDI specific (Solaris DDI).
.SH PARAMETERS
.ne 2
.na
\fB\fIdip\fR \fR
.ad
.RS 11n
Pointer to the device's \fBdev_info\fR structure.
.RE
.sp
.ne 2
.na
\fB\fIhandle\fR \fR
.ad
.RS 11n
Pointer to a data access handle.
.RE
.SH DESCRIPTION
.LP
\fBpci_config_setup()\fR sets up the necessary resources for enabling
subsequent data accesses to the \fBPCI \fRLocal Bus Configuration space.
\fBpci_config_teardown()\fR reclaims and removes those resources represented
by the data access handle returned from \fBpci_config_setup()\fR.
.SH RETURN VALUES
.LP
\fBpci_config_setup()\fR returns:
.sp
.ne 2
.na
\fB\fBDDI_SUCCESS\fR \fR
.ad
.RS 16n
Successfully setup the resources.
.RE
.sp
.ne 2
.na
\fB\fBDDI_FAILURE\fR \fR
.ad
.RS 16n
Unable to allocate resources for setup.
.RE
.SH CONTEXT
.LP
\fBpci_config_setup()\fR must be called from user or kernel context.
\fBpci_config_teardown()\fR can be called from any context.
.SH NOTES
.LP
These functions are specific to \fBPCI \fRbus device drivers. For drivers using
these functions, a single source to support devices with multiple bus versions
may not be easy to maintain.
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Architecture PCI Local Bus
.TE
.SH SEE ALSO
.LP
\fBattributes\fR(5)
.sp
.LP
\fIIEEE 1275 PCI Bus Binding\fR
|