xref: /illumos-gate/usr/src/man/man9f/csx_Parse_CISTPL_DEVICE.9f (revision 6446bd46ed1b4e9f69da153665f82181ccaedad5)
te
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]
CSX_PARSE_CISTPL_DEVICE 9F "Dec 20, 1996"
NAME
csx_Parse_CISTPL_DEVICE, csx_Parse_CISTPL_DEVICE_A, csx_Parse_CISTPL_DEVICE_OC, csx_Parse_CISTPL_DEVICE_OA - parse Device Information tuples
SYNOPSIS
#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);
INTERFACE LEVEL
illumos DDI Specific (illumos DDI)
PARAMETERS
ch

Client handle returned from csx_RegisterClient(9F).

tu

Pointer to a tuple_t structure (see tuple(9S)) returned by a call to csx_GetFirstTuple(9F) or csx_GetNextTuple(9F).

cd

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.

DESCRIPTION
csx_Parse_CISTPL_DEVICE() and csx_Parse_CISTPL_DEVICE_A() parse the 5 volt Device Information tuples, CISTPL_DEVICE and CISTPL_DEVICE_A, respectively, into a form usable by PC Card drivers.

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.

STRUCTURE MEMBERS
The structure members of cistpl_device_t are:
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

Bits which are applicable only for CISTPL_DEVICE_OC and CISTPL_DEVICE_OA are: CISTPL_DEVICE_OC_MWAIT

Use MWAIT

CISTPL_DEVICE_OC_Vcc_MASK

Mask for Vcc value

CISTPL_DEVICE_OC_Vcc5

5.0 volt operation

CISTPL_DEVICE_OC_Vcc33

3.3 volt operation

CISTPL_DEVICE_OC_VccXX

X.X volt operation

CISTPL_DEVICE_OC_VccYY

Y.Y volt operation

speed

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.

nS_speed

The device speed value described in nanosecond units.

size

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.

size_in_bytes

The device size value described in byte units.

type

This is the device type code field which is defined as follows: CISTPL_DEVICE_DTYPE_NULL

No device

CISTPL_DEVICE_DTYPE_ROM

Masked ROM

CISTPL_DEVICE_DTYPE_OTPROM

One Time Programmable ROM

CISTPL_DEVICE_DTYPE_EPROM

UV EPROM

CISTPL_DEVICE_DTYPE_EEPROM

EEPROM

CISTPL_DEVICE_DTYPE_FLASH

FLASH

CISTPL_DEVICE_DTYPE_SRAM

Static RAM

CISTPL_DEVICE_DTYPE_DRAM

Dynamic RAM

CISTPL_DEVICE_DTYPE_FUNCSPEC

Function-specific memory address range

CISTPL_DEVICE_DTYPE_EXTEND

Extended type follows

RETURN VALUES
CS_SUCCESS

Successful operation.

CS_BAD_HANDLE

Client handle is invalid.

CS_UNKNOWN_TUPLE

Parser does not know how to parse tuple.

CS_NO_CARD

No PC Card in socket.

CS_NO_CIS

No Card Information Structure (CIS) on PC Card.

CS_UNSUPPORTED_FUNCTION

No PCMCIA hardware installed.

CONTEXT
These functions may be called from user or kernel context.
SEE ALSO
csx_GetFirstTuple (9F), csx_GetTupleData (9F), csx_Parse_CISTPL_JEDEC_C (9F), csx_RegisterClient (9F), csx_ValidateCIS (9F), tuple (9S)

PC Card 95 Standard, PCMCIA/JEIDA