pccardvar.h (144955) | pccardvar.h (147580) |
---|---|
1/* $NetBSD: pcmciavar.h,v 1.12 2000/02/08 12:51:31 enami Exp $ */ | 1/* $NetBSD: pcmciavar.h,v 1.12 2000/02/08 12:51:31 enami Exp $ */ |
2/* $FreeBSD: head/sys/dev/pccard/pccardvar.h 144955 2005-04-12 15:25:31Z imp $ */ | 2/* $FreeBSD: head/sys/dev/pccard/pccardvar.h 147580 2005-06-24 14:36:54Z imp $ */ |
3 4/*- 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33extern int pccard_verbose; 34 35/* | 3 4/*- 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33extern int pccard_verbose; 34 35/* |
36 * PCCARD_API_LEVEL. When set to 5, we provide a 5.x compatable API 37 * for driver writers that have to share their code between 5.x and 6.x. 38 * The 5.x compatibility interfaces will be unsupported in 7.0, at which 39 * point we'll only support 6 and newer, etc. 40 */ 41#ifndef PCCARD_API_LEVEL 42#define PCCARD_API_LEVEL 6 43#elif PCCARD_API_LEVEL < 5 44#error "pccard API less than 5 unsupported" 45#endif 46 47/* |
|
36 * Contains information about mapped/allocated i/o spaces. 37 */ 38struct pccard_io_handle { 39 bus_space_tag_t iot; /* bus space tag (from chipset) */ 40 bus_space_handle_t ioh; /* mapped space handle */ 41 bus_addr_t addr; /* resulting address in bus space */ 42 bus_size_t size; /* size of i/o space */ 43 int flags; /* misc. information */ --- 166 unchanged lines hidden (view full) --- 210}; 211 212struct pccard_product { 213 const char *pp_name; /* NULL if end of table */ 214#define PCCARD_VENDOR_ANY (0xffffffff) 215 uint32_t pp_vendor; 216#define PCCARD_PRODUCT_ANY (0xffffffff) 217 uint32_t pp_product; | 48 * Contains information about mapped/allocated i/o spaces. 49 */ 50struct pccard_io_handle { 51 bus_space_tag_t iot; /* bus space tag (from chipset) */ 52 bus_space_handle_t ioh; /* mapped space handle */ 53 bus_addr_t addr; /* resulting address in bus space */ 54 bus_size_t size; /* size of i/o space */ 55 int flags; /* misc. information */ --- 166 unchanged lines hidden (view full) --- 222}; 223 224struct pccard_product { 225 const char *pp_name; /* NULL if end of table */ 226#define PCCARD_VENDOR_ANY (0xffffffff) 227 uint32_t pp_vendor; 228#define PCCARD_PRODUCT_ANY (0xffffffff) 229 uint32_t pp_product; |
218 int pp_expfunc; | |
219 const char *pp_cis[4]; 220}; 221 222typedef int (*pccard_product_match_fn) (device_t dev, 223 const struct pccard_product *ent, int vpfmatch); 224 225#include "card_if.h" 226 --- 125 unchanged lines hidden (view full) --- 352}; 353 354#define PCCARD_SOFTC(d) (struct pccard_softc *) device_get_softc(d) 355#define PCCARD_IVAR(d) (struct pccard_ivar *) device_get_ivars(d) 356 357#define PCCARD_S(a, b) PCMCIA_STR_ ## a ## _ ## b 358#define PCCARD_P(a, b) PCMCIA_PRODUCT_ ## a ## _ ## b 359#define PCCARD_C(a, b) PCMCIA_CIS_ ## a ## _ ## b | 230 const char *pp_cis[4]; 231}; 232 233typedef int (*pccard_product_match_fn) (device_t dev, 234 const struct pccard_product *ent, int vpfmatch); 235 236#include "card_if.h" 237 --- 125 unchanged lines hidden (view full) --- 363}; 364 365#define PCCARD_SOFTC(d) (struct pccard_softc *) device_get_softc(d) 366#define PCCARD_IVAR(d) (struct pccard_ivar *) device_get_ivars(d) 367 368#define PCCARD_S(a, b) PCMCIA_STR_ ## a ## _ ## b 369#define PCCARD_P(a, b) PCMCIA_PRODUCT_ ## a ## _ ## b 370#define PCCARD_C(a, b) PCMCIA_CIS_ ## a ## _ ## b |
371#if PCCARD_API_LEVEL >= 6 372#define PCMCIA_CARD_D(v, p) { PCCARD_S(v, p), PCMCIA_VENDOR_ ## v, \ 373 PCCARD_P(v, p), PCCARD_C(v, p) } 374#define PCMCIA_CARD2_D(v1, p1, p2) \ 375 { PCMCIA_STR_ ## p2, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \ 376 PCMCIA_CIS_ ## p2} 377#define PCMCIA_CARD(v, p) { NULL, PCMCIA_VENDOR_ ## v, \ 378 PCCARD_P(v, p), PCCARD_C(v, p) } 379#define PCMCIA_CARD2(v1, p1, p2) \ 380 { NULL, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \ 381 PCMCIA_CIS_ ## p2} 382#else |
|
360#define PCMCIA_CARD_D(v, p, f) { PCCARD_S(v, p), PCMCIA_VENDOR_ ## v, \ | 383#define PCMCIA_CARD_D(v, p, f) { PCCARD_S(v, p), PCMCIA_VENDOR_ ## v, \ |
361 PCCARD_P(v, p), f, PCCARD_C(v, p) } | 384 PCCARD_P(v, p), PCCARD_C(v, p) } |
362#define PCMCIA_CARD2_D(v1, p1, p2, f) \ 363 { PCMCIA_STR_ ## p2, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \ | 385#define PCMCIA_CARD2_D(v1, p1, p2, f) \ 386 { PCMCIA_STR_ ## p2, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \ |
364 f, PCMCIA_CIS_ ## p2} | 387 PCMCIA_CIS_ ## p2} |
365#define PCMCIA_CARD(v, p, f) { NULL, PCMCIA_VENDOR_ ## v, \ | 388#define PCMCIA_CARD(v, p, f) { NULL, PCMCIA_VENDOR_ ## v, \ |
366 PCCARD_P(v, p), f, PCCARD_C(v, p) } | 389 PCCARD_P(v, p), PCCARD_C(v, p) } |
367#define PCMCIA_CARD2(v1, p1, p2, f) \ 368 { NULL, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \ | 390#define PCMCIA_CARD2(v1, p1, p2, f) \ 391 { NULL, PCMCIA_VENDOR_ ## v1, PCCARD_P(v1, p1), \ |
369 f, PCMCIA_CIS_ ## p2} | 392 PCMCIA_CIS_ ## p2} 393#endif |