Home | History | Annotate | Line # | Download | only in pci
if_wmvar.h revision 1.2.46.4
      1  1.2.46.4       riz /*	$NetBSD: if_wmvar.h,v 1.2.46.4 2010/11/19 23:40:28 riz Exp $	*/
      2  1.2.46.1  sborrill 
      3  1.2.46.1  sborrill /*
      4  1.2.46.1  sborrill  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
      5  1.2.46.1  sborrill  * All rights reserved.
      6  1.2.46.1  sborrill  *
      7  1.2.46.1  sborrill  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
      8  1.2.46.1  sborrill  *
      9  1.2.46.1  sborrill  * Redistribution and use in source and binary forms, with or without
     10  1.2.46.1  sborrill  * modification, are permitted provided that the following conditions
     11  1.2.46.1  sborrill  * are met:
     12  1.2.46.1  sborrill  * 1. Redistributions of source code must retain the above copyright
     13  1.2.46.1  sborrill  *    notice, this list of conditions and the following disclaimer.
     14  1.2.46.1  sborrill  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.2.46.1  sborrill  *    notice, this list of conditions and the following disclaimer in the
     16  1.2.46.1  sborrill  *    documentation and/or other materials provided with the distribution.
     17  1.2.46.1  sborrill  * 3. All advertising materials mentioning features or use of this software
     18  1.2.46.1  sborrill  *    must display the following acknowledgement:
     19  1.2.46.1  sborrill  *	This product includes software developed for the NetBSD Project by
     20  1.2.46.1  sborrill  *	Wasabi Systems, Inc.
     21  1.2.46.1  sborrill  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
     22  1.2.46.1  sborrill  *    or promote products derived from this software without specific prior
     23  1.2.46.1  sborrill  *    written permission.
     24  1.2.46.1  sborrill  *
     25  1.2.46.1  sborrill  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
     26  1.2.46.1  sborrill  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     27  1.2.46.1  sborrill  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     28  1.2.46.1  sborrill  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
     29  1.2.46.1  sborrill  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     30  1.2.46.1  sborrill  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     31  1.2.46.1  sborrill  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     32  1.2.46.1  sborrill  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     33  1.2.46.1  sborrill  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     34  1.2.46.1  sborrill  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     35  1.2.46.1  sborrill  * POSSIBILITY OF SUCH DAMAGE.
     36  1.2.46.1  sborrill  */
     37  1.2.46.1  sborrill 
     38  1.2.46.1  sborrill /*******************************************************************************
     39  1.2.46.1  sborrill 
     40  1.2.46.1  sborrill   Copyright (c) 2001-2005, Intel Corporation
     41  1.2.46.1  sborrill   All rights reserved.
     42  1.2.46.1  sborrill 
     43  1.2.46.1  sborrill   Redistribution and use in source and binary forms, with or without
     44  1.2.46.1  sborrill   modification, are permitted provided that the following conditions are met:
     45  1.2.46.1  sborrill 
     46  1.2.46.1  sborrill    1. Redistributions of source code must retain the above copyright notice,
     47  1.2.46.1  sborrill       this list of conditions and the following disclaimer.
     48  1.2.46.1  sborrill 
     49  1.2.46.1  sborrill    2. Redistributions in binary form must reproduce the above copyright
     50  1.2.46.1  sborrill       notice, this list of conditions and the following disclaimer in the
     51  1.2.46.1  sborrill       documentation and/or other materials provided with the distribution.
     52  1.2.46.1  sborrill 
     53  1.2.46.1  sborrill    3. Neither the name of the Intel Corporation nor the names of its
     54  1.2.46.1  sborrill       contributors may be used to endorse or promote products derived from
     55  1.2.46.1  sborrill       this software without specific prior written permission.
     56  1.2.46.1  sborrill 
     57  1.2.46.1  sborrill   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     58  1.2.46.1  sborrill   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     59  1.2.46.1  sborrill   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     60  1.2.46.1  sborrill   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
     61  1.2.46.1  sborrill   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     62  1.2.46.1  sborrill   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     63  1.2.46.1  sborrill   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     64  1.2.46.1  sborrill   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     65  1.2.46.1  sborrill   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     66  1.2.46.1  sborrill   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     67  1.2.46.1  sborrill   POSSIBILITY OF SUCH DAMAGE.
     68  1.2.46.1  sborrill 
     69  1.2.46.1  sborrill *******************************************************************************/
     70       1.1     gavan 
     71       1.1     gavan #ifndef _DEV_PCI_IF_WMVAR_H_
     72       1.1     gavan #define _DEV_PCI_IF_WMVAR_H_
     73       1.1     gavan 
     74  1.2.46.1  sborrill /* sc_flags */
     75  1.2.46.1  sborrill #define	WM_F_HAS_MII		0x0001	/* has MII */
     76  1.2.46.1  sborrill #define	WM_F_EEPROM_HANDSHAKE	0x0002	/* requires EEPROM handshake */
     77  1.2.46.1  sborrill #define	WM_F_EEPROM_SEMAPHORE	0x0004	/* EEPROM with semaphore */
     78  1.2.46.1  sborrill #define	WM_F_EEPROM_EERDEEWR	0x0008	/* EEPROM access via EERD/EEWR */
     79  1.2.46.1  sborrill #define	WM_F_EEPROM_SPI		0x0010	/* EEPROM is SPI */
     80  1.2.46.1  sborrill #define	WM_F_EEPROM_FLASH	0x0020	/* EEPROM is FLASH */
     81  1.2.46.1  sborrill #define	WM_F_EEPROM_INVALID	0x0040	/* EEPROM not present (bad checksum) */
     82  1.2.46.1  sborrill #define	WM_F_IOH_VALID		0x0080	/* I/O handle is valid */
     83  1.2.46.1  sborrill #define	WM_F_BUS64		0x0100	/* bus is 64-bit */
     84  1.2.46.1  sborrill #define	WM_F_PCIX		0x0200	/* bus is PCI-X */
     85  1.2.46.1  sborrill #define	WM_F_CSA		0x0400	/* bus is CSA */
     86  1.2.46.1  sborrill #define	WM_F_PCIE		0x0800	/* bus is PCI-Express */
     87  1.2.46.1  sborrill #define WM_F_SWFW_SYNC		0x1000  /* Software-Firmware synchronisation */
     88  1.2.46.1  sborrill #define WM_F_SWFWHW_SYNC	0x2000  /* Software-Firmware synchronisation */
     89  1.2.46.4       riz #define WM_F_SGMII		0x4000  /* use SGMII */
     90  1.2.46.4       riz #define WM_F_NEWQUEUE		0x8000  /* chips which has the new queue system */
     91  1.2.46.1  sborrill 
     92  1.2.46.1  sborrill typedef enum {
     93  1.2.46.1  sborrill 	WM_T_unknown		= 0,
     94  1.2.46.1  sborrill 	WM_T_82542_2_0,			/* i82542 2.0 (really old) */
     95  1.2.46.1  sborrill 	WM_T_82542_2_1,			/* i82542 2.1+ (old) */
     96  1.2.46.1  sborrill 	WM_T_82543,			/* i82543 */
     97  1.2.46.1  sborrill 	WM_T_82544,			/* i82544 */
     98  1.2.46.1  sborrill 	WM_T_82540,			/* i82540 */
     99  1.2.46.1  sborrill 	WM_T_82545,			/* i82545 */
    100  1.2.46.1  sborrill 	WM_T_82545_3,			/* i82545 3.0+ */
    101  1.2.46.1  sborrill 	WM_T_82546,			/* i82546 */
    102  1.2.46.1  sborrill 	WM_T_82546_3,			/* i82546 3.0+ */
    103  1.2.46.1  sborrill 	WM_T_82541,			/* i82541 */
    104  1.2.46.1  sborrill 	WM_T_82541_2,			/* i82541 2.0+ */
    105  1.2.46.1  sborrill 	WM_T_82547,			/* i82547 */
    106  1.2.46.1  sborrill 	WM_T_82547_2,			/* i82547 2.0+ */
    107  1.2.46.1  sborrill 	WM_T_82571,			/* i82571 */
    108  1.2.46.1  sborrill 	WM_T_82572,			/* i82572 */
    109  1.2.46.1  sborrill 	WM_T_82573,			/* i82573 */
    110  1.2.46.1  sborrill 	WM_T_82574,			/* i82574 */
    111  1.2.46.2  sborrill 	WM_T_82583,			/* i82583 */
    112  1.2.46.4       riz 	WM_T_82575,			/* i82575 */
    113  1.2.46.4       riz 	WM_T_82576,			/* i82576 */
    114  1.2.46.4       riz 	WM_T_82580,			/* i82580 */
    115  1.2.46.4       riz 	WM_T_82580ER,			/* i82580ER */
    116  1.2.46.1  sborrill 	WM_T_80003,			/* i80003 */
    117  1.2.46.1  sborrill 	WM_T_ICH8,			/* ICH8 LAN */
    118  1.2.46.1  sborrill 	WM_T_ICH9,			/* ICH9 LAN */
    119  1.2.46.1  sborrill 	WM_T_ICH10,			/* ICH10 LAN */
    120  1.2.46.2  sborrill 	WM_T_PCH,			/* PCH LAN */
    121  1.2.46.1  sborrill } wm_chip_type;
    122       1.1     gavan 
    123  1.2.46.2  sborrill typedef enum {
    124  1.2.46.2  sborrill 	WMPHY_UNKNOWN = 0,
    125  1.2.46.2  sborrill 	WMPHY_NONE,
    126  1.2.46.2  sborrill 	WMPHY_M88,
    127  1.2.46.2  sborrill 	WMPHY_IGP,
    128  1.2.46.2  sborrill 	WMPHY_IGP_2,
    129  1.2.46.2  sborrill 	WMPHY_GG82563,
    130  1.2.46.2  sborrill 	WMPHY_IGP_3,
    131  1.2.46.2  sborrill 	WMPHY_IFE,
    132  1.2.46.2  sborrill 	WMPHY_BM,
    133  1.2.46.2  sborrill 	WMPHY_82578,
    134  1.2.46.2  sborrill 	WMPHY_82577
    135  1.2.46.2  sborrill } wm_phy_type;
    136  1.2.46.2  sborrill 
    137  1.2.46.2  sborrill 
    138  1.2.46.3  sborrill #define WM_GEN_POLL_TIMEOUT	640
    139  1.2.46.2  sborrill #define WM_PHY_CFG_TIMEOUT	100
    140  1.2.46.2  sborrill #define	WM_ICH8_LAN_INIT_TIMEOUT 1500
    141  1.2.46.2  sborrill #define	WM_MDIO_OWNERSHIP_TIMEOUT 10
    142  1.2.46.2  sborrill 
    143       1.1     gavan #endif /* _DEV_PCI_IF_WMVAR_H_ */
    144