diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c index 478554c70326..1506af5ba855 100644 --- a/sys/dev/cardbus/cardbus_cis.c +++ b/sys/dev/cardbus/cardbus_cis.c @@ -49,12 +49,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include -#include - extern int cardbus_cis_debug; #define DPRINTF(a) if (cardbus_cis_debug) printf a @@ -676,12 +677,6 @@ decode_tuple(device_t cbdev, device_t child, int tupleid, int len, return (callbacks[i].func(cbdev, child, tupleid, len, tupledata, start, off, &callbacks[i])); } - - if (tupleid < CISTPL_CUSTOMSTART) { - device_printf(cbdev, "Undefined tuple encountered, " - "CIS parsing terminated\n"); - return (EINVAL); - } return (callbacks[i].func(cbdev, child, tupleid, len, tupledata, start, off, NULL)); } @@ -1019,43 +1014,17 @@ cardbus_do_cis(device_t cbdev, device_t child) { int ret; struct tuple_callbacks init_callbacks[] = { - MAKETUPLE(NULL, generic), - MAKETUPLE(DEVICE, generic), - MAKETUPLE(LONG_LINK_CB, unhandled), + MAKETUPLE(LONGLINK_CB, unhandled), MAKETUPLE(INDIRECT, unhandled), - MAKETUPLE(CONFIG_CB, generic), - MAKETUPLE(CFTABLE_ENTRY_CB, generic), MAKETUPLE(LONGLINK_MFC, unhandled), MAKETUPLE(BAR, bar), - MAKETUPLE(PWR_MGMNT, generic), - MAKETUPLE(EXTDEVICE, generic), - MAKETUPLE(CHECKSUM, generic), MAKETUPLE(LONGLINK_A, unhandled), MAKETUPLE(LONGLINK_C, unhandled), MAKETUPLE(LINKTARGET, linktarget), - MAKETUPLE(NO_LINK, generic), MAKETUPLE(VERS_1, vers_1), - MAKETUPLE(ALTSTR, generic), - MAKETUPLE(DEVICE_A, generic), - MAKETUPLE(JEDEC_C, generic), - MAKETUPLE(JEDEC_A, generic), - MAKETUPLE(CONFIG, generic), - MAKETUPLE(CFTABLE_ENTRY, generic), - MAKETUPLE(DEVICE_OC, generic), - MAKETUPLE(DEVICE_OA, generic), - MAKETUPLE(DEVICE_GEO, generic), - MAKETUPLE(DEVICE_GEO_A, generic), MAKETUPLE(MANFID, manfid), MAKETUPLE(FUNCID, funcid), MAKETUPLE(FUNCE, funce), - MAKETUPLE(SWIL, generic), - MAKETUPLE(VERS_2, generic), - MAKETUPLE(FORMAT, generic), - MAKETUPLE(GEOMETRY, generic), - MAKETUPLE(BYTEORDER, generic), - MAKETUPLE(DATE, generic), - MAKETUPLE(BATTERY, generic), - MAKETUPLE(ORG, generic), MAKETUPLE(END, end), MAKETUPLE(GENERIC, generic), }; diff --git a/sys/dev/cardbus/cardbus_cis.h b/sys/dev/cardbus/cardbus_cis.h index 3a2eaccb97a0..a56d13b9df97 100644 --- a/sys/dev/cardbus/cardbus_cis.h +++ b/sys/dev/cardbus/cardbus_cis.h @@ -38,50 +38,6 @@ int cardbus_do_cis(device_t, device_t); #define MAXTUPLESIZE 0x400 -/* CIS TUPLES */ - -#define CISTPL_NULL 0x00 -#define CISTPL_DEVICE 0x01 -#define CISTPL_LONG_LINK_CB 0x02 -#define CISTPL_INDIRECT 0x03 -#define CISTPL_CONFIG_CB 0x04 -#define CISTPL_CFTABLE_ENTRY_CB 0x05 -#define CISTPL_LONGLINK_MFC 0x06 -#define CISTPL_BAR 0x07 -#define CISTPL_PWR_MGMNT 0x08 -#define CISTPL_EXTDEVICE 0x09 -#define CISTPL_CHECKSUM 0x10 -#define CISTPL_LONGLINK_A 0x11 -#define CISTPL_LONGLINK_C 0x12 -#define CISTPL_LINKTARGET 0x13 -#define CISTPL_NO_LINK 0x14 -#define CISTPL_VERS_1 0x15 -#define CISTPL_ALTSTR 0x16 -#define CISTPL_DEVICE_A 0x17 -#define CISTPL_JEDEC_C 0x18 -#define CISTPL_JEDEC_A 0x19 -#define CISTPL_CONFIG 0x1A -#define CISTPL_CFTABLE_ENTRY 0x1B -#define CISTPL_DEVICE_OC 0x1C -#define CISTPL_DEVICE_OA 0x1D -#define CISTPL_DEVICE_GEO 0x1E -#define CISTPL_DEVICE_GEO_A 0x1F -#define CISTPL_MANFID 0x20 -#define CISTPL_FUNCID 0x21 -#define CISTPL_FUNCE 0x22 -#define CISTPL_SWIL 0x23 -#define CISTPL_VERS_2 0x40 -#define CISTPL_FORMAT 0x41 -#define CISTPL_GEOMETRY 0x42 -#define CISTPL_BYTEORDER 0x43 -#define CISTPL_DATE 0x44 -#define CISTPL_BATTERY 0x45 -#define CISTPL_ORG 0x46 -#define CISTPL_CUSTOMSTART 0x80 -#define CISTPL_END 0xFF - -#define CISTPL_GENERIC -1 /* catchall */ - /* BAR */ #define TPL_BAR_REG_ASI_MASK 0x07 #define TPL_BAR_REG_AS 0x10 diff --git a/sys/dev/pccard/card_if.m b/sys/dev/pccard/card_if.m index ae239470ad0f..c843e32ce627 100644 --- a/sys/dev/pccard/card_if.m +++ b/sys/dev/pccard/card_if.m @@ -92,14 +92,6 @@ METHOD int detach_card { device_t dev; } -# -# Returns the type of card this is. Maybe we don't need this. -# -METHOD int get_type { - device_t dev; - int *type; -} - # # Returns the function number for this device. # diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 368560f4d112..7c54b6fae9fc 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -86,7 +86,6 @@ static int pccard_ccr_read(struct pccard_function *pf, int ccr); static void pccard_ccr_write(struct pccard_function *pf, int ccr, int val); static int pccard_attach_card(device_t dev); static int pccard_detach_card(device_t dev); -static int pccard_card_gettype(device_t dev, int *type); static void pccard_function_init(struct pccard_function *pf); static void pccard_function_free(struct pccard_function *pf); static int pccard_function_enable(struct pccard_function *pf); @@ -379,27 +378,6 @@ pccard_do_product_lookup(device_t bus, device_t dev, return (NULL); } -static int -pccard_card_gettype(device_t dev, int *type) -{ - struct pccard_softc *sc = PCCARD_SOFTC(dev); - struct pccard_function *pf; - - /* - * set the iftype to memory if this card has no functions (not yet - * probed), or only one function, and that is not initialized yet or - * that is memory. - */ - pf = STAILQ_FIRST(&sc->card.pf_head); - if (pf == NULL || - (STAILQ_NEXT(pf, pf_list) == NULL && - (pf->cfe == NULL || pf->cfe->iftype == PCCARD_IFTYPE_MEMORY))) - *type = PCCARD_IFTYPE_MEMORY; - else - *type = PCCARD_IFTYPE_IO; - return (0); -} - /* * Initialize a PCCARD function. May be called as long as the function is * disabled. @@ -1303,7 +1281,6 @@ static device_method_t pccard_methods[] = { /* Card Interface */ DEVMETHOD(card_set_res_flags, pccard_set_res_flags), DEVMETHOD(card_set_memory_offset, pccard_set_memory_offset), - DEVMETHOD(card_get_type, pccard_card_gettype), DEVMETHOD(card_attach_card, pccard_attach_card), DEVMETHOD(card_detach_card, pccard_detach_card), DEVMETHOD(card_compat_do_probe, pccard_compat_do_probe), diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 2b8648d79d3e..9c2307f5355b 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -45,6 +45,7 @@ #include #include +#include #include "card_if.h" @@ -163,7 +164,7 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), if (tuple.mult * tuple.ptr >= PCCARD_CIS_SIZE - 1 - 32 /* ad hoc value */ ) { printf("CIS is too long -- truncating\n"); - tuple.code = PCCARD_CISTPL_END; + tuple.code = CISTPL_END; } else { /* get the tuple code */ tuple.code = pccard_cis_read_1(&tuple, tuple.ptr); @@ -171,7 +172,7 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), /* two special-case tuples */ - if (tuple.code == PCCARD_CISTPL_NULL) { + if (tuple.code == CISTPL_NULL) { #ifdef PCCARDCISDEBUG if (cis_none_cnt > 0) DPRINTF(("CISTPL_NONE\n 00\n")); @@ -181,7 +182,7 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), #endif tuple.ptr++; continue; - } else if (tuple.code == PCCARD_CISTPL_END) { + } else if (tuple.code == CISTPL_END) { DPRINTF(("CISTPL_END\n ff\n")); /* Call the function for the END tuple, since the CIS semantics depend on it */ @@ -196,8 +197,8 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), tuple.length = pccard_cis_read_1(&tuple, tuple.ptr + 1); switch (tuple.code) { - case PCCARD_CISTPL_LONGLINK_A: - case PCCARD_CISTPL_LONGLINK_C: + case CISTPL_LONGLINK_A: + case CISTPL_LONGLINK_C: if (tuple.length < 4) { DPRINTF(("CISTPL_LONGLINK_%s too " "short %d\n", @@ -207,17 +208,17 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), } longlink_present = 1; longlink_common = (tuple.code == - PCCARD_CISTPL_LONGLINK_C) ? 1 : 0; + CISTPL_LONGLINK_C) ? 1 : 0; longlink_addr = pccard_tuple_read_4(&tuple, 0); DPRINTF(("CISTPL_LONGLINK_%s %lx\n", longlink_common ? "C" : "A", longlink_addr)); break; - case PCCARD_CISTPL_NO_LINK: + case CISTPL_NO_LINK: longlink_present = 0; DPRINTF(("CISTPL_NO_LINK\n")); break; - case PCCARD_CISTPL_CHECKSUM: + case CISTPL_CHECKSUM: if (tuple.length < 5) { DPRINTF(("CISTPL_CHECKSUM too " "short %d\n", tuple.length)); @@ -273,7 +274,7 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), } } break; - case PCCARD_CISTPL_LONGLINK_MFC: + case CISTPL_LONGLINK_MFC: if (tuple.length < 1) { DPRINTF(("CISTPL_LONGLINK_MFC too " "short %d\n", tuple.length)); @@ -410,7 +411,7 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), /* make sure that the link is valid */ tuple.code = pccard_cis_read_1(&tuple, tuple.ptr); - if (tuple.code != PCCARD_CISTPL_LINKTARGET) { + if (tuple.code != CISTPL_LINKTARGET) { DPRINTF(("CISTPL_LINKTARGET expected, " "code %02x observed\n", tuple.code)); continue; @@ -620,7 +621,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) struct cis_state *state = arg; switch (tuple->code) { - case PCCARD_CISTPL_END: + case CISTPL_END: /* if we've seen a LONGLINK_MFC, and this is the first * END after it, reset the function list. * @@ -647,7 +648,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) state->pf = NULL; } break; - case PCCARD_CISTPL_LONGLINK_MFC: + case CISTPL_LONGLINK_MFC: /* * this tuple's structure was dealt with in scan_cis. here, * record the fact that the MFC tuple was seen, so that @@ -657,8 +658,8 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) state->gotmfc = 1; break; #ifdef PCCARDCISDEBUG - case PCCARD_CISTPL_DEVICE: - case PCCARD_CISTPL_DEVICE_A: + case CISTPL_DEVICE: + case CISTPL_DEVICE_A: { u_int reg, dtype, dspeed; @@ -667,7 +668,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) dspeed = reg & PCCARD_DSPEED_MASK; DPRINTF(("CISTPL_DEVICE%s type=", - (tuple->code == PCCARD_CISTPL_DEVICE) ? "" : "_A")); + (tuple->code == CISTPL_DEVICE) ? "" : "_A")); switch (dtype) { case PCCARD_DTYPE_NULL: DPRINTF(("null")); @@ -731,7 +732,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) DPRINTF(("\n")); break; #endif - case PCCARD_CISTPL_VERS_1: + case CISTPL_VERS_1: if (tuple->length < 6) { DPRINTF(("CISTPL_VERS_1 too short %d\n", tuple->length)); @@ -758,7 +759,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) DPRINTF(("CISTPL_VERS_1\n")); } break; - case PCCARD_CISTPL_MANFID: + case CISTPL_MANFID: if (tuple->length < 4) { DPRINTF(("CISTPL_MANFID too short %d\n", tuple->length)); @@ -780,7 +781,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) } DPRINTF(("CISTPL_MANFID\n")); break; - case PCCARD_CISTPL_FUNCID: + case CISTPL_FUNCID: if (tuple->length < 1) { DPRINTF(("CISTPL_FUNCID too short %d\n", tuple->length)); @@ -800,7 +801,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) DPRINTF(("CISTPL_FUNCID\n")); break; - case PCCARD_CISTPL_FUNCE: + case CISTPL_FUNCE: if (state->pf == NULL || state->pf->function <= 0) { DPRINTF(("CISTPL_FUNCE is not followed by " "valid CISTPL_FUNCID\n")); @@ -811,7 +812,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) } DPRINTF(("CISTPL_FUNCE\n")); break; - case PCCARD_CISTPL_CONFIG: + case CISTPL_CONFIG: if (tuple->length < 3) { DPRINTF(("CISTPL_CONFIG too short %d\n", tuple->length)); @@ -869,7 +870,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) } DPRINTF(("CISTPL_CONFIG\n")); break; - case PCCARD_CISTPL_CFTABLE_ENTRY: + case CISTPL_CFTABLE_ENTRY: { int idx, i, j; u_int reg, reg2; diff --git a/sys/dev/pccard/pccard_cis_quirks.c b/sys/dev/pccard/pccard_cis_quirks.c index 87928b506f3f..c491cb26452c 100644 --- a/sys/dev/pccard/pccard_cis_quirks.c +++ b/sys/dev/pccard/pccard_cis_quirks.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* There are cards out there whose CIS flat-out lies. This file contains struct pccard_function chains for those devices. */ diff --git a/sys/dev/pccard/pccardreg.h b/sys/dev/pccard/pccardreg.h index a82417a9b544..f6f67f8dba80 100644 --- a/sys/dev/pccard/pccardreg.h +++ b/sys/dev/pccard/pccardreg.h @@ -30,181 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* most of this is from the PCCARD PC Card Standard, Release 2.1 */ - -/* Note: the weird indenting here is to make the constants more - readable. Please don't normalize it. --marc */ - -/* - * CIS Tuples */ - -/* Layer 1 Basic Compatibility Tuples */ -#define PCCARD_CISTPL_NULL 0x00 -#define PCCARD_CISTPL_DEVICE 0x01 -#define PCCARD_DTYPE_MASK 0xF0 -#define PCCARD_DTYPE_NULL 0x00 -#define PCCARD_DTYPE_ROM 0x10 -#define PCCARD_DTYPE_OTPROM 0x20 -#define PCCARD_DTYPE_EPROM 0x30 -#define PCCARD_DTYPE_EEPROM 0x40 -#define PCCARD_DTYPE_FLASH 0x50 -#define PCCARD_DTYPE_SRAM 0x60 -#define PCCARD_DTYPE_DRAM 0x70 -#define PCCARD_DTYPE_FUNCSPEC 0xD0 -#define PCCARD_DTYPE_EXTEND 0xE0 -#define PCCARD_DSPEED_MASK 0x07 -#define PCCARD_DSPEED_NULL 0x00 -#define PCCARD_DSPEED_250NS 0x01 -#define PCCARD_DSPEED_200NS 0x02 -#define PCCARD_DSPEED_150NS 0x03 -#define PCCARD_DSPEED_100NS 0x04 -#define PCCARD_DSPEED_EXT 0x07 - -/* - * the 2.1 docs have 0x02-0x07 as reserved, but the linux drivers list the - * follwing tuple code values. I have at least one card (3com 3c562 - * lan+modem) which has a code 0x06 tuple, so I'm going to assume that these - * are for real - */ - -#define PCCARD_CISTPL_LONGLINK_CB 0x02 -#define PCCARD_CISTPL_INDIRECT 0x03 -#define PCCARD_CISTPL_CONFIG_CB 0x04 -#define PCCARD_CISTPL_CFTABLE_ENTRY_CB 0x05 -#define PCCARD_CISTPL_LONGLINK_MFC 0x06 -#define PCCARD_MFC_MEM_ATTR 0x00 -#define PCCARD_MFC_MEM_COMMON 0x01 -#define PCCARD_CISTPL_BAR 0x07 -#define PCCARD_CISTPL_PWR_MGMNT 0x08 - -#define PCCARD_CISTPL_CHECKSUM 0x10 -#define PCCARD_CISTPL_LONGLINK_A 0x11 -#define PCCARD_CISTPL_LONGLINK_C 0x12 -#define PCCARD_CISTPL_LINKTARGET 0x13 -#define PCCARD_CISTPL_NO_LINK 0x14 -#define PCCARD_CISTPL_VERS_1 0x15 -#define PCCARD_CISTPL_ALTSTR 0x16 -#define PCCARD_CISTPL_DEVICE_A 0x17 -#define PCCARD_CISTPL_JEDEC_C 0x18 -#define PCCARD_CISTPL_JEDEC_A 0x19 -#define PCCARD_CISTPL_CONFIG 0x1A -#define PCCARD_TPCC_RASZ_MASK 0x03 -#define PCCARD_TPCC_RASZ_SHIFT 0 -#define PCCARD_TPCC_RMSZ_MASK 0x3C -#define PCCARD_TPCC_RMSZ_SHIFT 2 -#define PCCARD_TPCC_RFSZ_MASK 0xC0 -#define PCCARD_TPCC_RFSZ_SHIFT 6 -#define PCCARD_CISTPL_CFTABLE_ENTRY 0x1B -#define PCCARD_TPCE_INDX_INTFACE 0x80 -#define PCCARD_TPCE_INDX_DEFAULT 0x40 -#define PCCARD_TPCE_INDX_NUM_MASK 0x3F -#define PCCARD_TPCE_IF_MWAIT 0x80 -#define PCCARD_TPCE_IF_RDYBSY 0x40 -#define PCCARD_TPCE_IF_WP 0x20 -#define PCCARD_TPCE_IF_BVD 0x10 -#define PCCARD_TPCE_IF_IFTYPE 0x0F -#define PCCARD_IFTYPE_MEMORY 0 -#define PCCARD_IFTYPE_IO 1 -#define PCCARD_TPCE_FS_MISC 0x80 -#define PCCARD_TPCE_FS_MEMSPACE_MASK 0x60 -#define PCCARD_TPCE_FS_MEMSPACE_NONE 0x00 -#define PCCARD_TPCE_FS_MEMSPACE_LENGTH 0x20 -#define PCCARD_TPCE_FS_MEMSPACE_LENGTHADDR 0x40 -#define PCCARD_TPCE_FS_MEMSPACE_TABLE 0x60 -#define PCCARD_TPCE_FS_IRQ 0x10 -#define PCCARD_TPCE_FS_IOSPACE 0x08 -#define PCCARD_TPCE_FS_TIMING 0x04 -#define PCCARD_TPCE_FS_POWER_MASK 0x03 -#define PCCARD_TPCE_FS_POWER_NONE 0x00 -#define PCCARD_TPCE_FS_POWER_VCC 0x01 -#define PCCARD_TPCE_FS_POWER_VCCVPP1 0x02 -#define PCCARD_TPCE_FS_POWER_VCCVPP1VPP2 0x03 -#define PCCARD_TPCE_TD_RESERVED_MASK 0xE0 -#define PCCARD_TPCE_TD_RDYBSY_MASK 0x1C -#define PCCARD_TPCE_TD_WAIT_MASK 0x03 -#define PCCARD_TPCE_IO_HASRANGE 0x80 -#define PCCARD_TPCE_IO_BUSWIDTH_16BIT 0x40 -#define PCCARD_TPCE_IO_BUSWIDTH_8BIT 0x20 -#define PCCARD_TPCE_IO_IOADDRLINES_MASK 0x1F -#define PCCARD_TPCE_IO_RANGE_LENGTHSIZE_MASK 0xC0 -#define PCCARD_TPCE_IO_RANGE_LENGTHSIZE_NONE 0x00 -#define PCCARD_TPCE_IO_RANGE_LENGTHSIZE_ONE 0x40 -#define PCCARD_TPCE_IO_RANGE_LENGTHSIZE_TWO 0x80 -#define PCCARD_TPCE_IO_RANGE_LENGTHSIZE_FOUR 0xC0 -#define PCCARD_TPCE_IO_RANGE_ADDRSIZE_MASK 0x30 -#define PCCARD_TPCE_IO_RANGE_ADDRSIZE_NONE 0x00 -#define PCCARD_TPCE_IO_RANGE_ADDRSIZE_ONE 0x10 -#define PCCARD_TPCE_IO_RANGE_ADDRSIZE_TWO 0x20 -#define PCCARD_TPCE_IO_RANGE_ADDRSIZE_FOUR 0x30 -#define PCCARD_TPCE_IO_RANGE_COUNT 0x0F -#define PCCARD_TPCE_IR_SHARE 0x80 -#define PCCARD_TPCE_IR_PULSE 0x40 -#define PCCARD_TPCE_IR_LEVEL 0x20 -#define PCCARD_TPCE_IR_HASMASK 0x10 -#define PCCARD_TPCE_IR_IRQ 0x0F -#define PCCARD_TPCE_MS_HOSTADDR 0x80 -#define PCCARD_TPCE_MS_CARDADDR_SIZE_MASK 0x60 -#define PCCARD_TPCE_MS_CARDADDR_SIZE_SHIFT 5 -#define PCCARD_TPCE_MS_LENGTH_SIZE_MASK 0x18 -#define PCCARD_TPCE_MS_LENGTH_SIZE_SHIFT 3 -#define PCCARD_TPCE_MS_COUNT 0x07 -#define PCCARD_TPCE_MI_EXT 0x80 -#define PCCARD_TPCE_MI_RESERVED 0x40 -#define PCCARD_TPCE_MI_PWRDOWN 0x20 -#define PCCARD_TPCE_MI_READONLY 0x10 -#define PCCARD_TPCE_MI_AUDIO 0x08 -#define PCCARD_TPCE_MI_MAXTWINS 0x07 -#define PCCARD_CISTPL_DEVICE_OC 0x1C -#define PCCARD_CISTPL_DEVICE_OA 0x1D -#define PCCARD_CISTPL_DEVICE_GEO 0x1E -#define PCCARD_CISTPL_DEVICE_GEO_A 0x1F -#define PCCARD_CISTPL_MANFID 0x20 -#define PCCARD_CISTPL_FUNCID 0x21 -#define PCCARD_FUNCTION_UNSPEC -1 -#define PCCARD_FUNCTION_MULTIFUNCTION 0 -#define PCCARD_FUNCTION_MEMORY 1 -#define PCCARD_FUNCTION_SERIAL 2 -#define PCCARD_FUNCTION_PARALLEL 3 -#define PCCARD_FUNCTION_DISK 4 -#define PCCARD_FUNCTION_VIDEO 5 -#define PCCARD_FUNCTION_NETWORK 6 -#define PCCARD_FUNCTION_AIMS 7 -#define PCCARD_FUNCTION_SCSI 8 -#define PCCARD_FUNCTION_SECURITY 9 -#define PCCARD_FUNCTION_INSTRUMENT 10 -#define PCCARD_CISTPL_FUNCE 0x22 -#define PCCARD_TPLFE_TYPE_LAN_TECH 0x01 -#define PCCARD_TPLFE_TYPE_LAN_SPEED 0x02 -#define PCCARD_TPLFE_TYPE_LAN_MEDIA 0x03 -#define PCCARD_TPLFE_TYPE_LAN_NID 0x04 -#define PCCARD_TPLFE_TYPE_LAN_CONN 0x05 -#define PCCARD_TPLFE_TYPE_DISK_DEVICE_INTERFACE 0x01 -#define PCCARD_TPLFE_DDI_PCCARD_ATA 0x01 -#define PCCARD_CISTPL_END 0xFF - -/* Layer 2 Data Recording Format Tuples */ - -#define PCCARD_CISTPL_SWIL 0x23 -/* #define PCCARD_CISTPL_RESERVED 0x24-0x3F */ -#define PCCARD_CISTPL_VERS_2 0x40 -#define PCCARD_CISTPL_FORMAT 0x41 -#define PCCARD_CISTPL_GEOMETRY 0x42 -#define PCCARD_CISTPL_BYTEORDER 0x43 -#define PCCARD_CISTPL_DATE 0x44 -#define PCCARD_CISTPL_BATTERY 0x45 -#define PCCARD_CISTPL_FORAMT_A 0x47 - -/* Layer 3 Data Organization Tuples */ - -#define PCCARD_CISTPL_ORG 0x46 -/* #define PCCARD_CISTPL_RESERVED 0x47-0x7F */ - -/* Layer 4 System-Specific Standard Tuples */ - -/* #define PCCARD_CISTPL_RESERVED 0x80-0x8F */ -#define PCCARD_CISTPL_SPCL 0x90 -/* #define PCCARD_CISTPL_RESERVED 0x90-0xFE */ - /* * Card Configuration Registers */