8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / man / man9f / csx_Parse_CISTPL_DEVICE.9f
blobd467b353c094e49fc83f369d3c119e7473c42dbb
1 '\" te
2 .\"  Copyright (c) 2002, 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 CSX_PARSE_CISTPL_DEVICE 9F "Dec 20, 1996"
7 .SH NAME
8 csx_Parse_CISTPL_DEVICE, csx_Parse_CISTPL_DEVICE_A, csx_Parse_CISTPL_DEVICE_OC,
9 csx_Parse_CISTPL_DEVICE_OA \- parse Device Information tuples
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/pccard.h>
17 \fBint32_t\fR \fBcsx_Parse_CISTPL_DEVICE\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
18      \fBcistpl_device_t *\fR\fIcd\fR);
19 .fi
21 .LP
22 .nf
23 \fBint32_t\fR \fBcsx_Parse_CISTPL_DEVICE_A\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
24      \fBcistpl_device_t *\fR\fIcd\fR);
25 .fi
27 .LP
28 .nf
29 \fBint32_t\fR \fBcsx_Parse_CISTPL_DEVICE_OC\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
30      \fBcistpl_device_t *\fR\fIcd\fR);
31 .fi
33 .LP
34 .nf
35 \fBint32_t\fR \fBcsx_Parse_CISTPL_DEVICE_OA\fR(\fBclient_handle_t\fR \fIch\fR, \fBtuple_t *\fR\fItu\fR,
36      \fBcistpl_device_t *\fR\fIcd\fR);
37 .fi
39 .SH INTERFACE LEVEL
40 .sp
41 .LP
42 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
43 .SH PARAMETERS
44 .sp
45 .ne 2
46 .na
47 \fB\fIch\fR\fR
48 .ad
49 .RS 6n
50 Client handle returned from \fBcsx_RegisterClient\fR(9F).
51 .RE
53 .sp
54 .ne 2
55 .na
56 \fB\fItu\fR\fR
57 .ad
58 .RS 6n
59 Pointer to a \fBtuple_t\fR structure (see \fBtuple\fR(9S)) returned by a call
60 to \fBcsx_GetFirstTuple\fR(9F) or \fBcsx_GetNextTuple\fR(9F).
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fIcd\fR\fR
67 .ad
68 .RS 6n
69 Pointer to a \fBcistpl_device_t\fR structure which contains the parsed
70 \fBCISTPL_DEVICE,\fR \fBCISTPL_DEVICE_A,\fR \fBCISTPL_DEVICE_OC,\fR or
71 \fBCISTPL_DEVICE_OA\fR tuple information upon return from these functions,
72 respectively.
73 .RE
75 .SH DESCRIPTION
76 .sp
77 .LP
78 \fBcsx_Parse_CISTPL_DEVICE()\fR and \fBcsx_Parse_CISTPL_DEVICE_A()\fR parse the
79 5 volt Device Information tuples, \fBCISTPL_DEVICE\fR and
80 \fBCISTPL_DEVICE_A,\fR respectively, into a form usable by \fBPC \fRCard
81 drivers.
82 .sp
83 .LP
84 \fBcsx_Parse_CISTPL_DEVICE_OC()\fR and \fBcsx_Parse_CISTPL_DEVICE_OA()\fR parse
85 the Other Condition Device Information tuples, \fBCISTPL_DEVICE_OC\fR and
86 \fBCISTPL_DEVICE_OA,\fR respectively, into a form usable by \fBPC \fRCard
87 drivers.
88 .sp
89 .LP
90 The \fBCISTPL_DEVICE\fR and \fBCISTPL_DEVICE_A\fR tuples are used to describe
91 the card's device information, such as device speed, device size, device type,
92 and address space layout information for Common Memory or Attribute Memory
93 space, respectively.
94 .sp
95 .LP
96 The \fBCISTPL_DEVICE_OC\fR and \fBCISTPL_DEVICE_OA\fR tuples are used to
97 describe the information about the card's device under a set of operating
98 conditions for Common Memory or Attribute Memory space, respectively.
99 .SH STRUCTURE MEMBERS
102 The structure members of \fBcistpl_device_t\fR are:
104 .in +2
106 uint32_t               num_devices;    /* number of devices found */
107 cistpl_device_node_t   devnode[CISTPL_DEVICE_MAX_DEVICES];
109 .in -2
113 The structure members of \fBcistpl_device_node_t\fR are:
115 .in +2
117 uint32_t     flags;             /* flags specific to this device */
118 uint32_t     speed;             /* device speed in device
119                                 /*  speed code format */
120 uint32_t     nS_speed;          /* device speed in nS */
121 uint32_t     type;              /* device type */
122 uint32_t     size;              /* device size */
123 uint32_t     size_in_bytes;     /* device size in bytes */
125 .in -2
129 The fields are defined as follows:
131 .ne 2
133 \fB\fBflags\fR\fR
135 .RS 9n
136 This field indicates whether or not the device is writable, and describes a
137 \fBVcc\fR voltage at which the \fBPC \fRCard can be operated.
139 .ne 2
141 \fBCISTPL_DEVICE_WPS\fR
143 .RS 21n
144 Write Protect Switch bit is set
147 Bits which are applicable only for \fBCISTPL_DEVICE_OC\fR and
148 \fBCISTPL_DEVICE_OA\fR are:
150 .ne 2
152 \fBCISTPL_DEVICE_OC_MWAIT\fR
154 .RS 29n
155 Use MWAIT
159 .ne 2
161 \fBCISTPL_DEVICE_OC_Vcc_MASK\fR
163 .RS 29n
164 Mask for \fBVcc\fR value
168 .ne 2
170 \fBCISTPL_DEVICE_OC_Vcc5\fR
172 .RS 29n
173 5.0 volt operation
177 .ne 2
179 \fBCISTPL_DEVICE_OC_Vcc33\fR
181 .RS 29n
182 3.3 volt operation
186 .ne 2
188 \fBCISTPL_DEVICE_OC_VccXX\fR
190 .RS 29n
191 X.X volt operation
195 .ne 2
197 \fBCISTPL_DEVICE_OC_VccYY\fR
199 .RS 29n
200 Y.Y volt operation
206 .ne 2
208 \fB\fBspeed\fR\fR
210 .RS 17n
211 The device speed value described in the device speed code unit. If this field
212 is set to \fBCISTPL_DEVICE_SPEED_SIZE_IGNORE,\fR then the speed information
213 will be ignored.
217 .ne 2
219 \fB\fBnS_speed\fR\fR
221 .RS 17n
222 The device speed value described in nanosecond units.
226 .ne 2
228 \fB\fBsize\fR\fR
230 .RS 17n
231 The device size value described in the device size code unit. If this field is
232 set to \fBCISTPL_DEVICE_SPEED_SIZE_IGNORE,\fR then the size information will be
233 ignored.
237 .ne 2
239 \fB\fBsize_in_bytes\fR\fR
241 .RS 17n
242 The device size value described in byte units.
246 .ne 2
248 \fB\fBtype\fR\fR
250 .RS 17n
251 This is the device type code field which is defined as follows:
253 .ne 2
255 \fBCISTPL_DEVICE_DTYPE_NULL\fR
257 .sp .6
258 .RS 4n
259 No device
263 .ne 2
265 \fBCISTPL_DEVICE_DTYPE_ROM\fR
267 .sp .6
268 .RS 4n
269 Masked ROM
273 .ne 2
275 \fBCISTPL_DEVICE_DTYPE_OTPROM\fR
277 .sp .6
278 .RS 4n
279 One Time Programmable ROM
283 .ne 2
285 \fBCISTPL_DEVICE_DTYPE_EPROM\fR
287 .sp .6
288 .RS 4n
289 UV EPROM
293 .ne 2
295 \fBCISTPL_DEVICE_DTYPE_EEPROM\fR
297 .sp .6
298 .RS 4n
299 EEPROM
303 .ne 2
305 \fBCISTPL_DEVICE_DTYPE_FLASH\fR
307 .sp .6
308 .RS 4n
309 FLASH
313 .ne 2
315 \fBCISTPL_DEVICE_DTYPE_SRAM\fR
317 .sp .6
318 .RS 4n
319 Static RAM
323 .ne 2
325 \fBCISTPL_DEVICE_DTYPE_DRAM\fR
327 .sp .6
328 .RS 4n
329 Dynamic RAM
333 .ne 2
335 \fBCISTPL_DEVICE_DTYPE_FUNCSPEC\fR
337 .sp .6
338 .RS 4n
339 Function-specific memory address range
343 .ne 2
345 \fBCISTPL_DEVICE_DTYPE_EXTEND\fR
347 .sp .6
348 .RS 4n
349 Extended type follows
354 .SH RETURN VALUES
356 .ne 2
358 \fB\fBCS_SUCCESS\fR\fR
360 .RS 27n
361 Successful operation.
365 .ne 2
367 \fB\fBCS_BAD_HANDLE\fR\fR
369 .RS 27n
370 Client handle is invalid.
374 .ne 2
376 \fB\fBCS_UNKNOWN_TUPLE\fR\fR
378 .RS 27n
379 Parser does not know how to parse tuple.
383 .ne 2
385 \fB\fBCS_NO_CARD\fR\fR
387 .RS 27n
388 No \fBPC \fRCard in socket.
392 .ne 2
394 \fB\fBCS_NO_CIS\fR\fR
396 .RS 27n
397 No Card Information Structure (CIS) on \fBPC \fRCard.
401 .ne 2
403 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
405 .RS 27n
406 No \fBPCMCIA \fRhardware installed.
409 .SH CONTEXT
412 These functions may be called from user or kernel context.
413 .SH SEE ALSO
416 \fBcsx_GetFirstTuple\fR(9F), \fBcsx_GetTupleData\fR(9F),
417 \fBcsx_Parse_CISTPL_JEDEC_C\fR(9F), \fBcsx_RegisterClient\fR(9F),
418 \fBcsx_ValidateCIS\fR(9F), \fBtuple\fR(9S)
421 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR