2 * Copyright © 2005 Agere Systems Inc.
8 * This software is provided subject to the following terms and conditions,
9 * which you should read carefully before using the software. Using this
10 * software indicates your acceptance of these terms and conditions. If you do
11 * not agree with these terms and conditions, do not use the software.
13 * Copyright © 2005 Agere Systems Inc.
14 * All rights reserved.
16 * Redistribution and use in source or binary forms, with or without
17 * modifications, are permitted provided that the following conditions are met:
19 * . Redistributions of source code must retain the above copyright notice, this
20 * list of conditions and the following Disclaimer as comments in the code as
21 * well as in the documentation and/or other materials provided with the
24 * . Redistributions in binary form must reproduce the above copyright notice,
25 * this list of conditions and the following Disclaimer in the documentation
26 * and/or other materials provided with the distribution.
28 * . Neither the name of Agere Systems Inc. nor the names of the contributors
29 * may be used to endorse or promote products derived from this software
30 * without specific prior written permission.
34 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
35 * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
36 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY
37 * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
38 * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
39 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
41 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
42 * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
44 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
49 #define DRIVER_NAME "et131x"
50 #define DRIVER_VERSION "v2.0"
52 /* EEPROM registers */
54 /* LBCIF Register Groups (addressed via 32-bit offsets) */
55 #define LBCIF_DWORD0_GROUP 0xAC
56 #define LBCIF_DWORD1_GROUP 0xB0
58 /* LBCIF Registers (addressed via 8-bit offsets) */
59 #define LBCIF_ADDRESS_REGISTER 0xAC
60 #define LBCIF_DATA_REGISTER 0xB0
61 #define LBCIF_CONTROL_REGISTER 0xB1
62 #define LBCIF_STATUS_REGISTER 0xB2
64 /* LBCIF Control Register Bits */
65 #define LBCIF_CONTROL_SEQUENTIAL_READ 0x01
66 #define LBCIF_CONTROL_PAGE_WRITE 0x02
67 #define LBCIF_CONTROL_EEPROM_RELOAD 0x08
68 #define LBCIF_CONTROL_TWO_BYTE_ADDR 0x20
69 #define LBCIF_CONTROL_I2C_WRITE 0x40
70 #define LBCIF_CONTROL_LBCIF_ENABLE 0x80
72 /* LBCIF Status Register Bits */
73 #define LBCIF_STATUS_PHY_QUEUE_AVAIL 0x01
74 #define LBCIF_STATUS_I2C_IDLE 0x02
75 #define LBCIF_STATUS_ACK_ERROR 0x04
76 #define LBCIF_STATUS_GENERAL_ERROR 0x08
77 #define LBCIF_STATUS_CHECKSUM_ERROR 0x40
78 #define LBCIF_STATUS_EEPROM_PRESENT 0x80