Copyright (c) 2002, 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]
#include <sys/pccard.h> int32_t csx_Parse_CISTPL_DEVICE(client_handle_t ch, tuple_t *tu, cistpl_device_t *cd);
int32_t csx_Parse_CISTPL_DEVICE_A(client_handle_t ch, tuple_t *tu, cistpl_device_t *cd);
int32_t csx_Parse_CISTPL_DEVICE_OC(client_handle_t ch, tuple_t *tu, cistpl_device_t *cd);
int32_t csx_Parse_CISTPL_DEVICE_OA(client_handle_t ch, tuple_t *tu, cistpl_device_t *cd);
Client handle returned from csx_RegisterClient(9F).
Pointer to a tuple_t structure (see tuple(9S)) returned by a call to csx_GetFirstTuple(9F) or csx_GetNextTuple(9F).
Pointer to a cistpl_device_t structure which contains the parsed CISTPL_DEVICE, CISTPL_DEVICE_A, CISTPL_DEVICE_OC, or CISTPL_DEVICE_OA tuple information upon return from these functions, respectively.
csx_Parse_CISTPL_DEVICE_OC() and csx_Parse_CISTPL_DEVICE_OA() parse the Other Condition Device Information tuples, CISTPL_DEVICE_OC and CISTPL_DEVICE_OA, respectively, into a form usable by PC Card drivers.
The CISTPL_DEVICE and CISTPL_DEVICE_A tuples are used to describe the card's device information, such as device speed, device size, device type, and address space layout information for Common Memory or Attribute Memory space, respectively.
The CISTPL_DEVICE_OC and CISTPL_DEVICE_OA tuples are used to describe the information about the card's device under a set of operating conditions for Common Memory or Attribute Memory space, respectively.
uint32_t num_devices; /* number of devices found */ cistpl_device_node_t devnode[CISTPL_DEVICE_MAX_DEVICES];
The structure members of cistpl_device_node_t are:
uint32_t flags; /* flags specific to this device */ uint32_t speed; /* device speed in device /* speed code format */ uint32_t nS_speed; /* device speed in nS */ uint32_t type; /* device type */ uint32_t size; /* device size */ uint32_t size_in_bytes; /* device size in bytes */
The fields are defined as follows: flags
This field indicates whether or not the device is writable, and describes a Vcc voltage at which the PC Card can be operated. CISTPL_DEVICE_WPS
Write Protect Switch bit is set
Use MWAIT
Mask for Vcc value
5.0 volt operation
3.3 volt operation
X.X volt operation
Y.Y volt operation
The device speed value described in the device speed code unit. If this field is set to CISTPL_DEVICE_SPEED_SIZE_IGNORE, then the speed information will be ignored.
The device speed value described in nanosecond units.
The device size value described in the device size code unit. If this field is set to CISTPL_DEVICE_SPEED_SIZE_IGNORE, then the size information will be ignored.
The device size value described in byte units.
This is the device type code field which is defined as follows: CISTPL_DEVICE_DTYPE_NULL
No device
Masked ROM
One Time Programmable ROM
UV EPROM
EEPROM
FLASH
Static RAM
Dynamic RAM
Function-specific memory address range
Extended type follows
Successful operation.
Client handle is invalid.
Parser does not know how to parse tuple.
No PC Card in socket.
No Card Information Structure (CIS) on PC Card.
No PCMCIA hardware installed.