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>
  14 
  15 
  16 
  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
  20 
  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
  26 
  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
  32 
  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
  38 
  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
  52 
  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
  62 
  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
  74 
  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
 100 .sp
 101 .LP
 102 The structure members of \fBcistpl_device_t\fR are:
 103 .sp
 104 .in +2
 105 .nf
 106 uint32_t               num_devices;    /* number of devices found */
 107 cistpl_device_node_t   devnode[CISTPL_DEVICE_MAX_DEVICES];
 108 .fi
 109 .in -2
 110 
 111 .sp
 112 .LP
 113 The structure members of \fBcistpl_device_node_t\fR are:
 114 .sp
 115 .in +2
 116 .nf
 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 */
 124 .fi
 125 .in -2
 126 
 127 .sp
 128 .LP
 129 The fields are defined as follows:
 130 .sp
 131 .ne 2
 132 .na
 133 \fB\fBflags\fR\fR
 134 .ad
 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.
 138 .sp
 139 .ne 2
 140 .na
 141 \fBCISTPL_DEVICE_WPS\fR
 142 .ad
 143 .RS 21n
 144 Write Protect Switch bit is set
 145 .RE
 146 
 147 Bits which are applicable only for \fBCISTPL_DEVICE_OC\fR and
 148 \fBCISTPL_DEVICE_OA\fR are:
 149 .sp
 150 .ne 2
 151 .na
 152 \fBCISTPL_DEVICE_OC_MWAIT\fR
 153 .ad
 154 .RS 29n
 155 Use MWAIT
 156 .RE
 157 
 158 .sp
 159 .ne 2
 160 .na
 161 \fBCISTPL_DEVICE_OC_Vcc_MASK\fR
 162 .ad
 163 .RS 29n
 164 Mask for \fBVcc\fR value
 165 .RE
 166 
 167 .sp
 168 .ne 2
 169 .na
 170 \fBCISTPL_DEVICE_OC_Vcc5\fR
 171 .ad
 172 .RS 29n
 173 5.0 volt operation
 174 .RE
 175 
 176 .sp
 177 .ne 2
 178 .na
 179 \fBCISTPL_DEVICE_OC_Vcc33\fR
 180 .ad
 181 .RS 29n
 182 3.3 volt operation
 183 .RE
 184 
 185 .sp
 186 .ne 2
 187 .na
 188 \fBCISTPL_DEVICE_OC_VccXX\fR
 189 .ad
 190 .RS 29n
 191 X.X volt operation
 192 .RE
 193 
 194 .sp
 195 .ne 2
 196 .na
 197 \fBCISTPL_DEVICE_OC_VccYY\fR
 198 .ad
 199 .RS 29n
 200 Y.Y volt operation
 201 .RE
 202 
 203 .RE
 204 
 205 .sp
 206 .ne 2
 207 .na
 208 \fB\fBspeed\fR\fR
 209 .ad
 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.
 214 .RE
 215 
 216 .sp
 217 .ne 2
 218 .na
 219 \fB\fBnS_speed\fR\fR
 220 .ad
 221 .RS 17n
 222 The device speed value described in nanosecond units.
 223 .RE
 224 
 225 .sp
 226 .ne 2
 227 .na
 228 \fB\fBsize\fR\fR
 229 .ad
 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.
 234 .RE
 235 
 236 .sp
 237 .ne 2
 238 .na
 239 \fB\fBsize_in_bytes\fR\fR
 240 .ad
 241 .RS 17n
 242 The device size value described in byte units.
 243 .RE
 244 
 245 .sp
 246 .ne 2
 247 .na
 248 \fB\fBtype\fR\fR
 249 .ad
 250 .RS 17n
 251 This is the device type code field which is defined as follows:
 252 .sp
 253 .ne 2
 254 .na
 255 \fBCISTPL_DEVICE_DTYPE_NULL\fR
 256 .ad
 257 .sp .6
 258 .RS 4n
 259 No device
 260 .RE
 261 
 262 .sp
 263 .ne 2
 264 .na
 265 \fBCISTPL_DEVICE_DTYPE_ROM\fR
 266 .ad
 267 .sp .6
 268 .RS 4n
 269 Masked ROM
 270 .RE
 271 
 272 .sp
 273 .ne 2
 274 .na
 275 \fBCISTPL_DEVICE_DTYPE_OTPROM\fR
 276 .ad
 277 .sp .6
 278 .RS 4n
 279 One Time Programmable ROM
 280 .RE
 281 
 282 .sp
 283 .ne 2
 284 .na
 285 \fBCISTPL_DEVICE_DTYPE_EPROM\fR
 286 .ad
 287 .sp .6
 288 .RS 4n
 289 UV EPROM
 290 .RE
 291 
 292 .sp
 293 .ne 2
 294 .na
 295 \fBCISTPL_DEVICE_DTYPE_EEPROM\fR
 296 .ad
 297 .sp .6
 298 .RS 4n
 299 EEPROM
 300 .RE
 301 
 302 .sp
 303 .ne 2
 304 .na
 305 \fBCISTPL_DEVICE_DTYPE_FLASH\fR
 306 .ad
 307 .sp .6
 308 .RS 4n
 309 FLASH
 310 .RE
 311 
 312 .sp
 313 .ne 2
 314 .na
 315 \fBCISTPL_DEVICE_DTYPE_SRAM\fR
 316 .ad
 317 .sp .6
 318 .RS 4n
 319 Static RAM
 320 .RE
 321 
 322 .sp
 323 .ne 2
 324 .na
 325 \fBCISTPL_DEVICE_DTYPE_DRAM\fR
 326 .ad
 327 .sp .6
 328 .RS 4n
 329 Dynamic RAM
 330 .RE
 331 
 332 .sp
 333 .ne 2
 334 .na
 335 \fBCISTPL_DEVICE_DTYPE_FUNCSPEC\fR
 336 .ad
 337 .sp .6
 338 .RS 4n
 339 Function-specific memory address range
 340 .RE
 341 
 342 .sp
 343 .ne 2
 344 .na
 345 \fBCISTPL_DEVICE_DTYPE_EXTEND\fR
 346 .ad
 347 .sp .6
 348 .RS 4n
 349 Extended type follows
 350 .RE
 351 
 352 .RE
 353 
 354 .SH RETURN VALUES
 355 .sp
 356 .ne 2
 357 .na
 358 \fB\fBCS_SUCCESS\fR\fR
 359 .ad
 360 .RS 27n
 361 Successful operation.
 362 .RE
 363 
 364 .sp
 365 .ne 2
 366 .na
 367 \fB\fBCS_BAD_HANDLE\fR\fR
 368 .ad
 369 .RS 27n
 370 Client handle is invalid.
 371 .RE
 372 
 373 .sp
 374 .ne 2
 375 .na
 376 \fB\fBCS_UNKNOWN_TUPLE\fR\fR
 377 .ad
 378 .RS 27n
 379 Parser does not know how to parse tuple.
 380 .RE
 381 
 382 .sp
 383 .ne 2
 384 .na
 385 \fB\fBCS_NO_CARD\fR\fR
 386 .ad
 387 .RS 27n
 388 No \fBPC \fRCard in socket.
 389 .RE
 390 
 391 .sp
 392 .ne 2
 393 .na
 394 \fB\fBCS_NO_CIS\fR\fR
 395 .ad
 396 .RS 27n
 397 No Card Information Structure (CIS) on \fBPC \fRCard.
 398 .RE
 399 
 400 .sp
 401 .ne 2
 402 .na
 403 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
 404 .ad
 405 .RS 27n
 406 No \fBPCMCIA \fRhardware installed.
 407 .RE
 408 
 409 .SH CONTEXT
 410 .sp
 411 .LP
 412 These functions may be called from user or kernel context.
 413 .SH SEE ALSO
 414 .sp
 415 .LP
 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)
 419 .sp
 420 .LP
 421 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR