cardbusvar.h revision 139749
1139749Simp/*-
267276Sjon * Copyright (c) 2000,2001 Jonathan Chen.
367276Sjon * All rights reserved.
453343Simp *
553343Simp * Redistribution and use in source and binary forms, with or without
653343Simp * modification, are permitted provided that the following conditions
753343Simp * are met:
853343Simp * 1. Redistributions of source code must retain the above copyright
967276Sjon *    notice, this list of conditions, and the following disclaimer,
1067276Sjon *    without modification, immediately at the beginning of the file.
1153343Simp * 2. Redistributions in binary form must reproduce the above copyright
1267276Sjon *    notice, this list of conditions and the following disclaimer in
1367276Sjon *    the documentation and/or other materials provided with the
1467276Sjon *    distribution.
1553343Simp *
1667276Sjon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1767276Sjon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1867276Sjon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1967276Sjon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
2067276Sjon * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2167276Sjon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2267276Sjon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2367276Sjon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2467276Sjon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2567276Sjon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2667276Sjon * SUCH DAMAGE.
2753343Simp *
2867276Sjon * $FreeBSD: head/sys/dev/cardbus/cardbusvar.h 139749 2005-01-06 01:43:34Z imp $
2953343Simp */
3053343Simp
3167276Sjon/*
3267276Sjon * Structure definitions for the Cardbus Bus driver
3367276Sjon */
3467276Sjonstruct cardbus_devinfo {
3591355Simp	struct pci_devinfo pci;
36109925Simp	uint8_t        mprefetchable; /* bit mask of prefetchable BARs */
37109925Simp	uint8_t        mbelow1mb; /* bit mask of BARs which require below 1Mb */
38109925Simp	uint8_t        ibelow1mb; /* bit mask of BARs which require below 1Mb */
39104637Simp#define        BARBIT(RID) (1<<(((RID)-CARDBUS_BASE0_REG)/4))
40109925Simp	uint16_t	mfrid;		/* manufacturer id */
41109925Simp	uint16_t	prodid;		/* product id */
42107301Simp	u_int		funcid;		/* function id */
43107301Simp	union {
44107301Simp		struct {
45107301Simp			u_int		type;		/* UART type */
46107301Simp		} sio;
47107301Simp		struct {
48109925Simp			uint8_t	nid[6];		/* MAC address */
49109925Simp			uint8_t	tech;		/* technology */
50109925Simp			uint8_t	contype;	/* connector type */
51109925Simp			uint32_t	speed[3];	/* available speeds */
52109925Simp			uint8_t	media[4];	/* media types */
53107301Simp		} lan;
54107301Simp	} funce;
55109925Simp	uint32_t	fepresent;	/* bit mask of funce values present */
5653343Simp};
57